Comments (2)
Any known workarounds to be able to use container queries in stitches at all?
from stitches.
You can use container queries like other @
queries by just including it as a key, e.g.
css({
"@supports (display: grid)": {
// styles
},
"@container (min-width: 700px)" {
// styles
}
})
However, one problem I'm seeing is that https://github.com/stitchesjs/stitches/blob/2876c6fe835c4d499e87a8e53a5c586395e40358/packages/core/src/convert/toResolvedMediaQueryRanges.js is trying to manipulate the values, so sometimes you end up with an invalid query. For instance, the following input gets the following output:
css({
'@container (max-width < 200px)': {
color: 'red',
},
})
@container (max-max-width:199.9375px){color:red}
but you can still get usable queries if you choose values that work well with this rewriter. However, it'd be nice if it were updated to account for valid @container
queries.
from stitches.
Related Issues (20)
- Variants which contain numeric strings (e.g. "-12") and number keys (e.g. 12) are assigned a 'number' type when generating a union using the VariantProps type
- A Simplified Responsive Variants Api
- boxShadow isen't working when i use a color from my theme HOT 2
- Vendor prefix is stripped from WebkitBackgroundClip
- when using prefix, theme tokens in globalCSS aren't prefixed HOT 2
- Theme token not being parsed when overriding CSS prop (Next.js) HOT 1
- styled components not passing variants
- please consider using css string props like emotion HOT 2
- Is this project dead? HOT 2
- Chat about the future for stitches HOT 44
- When a responsive variant matches the @initial variant, the initial one is not applied. HOT 1
- reset function returned from createStitches is not in docs
- costum propreties like variants and sizes : example costum proprety
- export type of `css` function HOT 2
- (Feature request): Ability for child element to opt out of theme
- Dynamic props in styled
- Project Dead? HOT 1
- How to add `!important` automatically HOT 1
- Not compatible with `moduleResolution: "Bundler"`
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 stitches.