Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to understand some HTML5Boilerplate items

In the HTML5Boilerplate, on line 72 to 80 in the css, it says:

/* fonts.css from the YUI Library: developer.yahoo.com/yui/
   Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages

   There are three custom edits:
   * remove arial, helvetica from explicit font stack
   * we normalize monospace styles ourselves
   * table font-size is reset in the HTML5 reset above so there is no need
   * to repeat
*/
body { font:13px/1.231 sans-serif; *font-size:small; } /* hack retained to
                                                          preserve specificity 
                                                       */ 

What I'm trying to understand is, why do they mention Yahoo and what 'hack is retained?'

like image 258
Kriem Avatar asked Feb 16 '11 14:02

Kriem


People also ask

What does HTML5 boilerplate do?

HTML5 Boilerplate is an HTML, CSS and JavaScript template (or boilerplate) for creating HTML5 websites with cross-browser compatibility.

How do you use a boiler plate?

The term boilerplate refers to standardized text, copy, documents, methods, or procedures that may be used over again without making major changes to the original. A boilerplate is commonly used for efficiency and to increase standardization in the structure and language of written or digital documents.

What is boiler template in HTML?

What is an HTML 5 boilerplate? According to Wikipedia, boilerplate code or just boilerplate are sections of code that are repeated in multiple places with little to no variation. A boilerplate in HTML is a template you will add at the start of your project. You should add this boilerplate to all of your HTML pages.


1 Answers

The link to Yahoo is a link to the Yahoo User Interface library, they have a thing there that

...provides cross-browser typographical normalization and control while still allowing users to choose and adjust their font size.

This means that Boilerplate uses the YUI Fonts.css as their base, but have removed Arial and Helvetica from the YUI Css file, have normalised monospace styles themselves and have I guess removed the table font-size because it's already in their HTML5 reset.

The hack is a CSS hack that targets IE6: *font-size:small; will only be seen by IE6 and below.

Hope some of that helps a bit.

like image 134
Kyle Avatar answered Nov 08 '22 19:11

Kyle