You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a large multi section site that has a shared visual language (icons, component widths, fonts etc) that I want to include into something like a shared.css.
After that, I want to write specific rules for different section's stylesheets (Section A, Section B etc), but utilise the shared mixins.
I can import a mixin-variable.less type file at the top of the SectionA.css and SectionB.css, but then all the mixin definitions are duplicated, as they appear at the top of shared.css also.
Has anybody got any cunning ideas on how to get around this?
Cheers
Rob
The text was updated successfully, but these errors were encountered:
Create a file, website.less, that imports your mixins-variable.less and all your other style sheets. When your file gets compiled into CSS, you'll end up with 1 CSS and no duplicate code; this is the approach I have taken for the exact same case your described. The only note that I have for you is that we're using the command line tool lessc to compile our CSS file.
Hi,
This issue is similar to #49
However my situation is slightly different:
I have a large multi section site that has a shared visual language (icons, component widths, fonts etc) that I want to include into something like a shared.css.
After that, I want to write specific rules for different section's stylesheets (Section A, Section B etc), but utilise the shared mixins.
I can import a mixin-variable.less type file at the top of the SectionA.css and SectionB.css, but then all the mixin definitions are duplicated, as they appear at the top of shared.css also.
Has anybody got any cunning ideas on how to get around this?
Cheers
Rob
The text was updated successfully, but these errors were encountered: