CSS inheritance, aliases and other cool stuff

2019-05-06 15:54发布

问题:

The other day I was randomly browsing the web and I found some program that lets you write CSS aliases and other cool stuff (which I can't remember right now).

As an example, I remember you can do something like this:

.myclass
{
   background-color: red;
   greenfont
}

where greenfont was defined somewhere else as somekind of alias

greenfont { color: green; }

Then the program will generate the resulting CSS based on the alias and other stuff.

Does anyone has used this? Or did I dreamed about it? I cannot find it now :P

回答1:

Sorry to reply to such an old thread but another one to check out would be LESS http://lesscss.org



回答2:

Among other similiar projects, there's also http://axr.vg/ for hierarchic styling.