Вопрос

I have been looking around how to use mixins with regular css3, no sass or less, so I was wondering if that was possible. All I want to do is:

@mixin .clientred{
    color:darkred;
}

in a nutshell so then I could use it later

h1{
    include: .clientred;
    font-size: 32px;
}
Это было полезно?

Решение

CSS3 does not support any notion of mixins.

That is only available using a CSS compiler like SASS or LESS. (That's kind of the whole point of using compiled CSS... if CSS had it built in, we wouldn't need the compilers.)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top