Skip to main content

Home/ Web Development & Mobile App/ Group items tagged units

Rss Feed Group items tagged

Vernon Fowler

Can I use rem units - 0 views

  •  
    "Type of unit similar to "em", but relative only to the root element, not any parent element. Thus compounding does not occur as it does with "em" units."
Vernon Fowler

Font sizing with rem - Snook.ca - 0 views

  • The problem with em-based font sizing is that the font size compounds. A list within a list isn't 14px, it's 20px. Go another level deeper and it's 27px!
  • The rem unit is relative to the root—or the html—element. That means that we can define a single font size on the html element and define all rem units to be a percentage of that. html { font-size: 62.5%; } body { font-size: 1.4rem; } /* =14px */ h1 { font-size: 2.4rem; } /* =24px */
  • I'm defining a base font-size of 62.5% to have the convenience of sizing rems in a way that is similar to using px.
  • ...3 more annotations...
  • consistent and predictable sizing in all browsers, and resizable text in the current versions of all major browsers
  • We can specify the fall-back using px, if you don't mind users of older versions of Internet Explorer still being unable to resize the text (well, there's still page zoom in IE7 and IE8). To do so, we specify the font-size using px units first and then define it again using rem units. html { font-size: 62.5%; } body { font-size: 14px; font-size: 1.4rem; } /* =14px */ h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */
  • The compounding nature of em-based font-sizing can be frustrating so what else can we do?
Biztech Consultancy

Thanksgiving Day: Adding Up Modern Essence - 0 views

  •  
    Thanksgiving - from this very day, the pleasant holidays start off by indulging, feasting and spending quality time with loved ones. The term was coined in the United States, which means "Giving Thanks" and hence, later people started celebrating it not only in the USA, but also in many countries. Thanksgiving is said to be the "secular holiday" that follows on the 4th Thursday in November. In Canada, this day is rejoiced on the 2nd Monday of October!
Vernon Fowler

Eric's Archived Thoughts: Unitless line-heights - 0 views

  • This is why it’s always strongly recommended that you use unitless numbers if you’re going to set a line-height on something like the html or body elements, or indeed on any element that is going to have descendant elements.
1 - 4 of 4
Showing 20 items per page