CSS-Redundancy when using LESS and its @import -


I really like the idea and the concept. Nevertheless, I stumbled upon a bug, which I told the author a long time ago. Was but had not received any response so maybe it is only me who is doing something wrong

My application.less - The file that looks like this:

  @import "reset"; @import "config"; @import "header"; @import "forms"; [...]  

I like to use the @import rule to split my files to better observe my CSS announcements. I still need to import config.less-file again for every imported file to be able to use the mixer and variable.

I Only bet I'm running on redundancy, find out about: config every time Less is imported, its "output" is part of the application.css

About 200 lines of my config-file code Since I divided my CSS into about 5 files (depending on my controller names) which need to be imported again So, I generate a CSS code of about 1000 lines which is 100% redundant

The only solution I can come up with is to not divide my files, which I really have to save from

Although not ideal, the practical reason for this is that the files you import do not need to be theoretically imported. Usually, you have any CSS that contains variables and There are dynamic blends, which do not contribute to your CSS output Do it:

lib.less:

  #colors {@blue: # 0011ff; @red: # ee2222; }. Button (@ Wide: 10px) {...}  

main.less:

  @import "lib"; A {color: # color [blue]; }  

output, main.css:

  one {color: # 0011ff; }  

#colors {} and .button will not output in this case.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -