Developer forum

Forum » Rapido » Request - _variables.less additional variables

Request - _variables.less additional variables

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Working on custom solutions, we can tell how to get layout-brand-color-one as LESS variables, which is great.

 

Our request is to also have the following variables available in /Templates/Designs/Rapido/css/ignite/abstract/_variables.less file:

  • layout-brand-color-neutral-one
  • layout-brand-color-neutral-two
  • layout-brand-color-neutral-three
  • layout-brand-color-neutral-four
  • layout-brand-color-neutral-five

 

Additionally, can you tell us how you generate the five shades for each color? (I mean the additional 5 colors that should up beneath brand color #2) I am planning to create some less mixins to replicate that.

 

Best Regards,

Nuno Aguiar


Replies

 
Karsten Thuen Dynamicweb Employee
Karsten Thuen
Reply
This post has been marked as an answer

Hi Nuno

The reason the first 5 brand colors is there, is that there is an ItemType field for each. See the "Layout" tab at the top of the Website settings. These are mostly here as we made them before we had the Color Swatch item type. 

I think your option here, if really needed, is to add one color swatch field for each neutral color, in your custom settings tab. Then select the correct colors and save. Then you will have them in the compiled variables file after saving Website settings.

If you need the colors directly in a Razor template, there is a fine service to access them: Dynamicweb.Content.Items.ColorSwatchService 

I hope this answers your questions.

 

Best regards
Karsten Thuen

 

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Karsten,

 

That's a nice workaround, thanks. And I have used it in Razor, I was just hoping there could be a way to get it in Less variables, but we can get by.

 

Best Regards,

Nuno Aguiar

 
Kevin Byrd
Kevin Byrd
Reply

This issue has come up a few times for me as well.

 

I think would be a great addition to include in the next update, adding the neutral color swatch to the Less variables.

 

Thanks

Kevin

 

You must be logged in to post in the forum