Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Glyph icons aren't working on a Bootstrap subtheme. The markup is all there, but the font doesn't seem to load. Changing the backend theme to Bootstrap makes no difference, but changing the front end theme from the subtheme to plain Bootstrap does work.
Comment | File | Size | Author |
---|---|---|---|
#9 | glyphicons-base.ddev_.local-2018.06.12-09-58-54.png | 134.38 KB | MrPaulDriver |
Comments
Comment #2
markhalliwellThe only reason they wouldn't work in a sub-theme is if you're compiling your own (e.g. LESS/SASS) and you didn't copy over the necessary font files (or properly reference the location of them).
Closing per https://drupal-bootstrap.org/api/bootstrap/docs%21Contributing.md/group/...
Reason: CSS/site specific
Comment #3
scott.whittaker CreditAttribution: scott.whittaker as a volunteer commentedI finally managed to track this down. The @font-face declaration for the glyphicon font was nested inside a @at-root declaration. Deleting the @at-root wrapper fixed the issue.
Comment #4
medinasod CreditAttribution: medinasod commentedThe same thing is happening for me. My compiled CSS is looking for the icons here:
/themes/my_theme/dist/bootstrap/assets/fonts/bootstrap/
but they're located here
/themes/my_theme/bootstrap/assets/fonts/bootstrap/
The dist directory is where my compiled assets live. What's the best way to fix this? Move the directory into dist?
Thanks!
Rob
Comment #5
kevineinarsson CreditAttribution: kevineinarsson commented#4, I ran into a similar issue. My solution was setting
$icon-font-path
before importing bootstrap to specify the font location.Comment #6
Bobby Endarr Ramdin CreditAttribution: Bobby Endarr Ramdin as a volunteer commentedmy issue was resolved by editing variables.scss check the path there, so
Comment #7
Bobby Endarr Ramdin CreditAttribution: Bobby Endarr Ramdin as a volunteer commentedComment #8
mimran CreditAttribution: mimran commentedYou need to change the glyphicon font path on the file "_default-variables.scss" as per your bootstrap source files location
Comment #9
MrPaulDriver CreditAttribution: MrPaulDriver commentedI can't get this working in a node edit modal
---
EDIT
I did not have Boostrap modals enabled in theme settings, and now that I have, this is not longer a problem.
Comment #10
tony_addyman CreditAttribution: tony_addyman commentedI too have been affected by the @at-root issue described above. I am in the process of replacing my Zen-based subtheme with a Bootstrap-based subtheme. Therein lies the cause of the trouble. I was using an old version of compass and sass to suit Zen. This version of sass did not implement @at-root, so it was copied across to the output css file. Updating the versions of compass and sass fixed the problem.
Comment #11
GuyManDude CreditAttribution: GuyManDude commentedI have decided to use a non-cdn strategy and converted my 7x subtheme to stand alone. I have the CSS and JS working fine but the glyphicons are not working. I didn't have the fonts folder so I created one and copied the various font files Mark made available on Github into it. I set the file and directory permissions but they still don't work. I have cleared the cache and restarted Apache but still no dice.
I must be missing something.
BTW, not sure if it makes any difference but when I originally created the subtheme there was only a startkerkit called THEMENAME which I used. I have seem mention of SASS and LESS starter kits but as I said, I did have either of those available.
I would appreciate any thoughts please. Thank you.