Comments (3)
Hey @LouisaNikita, is there any chance you can post the load order of your postcss plugins?
That might help identify the issue, as you (should) be able to do this.
from postcss-for.
I ran into this error today with a Nuxt site. Works locally, but on Netlifty it errors out at build:
3:09:39 PM: ERR! JisonLexerError: Lexical error on line 1: Unrecognized text.
3:09:39 PM: ERR!
3:09:39 PM: ERR! Erroneous area:
3:09:39 PM: ERR! 1: $(i) * 40ms
3:09:39 PM: ERR! ^..^
3:09:39 PM: ERR! at /opt/build/repo/components/PanelMenu.vue:99:21
3:09:39 PM: ERR! at Object.parseError (/opt/build/repo/node_modules/postcss-calc/dist/parser.js:1200:15)
3:09:39 PM: ERR! at Object.lexer_parseError [as parseError] (/opt/build/repo/node_modules/postcss-calc/dist/parser.js:2333:44)
Because of this code:
/* Stagger animate menu items */
@for $i from 1 to 50 {
.menu-item:nth-child($(i)) {
transition-delay: calc($(i) * 40ms);
}
}
Using @nuxt/postcss8
, and my plugin order is:
postcss: {
plugins: {
"postcss-for": {},
"postcss-nested": {},
"postcss-custom-media": {},
"postcss-hexrgba": {},
},
},
from postcss-for.
I managed to get a successful deploy by just changing the syntax to this:
@for $i from 1 to 50 {
.menu-item:nth-child($(i)) {
--index: $(i);
transition-delay: calc(var(--index) * 40ms);
}
}
from postcss-for.
Related Issues (18)
- Simplier intervals HOT 3
- By keyword
- Why variable to cannot be used as a range parameter? HOT 5
- Support for :root variables? HOT 2
- Example doesn't work HOT 1
- support for nested loops? HOT 2
- Usage of removeSelf causes deprecation warnings
- support negative numbers HOT 2
- Compiling Same styles classes together HOT 1
- Regression in 2.1.0 HOT 1
- Feature Request: Support for...in loop HOT 2
- nth-of-type(($i)n) and $(i+1) not work well
- loop-error occurs (Module build failed: Undefined variable $i) HOT 4
- Compatibility with PostCSS 8 HOT 1
- Not calculating i+1
- margin align css output
- Compatibility with tailwind 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 postcss-for.