Comments (10)
@isBatak I just found it,
it generates 2 css vars for the shadow but one without any class
{
--shadows-e1: 0px 1px 2px rgba(0, 0, 0, .3), 0px 1px 3px 1px rgba(0, 0, 0, .15);
--shadows-e2: 0px 1px 2px rgba(0, 0, 0, .3), 0px 2px 6px 2px rgba(0, 0, 0, .15);
--shadows-e3: 0px 4px 8px 3px rgba(0, 0, 0, .15), 0px 1px 3px rgba(0, 0, 0, .3);
--shadows-e4: 0px 6px 10px 4px rgba(0, 0, 0, .15), 0px 2px 3px rgba(0, 0, 0, .3);
--shadows-e5: 0px 8px 12px 6px rgba(0, 0, 0, .15), 0px 4px 4px rgba(0, 0, 0, .3)
}
.dark{
--shadows-e1: 0px 1px 3px 1px rgba(0, 0, 0, .15), 0px 1px 2px rgba(0, 0, 0, .3);
--shadows-e2: 0px 2px 6px 2px rgba(0, 0, 0, .15), 0px 1px 2px rgba(0, 0, 0, .3);
--shadows-e3: 0px 4px 8px 3px rgba(0, 0, 0, .15), 0px 1px 3px rgba(0, 0, 0, .3);
--shadows-e4: 0px 6px 10px 4px rgba(0, 0, 0, .15), 0px 2px 3px rgba(0, 0, 0, .3);
--shadows-e5: 0px 8px 12px 6px rgba(0, 0, 0, .15), 0px 4px 4px rgba(0, 0, 0, .3)
}
and the first part is already exists under the root
selector
from panda.
one more thing I just noticed inside the generated index.css, that the last line of all generated css vars are missing a semicolon
This is how PostCSS stringifier works https://github.com/postcss/postcss/blob/main/lib/stringifier.js and Panda is using the same one. Also, ;
is just a separator so omitting the last one is a valid CSS Syntax Module Level 3, judging by this conversation https://stackoverflow.com/questions/11062615/will-css-3-still-allow-omitting-final-semicolons. Honestly, I could not find a correct explanation in the specification but I checked it with the validator and it's valid syntax. So I would not bother with it.
Btw I'm working on other issues you mentioned. It's quite complex issue but I have a feeling I'm pretty close to the solution :D
from panda.
@isBatak thank you for the explanation.
Tbh, I get a warning fron vitejs each time I build the app, but since it's fine I can just ignore it
from panda.
@omarkhatibco can you share the warning?
from panda.
@isBatak
here is the error:
I know this is not helpful, so here is the repo: https://github.com/omarkhatibco/pandacss-test
just run pnpm build
from panda.
I would not say it's because of ;
... I'm more suspicious of this part
{
--shadows-e1: 0px 1px 2px rgba(0, 0, 0, 0.3);
}
{
--shadows-e1: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
}
from panda.
@omarkhatibco Could you try this instead of array
e1: {
value: {
base: '0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px 1px rgba(0, 0, 0, 0.15)',
_dark: '0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px rgba(0, 0, 0, 0.3)',
},
},
from panda.
@isBatak, yup this solved the problem in line 463
from panda.
@omarkhatibco what about line 455?
Also, my suggestion is just a workaround and test to confirm that issue is not in in the ;
.
Array syntax should also work... I'm writing a test as we speak.
from panda.
@isBatak the error in line 455 is still here, I'm trying to know which one is that, but yeah array syntax was broken and I forget to open a ticket
from panda.
Related Issues (20)
- `WebkitBoxOrient` is not a valid key in `SystemStyleObject` HOT 5
- Opacity modifier typing error for strictTokens HOT 1
- [TOKENS] SVG asset is not closed properly HOT 2
- Nuxt: Segmentation Falt
- Jest error with `styled-system` directory HOT 4
- SVG Assets not correctly escaped HOT 1
- _dark nested in _backdrop will output wrong class name, and caused trivial problem HOT 2
- Error After upgrading to `v0.32.0` or `v0.32.1` from `v0.31.0` HOT 2
- Hooks `tokens:created` dont work when extending a preset HOT 1
- Broken "include src files" link in "Using Panda in a Component Library" guide
- need panda mangle to avoid copy paster HOT 1
- Utilities generate wrong CSS when usage with presets HOT 2
- _after property not working as intended. HOT 2
- support px to rem? HOT 1
- Support Style Props for Svelte HOT 1
- Wrong "missing token" warning when using nested tokens
- Semantic tokens break tokens completely HOT 4
- Jest encountered an unexpected token
- Code completion issues in Webstorm
- cva not extracting css in 0.33.0 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 panda.