Comments (4)
I know it is not the way but cant you change the "each" function with oldschool way?
@iterations: 100;
// helper class, will never show up in resulting css
// will be called as long the index is above 0
.loopingClass (@index) when (@index > 0) {
// create the actual css selector, example will result in
// .myclass_30, .myclass_28, .... , .myclass_1
(~".span@{index}") {
// your resulting css
width: percentage((@index - 1) *0.01);
}
// next iteration
.loopingClass(@index - 1);
}
// "call" the loopingClass the first time with highest value
.loopingClass (@iterations);
from less.php.
Did you find a workaround? Same issue here.
from less.php.
No yet, unfortunately.
from less.php.
Minimal test case:
// https://github.com/FortAwesome/Font-Awesome/blob/6.4.2/less/_variables.less
@fa-css-prefix : fa;
@fa-size-scale-sm : 14;
@fa-size-scale-lg : 20;
@fa-size-scale-xl : 24;
.fa-sizes() {
sm : @fa-size-scale-sm;
lg : @fa-size-scale-lg;
xl : @fa-size-scale-xl;
}
// https://github.com/FortAwesome/Font-Awesome/blob/6.4.2/less/_mixins.less
.fa-size(@font-size) {
line-height: (1 / @font-size) * 1em;
}
each(.fa-sizes(), {
.@{fa-css-prefix}-@{key} {
.fa-size(@value);
}
});
http://ecomfe.github.io/est/fiddle/#version=3.6.0&autoprefix=false&est=false&autorun=false
On Less.js 3.6.0:
Syntax error: Function 'each' is undefined
Line 17: each(.fa-sizes(), {
On Less.js 3.7.0:
.fa-sm {
line-height: 0.07142857em;
}
.fa-lg {
line-height: 0.05em;
}
.fa-xl {
line-height: 0.04166667em;
}
from less.php.
Related Issues (20)
- PHP 8.2 Creation of dynamic property warning HOT 2
- Tree_Javascript or Tree_JavaScript? HOT 6
- Allowed memory limit exceeded when unserializing cache. HOT 4
- Support `@property` rule (Less.js 3.x)
- Block comments in @font-face are moved to bottom of selector HOT 3
- Regression in v4.2.0 HOT 6
- Regression: CSS output differs from Less.js for mixin selector HOT 3
- Undefined array key "currentUri" in [...]Mapped.php Line 68 when using @import (inline) HOT 1
- Release v3.2.0 HOT 2
- PHP v5.6-7.0 deprecation HOT 1
- Cannot assign em or rem value to less variable. HOT 2
- Support @container queries (Less.js 4.2.0) HOT 1
- Import from google font HOT 3
- Deprecation warning in PHP 8.2 HOT 6
- if $cached_name is the same as the $compiled name, should not regenerate HOT 1
- Error in Compiling HOT 2
- @container queries support? HOT 2
- Support CSS4 space-separated syntax for rgba() function (Less.js 3.8.1) HOT 1
- Autoloading can fail due to incorrect class name casing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from less.php.