3 ms·
This has already been done by SASS (http://haml.hamptoncatlin.com/docs/sass). http://haml.hamptoncatlin.com/docs/sass). Ex. In SASS !main_width = 10 !
by earthboundkid 19y ago
This has already been done by SASS (http://haml.hamptoncatlin.com/docs/sass). http://haml.hamptoncatlin.com/docs/sass).
Ex. In SASS
!main_width = 10
!unit1 = em
!unit2 = px
!bg_color = #a5f39e
#main
:background-color = !bg_color
p
:background-color = !bg_color + #202020
:width = !main_width + !unit1
img.thumb
:width = (!main_width + 15) + !unit2
yields
#main {
background-color: #a5f39e; }
#main p {
background-color: #c5ffbe;
width: 10em; }
#main img.thumb {
width: 25em; }
(Edit: Is there some way to format comments here on new.yc like there is on Reddit? I tried using both pre tags and indenting and neither worked…)
- pc 19y agoThis requires you migrate your stylesheets to a totally new syntax, which isn't a great solution.