You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now all grid classes have padding-left and padding-right set, regardless of their scope (I mean tablet- or mobile-). So the CSS output looks like this :
I understand the need in general use for a grid to have padding by default. But in certain cases, it's not the wanted behavior. For example, I want a grid to be 3_3 on desktop, then 1_2 + 1 + 1 on tablet. I made a quick Pen to show this : http://codepen.io/anon/pen/DLGcm/
As you can see, the problem is that, since tablet-grid-xx have paddings even on desktop or mobile. So when grids of different "scopes" are nested, paddings are doubled.
I know this issue could be reset via (S)CSS, but it would lose all the benefits of this system, as grids would be defined in two different places (HTML & CSS).
I'm thinking of 2 possible solutions :
Each grid has padding only for its media queries. It means that, if an element has only the tablet-grid-50 class, it won't have any padding for mobile and desktop. For other media queries, the "workaround" would be to add mobile-grid-100 grid-100 for example. A bit verbose, but coherent.
Create 3 new classes : mobile-grid-parent, tablet-grid-parent and desktop-grid-parent so we could "reset" paddings for specific media queries. A bit less verbose, but certainly less comprehensive too.
What do you think ? Hope I was clear.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi Nathan,
For now all
grid
classes havepadding-left
andpadding-right
set, regardless of their scope (I meantablet-
ormobile-
). So the CSS output looks like this :I understand the need in general use for a grid to have padding by default. But in certain cases, it's not the wanted behavior. For example, I want a grid to be 3_3 on desktop, then 1_2 + 1 + 1 on tablet. I made a quick Pen to show this : http://codepen.io/anon/pen/DLGcm/
As you can see, the problem is that, since
tablet-grid-xx
have paddings even on desktop or mobile. So when grids of different "scopes" are nested, paddings are doubled.I know this issue could be reset via (S)CSS, but it would lose all the benefits of this system, as grids would be defined in two different places (HTML & CSS).
I'm thinking of 2 possible solutions :
grid
has padding only for its media queries. It means that, if an element has only thetablet-grid-50
class, it won't have any padding for mobile and desktop. For other media queries, the "workaround" would be to addmobile-grid-100 grid-100
for example. A bit verbose, but coherent.mobile-grid-parent
,tablet-grid-parent
anddesktop-grid-parent
so we could "reset" paddings for specific media queries. A bit less verbose, but certainly less comprehensive too.What do you think ? Hope I was clear.
Thanks.
The text was updated successfully, but these errors were encountered: