PostCSS Inherit Parser
A PostCSS Parser that supports syntax for inherit declarations with pseudo classes.
.b:before {
content: "";
}
.a {
inherit: .b:before;
}
inherit
syntax
Defining Using an options object with a property of propertyRegExp
, you can define a custom inherit
syntax.
This example:
parse(
'.a { color: red; } .b { extend: .a; }',
{ propertyRegExp: /^extends?$/ }
);
would work with this css:
.a {
color: red;
}
.b {
extend: .a;
}