Skip to content
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

Watch for CSS when/else conditionals [🟥 awaiting full support] #2262

Open
chrisblakley opened this issue Sep 19, 2023 · 0 comments
Open
Labels
Frontend (Style) Related to the client-side CSS (or Sass)
Milestone

Comments

@chrisblakley
Copy link
Owner

Allows for conditional rules to be used within native CSS.

Simple example:

.container {
    width: 80%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 1rem;
    @when element(max-width: 400px) {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
}

https://caniuse.com/css-when-else

Screen Shot 2023-09-19 at 5 26 25 PM

@chrisblakley chrisblakley added the Frontend (Style) Related to the client-side CSS (or Sass) label Sep 19, 2023
@chrisblakley chrisblakley added this to the 12.0 Flame milestone Sep 19, 2023
@chrisblakley chrisblakley modified the milestones: 12.0 Flame, 13.0 Bubble May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend (Style) Related to the client-side CSS (or Sass)
Projects
None yet
Development

No branches or pull requests

1 participant