[ 4 posts ]

old.castle

  • Joined: Thu Apr 19, 2012 5:25 am
  • Posts: 6
  • Offline
  • Profile

What is the role of .yui3-g?

Post Posted: Sat Jun 16, 2012 8:34 am
+0-
Hi there,

I'm studying YUI3 css grid and so far I couldn't figure out what is the yui3-g role? How can it act as a container for the units?

Cheers

Evan Goer

YUI Contributor

  • Username: evangoer
  • Joined: Fri Dec 10, 2010 9:26 am
  • Posts: 20
  • Location: San Jose, CA
  • Twitter: evangoer
  • GitHub: evangoer
  • Gists: evangoer
  • IRC: evangoer
  • Offline
  • Profile

Re: What is the role of .yui3-g?

Post Posted: Sun Jun 17, 2012 6:11 am
+1-
Hi there,

In a nutshell, YUI 3 Grids sets units to be "inline-block". However, to make inline-block elements truly behave like grid units, you also have to try to collapse whitespace between those units. That's what the yui3-g container does (and that's why you need both).

old.castle

  • Joined: Thu Apr 19, 2012 5:25 am
  • Posts: 6
  • Offline
  • Profile

Re: What is the role of .yui3-g?

Post Posted: Sun Jun 17, 2012 7:14 pm
+0-
Hi Evan,

My natural next question is why can't we collapse the whitespace directly from the units?

Thank you.
Castle

Evan Goer

YUI Contributor

  • Username: evangoer
  • Joined: Fri Dec 10, 2010 9:26 am
  • Posts: 20
  • Location: San Jose, CA
  • Twitter: evangoer
  • GitHub: evangoer
  • Gists: evangoer
  • IRC: evangoer
  • Offline
  • Profile

Re: What is the role of .yui3-g?

Post Posted: Sun Jun 17, 2012 8:39 pm
+1-
Because the units are designed to contain ordinary HTML divs, paragraphs, lists, tables, etc -- i.e. content where you *don't* want the whitespace collapsed.
  [ 4 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum