- From: Una Kravets via GitHub <noreply@w3.org>
- Date: Thu, 24 Jul 2025 15:09:07 +0000
- To: public-css-archive@w3.org
CSS can use attributes as a selector. This demo could also be written as:
```css
.card {
border: 1px solid gray;
grid-column: 3;
background-color: #f7f7f7;
}
.card[data-status="pending"] {
border-color: royalblue;
background-color: #eff7fa;
grid-column: 1;
}
.card[data-status="complete"] {
border-color: seagreen;
background-color: #f6fff6;
grid-column: 2;
}
```
Is this what you are asking about?
--
GitHub Notification of comment by una
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12519#issuecomment-3113844407 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 24 July 2025 15:09:08 UTC