-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Milestone
Description
import takes the contents of the less file and puts it inline, as if the files were joined together. Silent continue to do this, but marks the contents as silent, so they can be referenced but not output. e.g.
//file.less
.a { color: black; }
.b .c.d { color: white; }
//main.less
@import "file.less";
.e { .a; }
.f:extend(.b .c.d) {}
current output...
.a { color: black; }
.b .c.d,
.f { color: white; }
.e { color: black; }
output with silent (@import (silent) "file.less";
)
.f { color: white; }
.e { color: black; }
I see this as every selector in file.less is silenced, but if it is referenced it doesn't stop the use of it from being silent. I imagine this like a silent boolean property on root level selectors and directives - if a new selector is added to a ruleset then it still gets output.
usecase - powerful refactoring/ use of libraries.
only valid with a less file