I installed Navbar on my personal website, to start dogfooding it :)
I've already filed issues for the setup problems I encountered. Now I'm running into a different kind of problem: my theme breaks navbar's styling because of:
a {
border-bottom: 1px solid #93cef4;
}
There are two ways to go about this:
- navbar provides "sufficient" styling, and if a theme conflicts with it, it'll just have to add CSS to deal with navbar
- navbar gradually "hardens" its CSS to prevent theme CSS from bleeding in; this means that over time, less themes will have to be adjusted for a site to be able to use navbar. The same CSS hardening can be forward-ported to the Drupal 8 version and will therefor benefit all future Drupal 8 sites from the same hardening.
So, it seems like option 2 is the best. Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | Screen Shot 2014-01-04 at 13.41.39.png | 314.94 KB | wim leers |
| #1 | Screen Shot 2013-12-18 at 00.21.28.png | 493.64 KB | wim leers |
Comments
Comment #1
wim leersScreenshot demonstrating the problem.
Comment #2
jessebeach commentedWe'll harden the CSS. But it's not going to be pretty :)
Comment #3
jessebeach commentedWim, I committed an update (10d34467) with hardened CSS.
Do these changes protect Navbar from your theme?
Comment #4
hass commentedhttp://drupalcode.org/project/navbar.git/commit/10d3446
Comment #5
wim leersThanks!
I'll test again and report back :)
Comment #6
wim leersI had to fight through Libraries API hell (see #2167021: Revamp Libraries API integration), but I got it working.
It's much better already now, the only thing that I can see is broken/missing now, is the box-shadow emanating from the tray. So: almost :)
Comment #7
philipz commentedThe shadow problem looks similar to #2100133: The Toolbar tray box shadow disappears at small viewports sizes on Chrome, on a Mac, under unpredictable conditions. I've applied almost the same fix and the shadow is back too. Does this need a separate issue?
Comment #8
frobI am marking this as needs review.Basically we need to review the css from Hass' sandbox to see if it salves the problem.Although, I disagree with this approach -- or maybe I don't know what you mean by "css hardening"
Ideally the nav bar would have classes that would allow sufficient styling and maintain the least logical specificity. this way it would be easier for a theme to override the styling of the navbar if it needed to.
Comment #9
hass commented@Frob: do not forget the real source of all these issues - #2119989: Add navbar_menu_tree() to prevent theme clashes.
Comment #10
frob@hass, Good point. Lets solve that one first.
Comment #11
hass commentedPlease help reviewing the other root case issue.
Comment #12
hass commentedJust checked the code http://cgit.drupalcode.org/navbar/tree/css/navbar.theme.css#n23 and I see this
aborder is an in-depended issue. We could harden this here in navbar, but I also think we cannot harden everything. Some things need to be moved to themes that create the issue.It looks like core http://cgit.drupalcode.org/drupal/tree/core/modules/toolbar/css/toolbar.... has the same issue. I think we need to harden core first, than backport.
Comment #13
hass commentedMoving to D8. Please move back to navbar once done.
Comment #14
xjmComment #22
nod_Comment #26
stefdewa commentedI don't think this issue is relevant for Drupal 9 (or 8 for that matter) because:
Perhaps this can be set to "Closed (outdated)".
Anyone care to chime in?
Comment #27
stefdewa commentedFeel free to reopen if still valid.