-
Notifications
You must be signed in to change notification settings - Fork 58
feat(docs): Add CSS Variables page #3301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ouds/main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for boosted ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
||
| ## Grid breakpoints | ||
|
|
||
| While we include our grid breakpoints as CSS variables (except for `xs`), be aware that **CSS variables do not work in media queries**. This is by design in the CSS spec for variables, but may change in coming years with support for `env()` variables. Check out [this Stack Overflow answer](https://stackoverflow.com/a/47212942) for some helpful links. In the meantime, you can use these variables in other CSS situations, as well as in your JavaScript. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| While we include our grid breakpoints as CSS variables (except for `xs`), be aware that **CSS variables do not work in media queries**. This is by design in the CSS spec for variables, but may change in coming years with support for `env()` variables. Check out [this Stack Overflow answer](https://stackoverflow.com/a/47212942) for some helpful links. In the meantime, you can use these variables in other CSS situations, as well as in your JavaScript. | |
| While we include our grid breakpoints as CSS variables (except for `2xs`), be aware that **CSS variables do not work in media queries**. This is by design in the CSS spec for variables, but may change in coming years with support for `env()` variables. Check out [this Stack Overflow answer](https://stackoverflow.com/a/47212942) for some helpful links. In the meantime, you can use these variables in other CSS situations, as well as in your JavaScript. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a comprehensive CSS Variables documentation page to the OUDS Web documentation, closing issue #2589 which tracks functional equivalence to Boosted. The page documents CSS custom properties, their usage, and patterns for customization.
Changes:
- Added complete CSS Variables documentation page with sections on root variables, component variables, prefix customization, SVG deduping, examples, focus-visible variables, and grid breakpoints
- Enhanced the Code component to support multiple regex matches using the global flag and joining results
- Removed draft status from CSS Variables page in the sidebar navigation
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| site/src/content/docs/foundation/css-variables.mdx | New documentation page covering CSS custom properties including root variables for light/dark modes, component variables, prefix configuration, and usage examples |
| site/src/components/shortcodes/Code.astro | Modified regex matching to support global flag and join multiple matches, enabling display of multiple CSS blocks from the same file |
| site/data/sidebar-getting-started.yml | Removed draft flag from CSS variables page to make it visible in navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Vincent Prothais <vincent.prothais@orange.com>
Related issues
Closes #2589
Description
Add the CSS variables page to the doc
Checklists
Progression (for Core Team only)
ouds/mainfollowing conventional commitLive previews