JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q37936F
  • License MIT

A copy of styled-jsx@5.1.1 work where we manually added support for the new container queries.

Package Exports

  • styled-jsx-container
  • styled-jsx-container/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (styled-jsx-container) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

styled-jsx-container

!!! 0.1.x versions won't work, still figuring out why, will update to 1.0.0 once it's fully functionning. Actively working on it.

This is a copy of styled-jsx version 5.1.1 used by Nextjs@13.3.1 modified to support container queries. They are set to behave the same way media queries do. This is meant as a package to override the default dependency of Nextjs.

Getting started

Firstly, install the package:

npm install --save styled-jsx-container

Next, add styled-jsx-container/babel to plugins in your babel configuration:

{
  "plugins": ["styled-jsx-container/babel"]
}

The rest of the configuration and documentation will be the exact same as the original styled-jsx v5.1.1

PS: This package is made through a build from stylis. It's in fact stylis that doesn't support container queries. The modifications we made were directly applied to the result of that build directly in styled-jsx. The idea is to keep it static and deprecate this package as soon as stylis supports container queries. The build command won't do anything in this package.

Big thanks to Ange as he's the one who first figured out how to add the container query.