Hacker News new | comments | show | ask | jobs | submit login




At 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


Thanks 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?


We'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.


yeah 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?


`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.


Bootstrap 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/...


They don't use <i> anymore. They use class icon.


It looks like they still do. From 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>


Yes, it looks like the docs are lagging behind the code. You just need to include the icon-something class in a tag.


Thanks 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.


yeah, 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-"]


you dont have to use their icons you know.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: