- From: Adam Sobieski via GitHub <noreply@w3.org>
- Date: Mon, 23 Mar 2026 15:44:34 +0000
- To: public-css-archive@w3.org
AdamSobieski has just created a new issue for https://github.com/w3c/csswg-drafts:
== Attribute Selectors with CURIEs ==
With respect to [CURIE and safe-CURIE](https://www.w3.org/TR/curie/) attribute values:
```html
<html version="XHTML2"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:MR="http://www.example.org/roles/myRoles#">
<head profile="http://www.w3.org/1999/xhtml/vocab">
<title>An XHTML 2 document using Role</title>
</head>
<body>
<p role="MR:main">The main content</p>
<p role="MR:music">Some musical support for the page</p>
</body>
</html>
```
```html
<html version="XHTML2"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:MR="http://www.example.org/roles/myRoles#">
<head profile="http://www.w3.org/1999/xhtml/vocab">
<title>An XHTML 2 document using Role</title>
</head>
<body>
<p role="[MR:main]">The main content</p>
<p role="[MR:music]">Some musical support for the page</p>
</body>
</html>
```
In the event of interest in being able to select such attributes by their values for styling purposes, here is a proposed solution:
```css
p[role=url('http://www.example.org/roles/myRoles#main') curie] { ... }
```
and perhaps:
```css
@namespace mr url('http://www.example.org/roles/myRoles#');
p[role=url(mr|main) curie] { ... }
```
This approach would also work with attributes' values consisting of space-delimited lists of CURIEs and safe-CURIES:
```css
p[role~=url('http://www.example.org/roles/myRoles#main') curie] { ... }
```
and perhaps:
```css
@namespace mr url('http://www.example.org/roles/myRoles#');
p[role=~url(mr|main) curie] { ... }
```
Thank you. What do you think of this proposed approach? Are there any other syntax options to consider for these scenarios?
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13702 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 23 March 2026 15:44:35 UTC