Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Can we stop redefining base bootstrap .navbar-brand? #2096
The standard Blacklight uses .navbar-brand for a logo, by default the Blacklight logo.
And Blacklight redefines .navbar-brand in some pretty major ways, changing it's positioning, size, and layout in a variety of ways.
Because it is adding styles to the base
If you wanted to use bootstrap .navbar-brand on other pages in your app in other ways -- they get Blacklight's redefiniton, which makes it not really display as one expects a .navbar-brand too.
If you wanted the original Bootstrap navbar-brand, there's no great way I can figure out to get it. Because of how CSS works, you have to manually "undo" all the styles Blacklight adds, and restore them to what Bootstrap wanted (and potentially manually update when Bootstrap updates).
Is there a way Blacklight could scope it's CSS declaration to only apply to intentionally "opted in" elements, and not hijack all .navbar-brands in the app? I can think of several, but I'm not sure what the backwards compatibility implications are. If relying on a bare ".navbar-brand" selector having Blacklight's overridden styles is part of Blacklight's "API", then of course there's no way to do it backwards compatibly. I'm not sure what the "least disruptive" way to do it is, it depends on what actually existing apps are depending on.
This does seem to be a new problem in BL 7.
I think in this commit:
It's causing me lots of trouble in migrating my app from BL6. I was relying on being able to use standard Boostrap navbar-brand class, and BL 7 hijacks to insist that any
Previously it only applied it's special styling to
I would like to send a PR reverting this, and going back to having a BL-specific class on the BL-specific navbar that should trigger BL-specific overrides to bootstrap navbar styles.
But @jcoyne, if you can remember the commit from Sep 2016 (that wasn't in a BL release until 7.0) -- can you say anything about what motivated it? And if it was intended/expected to takeover bootstrap
I guess the commit message says "This is the behavior prefered by CSSLint and it makes it easier to