3 ms·
I normally use SCSS, but this should work as well. =triangle($direction: top, $size: 10px, $color: #000) width: 0 height: 0 border: $size
by jacobr 14y ago
I normally use SCSS, but this should work as well.
=triangle($direction: top, $size: 10px, $color: #000)
width: 0
height: 0
border: $size solid transparent
border-#{$dir}-color: $color
- diminish 14y agocss, sass and scss rocks. all those ideas should have their place in css3 or later.
- sil3ntmac 14y agoCheck out stylus, it's pretty neat too: http://learnboost.github.com/stylus/docs/js.html http://learnboost.github.com/stylus/docs/js.html My favorite features: - auto-insert vendor prefixes, even IE filters (no need for css3 'mixins', which are most of the mixins the avg dev will need) - can even rasterize linear-gradient backgrounds and serve as image for more pre-css3 browser support. This one I haven't tested but it sounds awesome Edit: paragraph formatting
- jenius 14y agoYeah I actually prefer stylus to sass personally, sass is just more popular (and rails default) and less magical for people that don't work with css as often. My favorite feature actually is that it can grab properties out of parents, as demonstrated here: https://gist.github.com/2563746 https://gist.github.com/2563746