custom presets:
Permalink
Hi,
is it possible to reuse a variable previously set in the same less preset file?
es.
is it possible to reuse a variable previously set in the same less preset file?
es.
// Global body background @page-background-color: #fff; // Top Header - Website Title */ @header-background-color: @page-background-color;
I tried, but it seem it doesn't work (see image attached)
// istituzionali @main-1-color: white; @main-2-color: #333333; @main-3-color: #13522b; // Global body background @page-background-1-color: @main-1-color; @page-background-2-color: @main-2-color; @page-background-3-color: @main-3-color;
Possibly the values were changed from the original preset file. You'll have to test that yourself.
But you can reuse them. Here's a snipped from what I did in a defaults.less file:
But you can reuse them. Here's a snipped from what I did in a defaults.less file:
@c1: #FFFFFA; @c2: #ff8000; @c3: #6C3600; @c4: #00a0c6; @c5: #0080c6; @c6: #60ca2a; @c7: red; @preset-name: "Traag"; @preset-icon: concrete-icon(@c6, #fff, @c4); @preset-fonts-file: "build/fonts/defaults.less"; /* * The sections in this document roughly correspond to our theme style guide. */ // Global body background @page-background-color: @c1;
Viewing 15 lines of 20 lines. View entire code block.
done the same you did,
what i get is an error 500 and the preset panel blank
"Call to a member function toStyleString() on a non-object"
images attached
# concrete5 Version
Core Version - 5.7.5.9
Version Installed - 5.7.5.9
@main: #ffffff; @preset-name: "adriatic arena"; @preset-icon: concrete-icon(#333333, @main, #13522b); @preset-fonts-file: "build/fonts/adriaticarena.less";
what i get is an error 500 and the preset panel blank
"Call to a member function toStyleString() on a non-object"
images attached
# concrete5 Version
Core Version - 5.7.5.9
Version Installed - 5.7.5.9
Make it simple to find what's going wrong.
Comment out almost everything and then see what's causing the error.
Comment out almost everything and then see what's causing the error.
It's actually quite easy to test this yourself...