davesnx / styled-ppx

Type-safe styled components for ReScript, Melange and native with type-safe CSS
https://styled-ppx.vercel.app
BSD 2-Clause "Simplified" License
399 stars 32 forks source link

Support @container #422

Closed davesnx closed 2 weeks ago

davesnx commented 6 months ago

https://developer.mozilla.org/en-US/docs/Web/CSS/@container

After https://github.com/davesnx/styled-ppx/issues/357 we can implement container queries with same parsing rules

johnhaley81 commented 4 months ago

In lieu of this being supported, is there a way to inject a raw CSS string bypassing the parsing?

davesnx commented 4 months ago

There's no mechanism of bypassing the CSS parser, mostly because it would be difficult to design in menhir. That being said, AFAIK @container is easy to implement, and it's also true for other features, they are often easier/better to implement than have a bypassing method.

endlo commented 3 months ago

I could also use this - just ran into some weird styling with media queries on a component that are only there due to how it gets sized on the parent under certain widths, making it more difficult to share in places that have different behavior 😭

zakybilfagih commented 2 weeks ago

Supported #476 since v0.58.0