0

I'm new at Less. I want to create multidimensional array in Less.

Let me show!

@colors: {
@sidebar: {
    color: #FFF;
}

@content: {
    border-color: #000;
}

...
}

Is it possible? If i can create it like above, how can i use them?

Thanks!

seven-phases-max
  • 11,765
  • 1
  • 45
  • 57
  • *how can i use them?* - this depends solely on how *you want* to use them. First of all there's difference between [an array](https://stackoverflow.com/questions/20954762/arrays-with-less/34867089#34867089) and [a map](http://lesscss.org/features/#maps-feature) (it's possible to use one as another but in Less it's not always transparent conversion between them), but yes you can create a multidimansional arrays and maps (or whatever combination of these structures). – seven-phases-max Mar 22 '19 at 12:50
  • An online Less-compiler - for example http://lesscss.org/less-preview/ is usually a good start to learn languages basics. – seven-phases-max Mar 22 '19 at 17:49
  • Here's a related article about someone using maps in SASS, which could be translated into Less, that you might find helpful: https://www.viget.com/articles/maps-math-and-magic-build-a-flexible-variable-system-in-sass/ (no affiliation) – Sean Mar 22 '19 at 20:04
  • @sean perfect! Thanx a lot ! – Jason Denayer Mar 23 '19 at 23:52

0 Answers0