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)
- JSX styles disappear after either a hot reload or navigation HOT 2
- mergeConfigs esbuild warning on panda codgen (@pandacss/config) HOT 1
- CSS class is not generated if style object passed as props HOT 2
- PandaCSS' postcss dependency conflicts with vite's postcss dependency HOT 1
- Use recipe.raw within a style object / css function to generate styles
- "Conditional" is not exported by "src/styled-system/types/conditions.d.ts", imported by "src/styled-system/types/prop-type.d.ts". HOT 1
- Wrong callout for `Border Width` section HOT 1
- `jsxFramework: "preact"` includes unused `mergeCss` import HOT 1
- `backdropFilter` token generated by lightningcss is invalid
- Animation name autocompletion not working with custom keyframes
- 0.38.0 css runtime function missing `SystemStyleObject[]` for the css prop
- Deduplicate CSS variables created from color tokens HOT 2
- Issue with Panda CSS Generating Extra Tokens
- Add turbopack support on NextJS App
- Type error when merging imported styles HOT 2
- Explanation of "Targeting slots" has incorrect description.
- Panda config `jsxFactory` cause error HOT 1
- Feature: Have the ability to change the order of statically-generated styles
- "panda init -p" fails with "Missing script: "panda"" on fresh npx create-next-app HOT 1
- "pnpm panda init --postcss" fails with "Could not resolve "@pandacss/dev""
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.