4 ms·
yeah, like using <i> for icons http://www.w3.org/TR/html4/present/graphics.html#edef-I http://www.w3.org/TR/html4/present/graphics.html#edef-I
by mrpollo 15y ago
yeah, like using <i> for icons http://www.w3.org/TR/html4/present/graphics.html#edef-I http://www.w3.org/TR/html4/present/graphics.html#edef-I
- oconnor0 15y agoThanks for pointing that out. That seems like an odd design decision. Edit: I wonder what motivated it. "i" for images and no one uses it to italicize text anymore?
- mrpollo 15y agoyeah my best guess is that "i" for "icon", it's a good use, from the w3c "their use is discouraged in favor of style sheets." so I guess it doesn't really hurt no one, but the purists, or am I wrong?
- intranation 15y ago`i` is for "italic", and that quote means that you should be using `font-style` instead of an HTML element to make your text italic.
- rimantas 15y agoBootstrap is kind of aimed for HTML5, and "Font Style Elements" form HTML 4.01 got a new life in this spec (including previously deprecated S and U), with redefined semantics. Using I for icon is still wrong even by new definition. http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html http://www.whatwg.org/specs/web-apps/current-work/multipage/...
- kemayo 15y agoWe've used <i> for icons before. Main reason we started doing it, I seem to recall, was that we needed some sort of element there to make the spritesheeting work easily, and a lone empty <i> is (a) short, (b) extremely devoid of meaning which might be added to it by browsers/readers, and (c) easy to remember when writing markup as i-for-icon.
- xmlninja 15y agoyou dont have to use their icons you know.
- niels 15y agoThey don't use <i> anymore. They use class icon.
- nhebb 15y agoIt looks like they still do. From http://twitter.github.com/bootstrap/base-css.html#icons http://twitter.github.com/bootstrap/base-css.html#icons <excerpt> How to use With v2.0.0, we have opted to use an <i> tag for all our icons, but they have no case class—only a shared prefix. To use, place the following code just about anywhere: <i class="icon-search"></i> </excerpt>
- dhendo 15y agoYes, it looks like the docs are lagging behind the code. You just need to include the icon-something class in a tag.
- nhebb 15y agoThanks for the tip. Even if I never use it anymore, <i> still means italic to me. The thought of using it for icons breaks 15 years of ingrained habit.
- mrpollo 15y agoyeah, it's only their recommendation it doesn't really matter what tag as long as you have the class here is the selector [class^="icon-"]
- deleted 15y ago[deleted]
- ibejoeb 15y agoAt first, I thought that was a poor choice, too. However, <i> has come to mean that something is to be interpreted under a different voice or mood. You are providing augmented meaning. To further color a bit of text with an icon, I think, is in the spirit of the rfc. Notice, also, that the rfc talks specifically about classifying the alternate meaning, appropriately, with the class attribute. http://dev.w3.org/html5/spec/Overview.html#the-i-element http://dev.w3.org/html5/spec/Overview.html#the-i-element