-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support for LESS asset type #11
Conversation
It's been many years since I last used Less myself. @julien-deramond maybe you could have a look at the PR too? |
I've never used Less nor this project, but I'll try to help anyway. My manual tests show that from the same icons folder, using Less, Sass or CSS options generates more or less the same final Here are the steps I used.
Generation by default
Content of the @font-face {
font-display: block;
font-family: "icons";
src: url("./icons.eot?968fcdae2a73d0d6a6ea3bb95db6543f#iefix") format("embedded-opentype"),
url("./icons.woff2?968fcdae2a73d0d6a6ea3bb95db6543f") format("woff2"),
url("./icons.woff?968fcdae2a73d0d6a6ea3bb95db6543f") format("woff");
}
i[class^="icon-"]::before, i[class*=" icon-"]::before {
font-family: icons !important;
font-style: normal;
font-weight: normal !important;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-logo::before {
content: "\f101";
} Generation with Less
Generated @font-face {
font-display: block;
font-family: "icons";
src: url("./icons.eot?968fcdae2a73d0d6a6ea3bb95db6543f#iefix") format("embedded-opentype"), url("./icons.woff2?968fcdae2a73d0d6a6ea3bb95db6543f") format("woff2"), url("./icons.woff?968fcdae2a73d0d6a6ea3bb95db6543f") format("woff");
}
i[class^="icon-"]::before,
i[class*=" icon-"]::before {
font-family: icons !important;
font-style: normal;
font-weight: normal !important;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-logo::before {
content: "\f101";
} By using the following <html>
<head>
<link href="./icons.css" rel="stylesheet"/>
</head>
<body>
<i class="icon icon-logo" width="100" height="100"></i>
</body>
</html> Tried the same approach with a more complex folder, and it works too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the manual tests and the code that is really close to the one dedicated to Sass for instance, everything's LGTM! Thanks for the PR @ernstc
🎉 This PR is included in version 2.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Added support for generating LESS asset type (https://lesscss.org/)