I have main all.less
file, where I'm including all other less files
e.g.
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
@import "homepage.less";
So my question is.
Is it possible to get"homepage.less"
only in homepage (importing it in all.less
).
Please Note that I don't want to attach it directly in the html file.
Thanks
On your homepage use:
<body class="homepage">
And then in your Less files:
.homepage {
@import "homepage.less";
}
The above still compiles all your code in a single file. Your compiled CSS code will have a larger number of bytes, but you can cache the same file for all your pages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With