Comments (2)
Hi @Brianzchen yeah you're right in that we don't support runtime styles with the css
prop currently.
xcss
might be similar to what you're doing, and so could be worth checking out
The call stack error that Compiled gives is probably not ideal - will make a ticket to replace this with a more descriptive error
from compiled.
Drats! That's a shame, though as I was thinking about it over the weekend I realised what I'm asking for might be way too far fetched for a compile time framework without adding some sort of annotation to denote that it's used for styles.
Thanks for the heads up @dddlr, I've opted to use something else more runtime based and will optimise in other ways
from compiled.
Related Issues (20)
- Duplicated CSS rule in devloop if using SSR
- [ESLINT] @compiled/no-css-tagged-template-expression truncates URLs in CSS HOT 1
- Docs: Limitations & runtime styles HOT 5
- Order Media Queries HOT 6
- onFoundStyleRules is not called HOT 1
- Issue with jsx types
- Issue with package.json
- :has(:focus-visible) gives different and unexpected results to &:has(:focus-visible)
- Decide on long-term solution on ampersand in CSS selectors (e.g. `:hover` and `&:hover`) in `styled` and `css` APIs
- Throw clearer error when object property name is imported through barrel files HOT 1
- Support `as const` for object property names
- Next.js 13+ support? HOT 2
- Fails silently when Compiled APIs are used as values in style attribute
- Using object property (imported from CommonJS / CJS package) as media query results in failed build
- When using an object property in a media query, `as const` in the object definition causes build to fail
- Properties fall-through to wrapped DOM element when there are default values in the property declaration
- CSS Map has its output property types unexpectedly expanded at times HOT 1
- Types on `css={…}` don't block using the top-level object from `cssMap()` HOT 1
- Styles are lost after composing styled component and then using `as` prop HOT 1
- Passing a `css` output as a value to another `css` call fails with no type error (etc)
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 compiled.