Hi Drupal forums,
I'm admittedly a complete newbie to Drupal - I only started using it last month and I've been slowly learning theme development bit-by-bit for my job. One issue I have had with the current site I'm working on is that the administration toolbar doesn't seem to want to be styled correctly, unlike another site I themed and finished earlier.
What it should look like (my earlier site)
What my current site's toolbar looks like
Both sites use Bootstrap, Jquery, and a few other externally loaded stylesheets/scripts, which may be overriding the toolbar's default css/javascript. But in my original website, I noticed that lots of weird stylesheets named "css_DXBjLeqsf_xdR6lvTSbbx8gtOA_sL2R5fQjY9imkbTU.css" and similar were loaded and affected the toolbar, whereas my new website has none of these affecting its broken toolbar. Both sites also subtheme simply the "stable" theme included in Drupal 8 core.
Older, working site's stylesheets
Newer, nonworking site's stylesheets (zero stylesheets with "css_" prefix)
Does anyone know what might be causing this discrepancy between the two sites' toolbars? Both are very similarly styled/developed, with both using externally loaded Bootstrap, JQuery, and a few other plugins that shouldn't change the admin toolbar.
Thank you for any and all help,
Neil
Comments
=-=
does the toolbar display correctly on a core theme?
Yes; I changed the theme to
Yes; I changed the theme to "Bartik" and the toolbar displayed correctly.
=-=
css_DXBjLeqsf_xdR6lvTSbbx8gtOA_sL2R5fQjY9imkbTU.css < indicates a cached style sheet. I venture the site where the toolbar is correct is using css aggregation and the new site either is not or cannot write to the files folder. Any notices in your drupal logs?
info files
what does your info.yml and libraries.yml file look like? Should be in your theme folder.
I fixed the problem; my html
I fixed the problem; my html.html.twig file was missing some properties (that include the drupal-generated css, javascript, body classes, etc.).
Same problem
Hi - I've got the same problem with missing styling on the admin toolbar. I updated the site from 7.32 to 7.73 - and the problem arose. The file your are talking about: html.html.twig - where is that placed - and what did you change ?
Same problem - Different version of Drupal
This topic is about D8, not D7 !
The files mentioned are not available in D7, unless you managed to get twig working there!
Sorry
Ahh ok - sorry.
https://www.drupal.org/project/toolbar_themes
Those wanting to style the Toolbar will be interested in this module, it's a very powerful way of providing advanced styling to the Drupal 8 toolbar: https://www.drupal.org/project/toolbar_themes
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.