Speaking of class-naming, has anybody come up with a good naming-scheme for classes used to add padding (or margins) to elements?
Sometimes I've create things like this: .pad_10_5_20_10 to avoid having to declare each one separately, but I'm sure there's a more-elegant way to do it. Of course, I can always define that padding directly in a more-generic class-name like .sidebar .... but there are cases where a pad class is more-desirable.
There is too much options [0] and it's more flexible than it should be. I know , it sounds weird but with bootstrap all you have is 12 columns and when you have less options it's easy to plan.
Maybe the other problem is : Units are not in multiplies of 5 and that forces you unnecessarily to think. If it would be in fixed units like bootstrap or in multiplies of 5 ( pure-u-3-25 etc.) i would be less thinking while deciding the length of some div.
notjustanymike|12 years ago
Compare "span4" vs "pure-u-1-3"
defrex|12 years ago
uptown|12 years ago
Sometimes I've create things like this: .pad_10_5_20_10 to avoid having to declare each one separately, but I'm sure there's a more-elegant way to do it. Of course, I can always define that padding directly in a more-generic class-name like .sidebar .... but there are cases where a pad class is more-desirable.
achalv|12 years ago
slickninja1|12 years ago
/spacing.css/ /* spacing helpers p,m = padding,margin a,t,r,b,l,h,v = all,top,right,bottom,left,horizontal,vertical s,m,l,n = small(5px),medium(10px),large(20px),none(0px) */
https://gist.github.com/cloudchen/5626174
hobonumber1|12 years ago
devmach|12 years ago
Maybe the other problem is : Units are not in multiplies of 5 and that forces you unnecessarily to think. If it would be in fixed units like bootstrap or in multiplies of 5 ( pure-u-3-25 etc.) i would be less thinking while deciding the length of some div.
[0] : http://yuilibrary.com/yui/docs/cssgrids/#unit-sizes
envex|12 years ago
Why not use something like "2-cols/2-columns/pure-2"?