Less CSS style rules without styles

I have a vars.less file with code as shown below:

@base: #96959A;
.ts_no{ text-shadow: none; }
.pos { position: absolute; z-index: 2; display: block; }

...

Compiled vars.css file:

.ts_no {
  text-shadow: none;
}
.pos {
  position: absolute;
  z-index: 2;
  display: block;
}

And I have a few fewer files that include vars.less (@import 'vars'). Thus, all of these files have vars.less styles. Thus, all compiled css files include compiled vars.less file styles:

style.css:

.ts_no { text-shadow: none; }
.pos { position: absolute; z-index: 2; display: block; }

...

What is the best way to have variables and mixins in one file and not repeat it in all files?

thank

+3
source share
1 answer

, - , "" . , mixins , - , .

vars.less :

@base: #96959A;
.ts_no() { text-shadow: none; }
.pos() { position: absolute; z-index: 2; display: block; }

CSS , .

.

+4

All Articles