Created
May 16, 2025 17:41
-
-
Save tak-dcxi/315c925c8b154ae97acd74eecb8fcad5 to your computer and use it in GitHub Desktop.
Container Query Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "container": { | |
| "prefix": "container", | |
| "body": [ | |
| "--_container-size-min: $1;", | |
| "--_container-size-max: $2;", | |
| "--_to-cqi-min: calc(tan(atan2(1px, var(--_container-size-min))) * 100cqi);", | |
| "--_to-cqi-max: calc(tan(atan2(1px, var(--_container-size-max))) * 100cqi);", | |
| "container: $3 / inline-size;", | |
| "@container style(--debug: true) {", | |
| "\toverflow-x: auto;", | |
| "\tresize: inline;", | |
| "}" | |
| ] | |
| }, | |
| "cqi-min": { | |
| "prefix": "cqi-min", | |
| "body": ["calc($1 * var(--_to-cqi-min))"] | |
| }, | |
| "cqi-max": { | |
| "prefix": "cqi-max", | |
| "body": ["calc($1 * var(--_to-cqi-max))"] | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment