-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal - Fixed width for glypicons #10022
Conversation
Prevents elements moving around the page after the font file has loaded by setting a defined width on elements using the icon font.
The fact that this is hosted on a CDN doesn't show the problem very well as the fonts are served fast and are cache. But clear your cache before each request and you'll see what first time users will see. |
Proposal - Fixed width for glypicons
Neato, gang. I like it. Thanks! |
Cheers, thanks for 3.0 🍻 |
Shouldn't we use |
@ggam no, because then the width other the glyphicon will only be 1px wide. (try it out in chrome dev tools) |
@ggam IE8 doesn't pick this up anyway, because it doesn't support the :empty selector. |
@thomaswelton right, thank you. |
Please document this at bootstrap website, add examples of empty icon. Thank you |
PR for the height declaration #10329 |
…icon-block Proposal - Fixed width for glypicons
…icon-block Proposal - Fixed width for glypicons
This was eventually reverted in 2979e4b:
|
The problem…
Before the Glyphicon font file has loaded elements using glypicons have no width defined. Then once the font loads the elements grow and move other items around the page.
This issue is exacerbated when after the elements grow they cause text to go onto new lines.
The proposed fix - Add a defined width of 1em to all :empty glyphicons
Demo of the problem http://9a6c381b6ab68b16ed63-5b5693321d576aeab3f1767c0caf2c60.r44.cf3.rackcdn.com/
Demo of the proposed fix http://9a6c381b6ab68b16ed63-5b5693321d576aeab3f1767c0caf2c60.r44.cf3.rackcdn.com/fix.html