css - Loops make Less to run out of memory. (Structure optimization) -


I am working on a lesser project, but as I am starting to grow up a little bit, every time I Trying to compile me goes out of memory

This is my current structure:

  • style.less
  • colors.less
  • style
  • Style 3
  • Style 1
  • Style 1
  • Style 3

Now,

  • is a list of colors.less colors and their classes
  • icon.
  • Style is a main folder, where everyone is included and compiled
  • Styles are folders with all the differences for a separate folder

My question is (well, actually, more than one question is a suggestion):

How can I optimize this structure so that I do not Now is the memory trying to compile?

The process is for Llowing:

colors.less and icons.less color, symbol and Classes include my arrays, nothing else.

I have colors.less and icons.less included in style1.less , style2.less , style3 Without << code>, where I make a loop trough color.

Finally, I'll import everything in style. Without the (main one) where I am making a loop trough. Then add all MIXINS to create the final result. The problem is that I can not compile as I run out of memory.

I am pretty sure there is something wrong with my structure or I can increase memory by any means (I am compiling using Brunch

Too much information For some, just ask.

Any suggestions are really appreciated.

Partial answer is a way to get rid of loops: color and icon data form of mixes call Can be defined in, here is a small example: div>

  .colors () {// "array" of colors - (Maroon, # 800000) ;- (red, # FF0000); - (Orange, # FFA 500) ;- (Yellow, #FFFF0000);} // Color Colors Ready: .some-prefix {.colors (); .- (@name, @color) {& amp; ; @ {Name} {Color: Contrast (@color); Back color; // etc}}}  

Similar to the icon ...


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -