Intent to Prototype: CSS Nesting

888 views
Skip to first unread message

Steinar H. Gunderson

unread,
Oct 3, 2022, 10:55:29 AM10/3/22
to blin...@chromium.org
Contact emails: se...@chromium.org
Explainer: None

Specification: https://drafts.csswg.org/css-nesting

Summary: Add the ability to nest CSS style rules inside other style rules,
combining selectors from the outer with the inner rule for increasing
modularity and maintainability of style sheets.

Blink component: Blink>CSS

TAG review: None yet

Interoperability and Compatibility

Gecko: No signal yet (https://github.com/mozilla/standards-positions/issues/695)
WebKit: No signal yet (https://github.com/WebKit/standards-positions/issues/69)
Web developers: No signal yet

Debuggability: Nesting style rules will be a big change for editing and
displaying style rules in the inspector:

- Showing displaying nested rules for matching declarations
- Editing selectors
- Inserting nested rules
- etc...

Tracking issue for devtools support: https://crbug.com/1172985

Is this feature fully tested by web-platform-tests?
No

Requires code in //chrome?
False

Tracking bug: https://crbug.com/1095675

Estimated milestones: No milestones specified

Link to entry on the Chrome Platform Status:
https://chromestatus.com/feature/5800613594529792

/* Steinar */

Yoav Weiss

unread,
Oct 5, 2022, 3:59:56 AM10/5/22
to se...@google.com, se...@chromium.org, blin...@chromium.org
Exciting stuff!!

On Mon, Oct 3, 2022 at 4:55 PM 'Steinar H. Gunderson' via blink-dev <blin...@chromium.org> wrote:
Contact emails: se...@chromium.org
Explainer: None

Specification: https://drafts.csswg.org/css-nesting

Summary: Add the ability to nest CSS style rules inside other style rules,
combining selectors from the outer with the inner rule for increasing
modularity and maintainability of style sheets.

Blink component: Blink>CSS

TAG review: None yet

Interoperability and Compatibility

Gecko: No signal yet (https://github.com/mozilla/standards-positions/issues/695)

Worth prototyping! :)
 
WebKit: No signal yet (https://github.com/WebKit/standards-positions/issues/69)
Web developers: No signal yet

Debuggability: Nesting style rules will be a big change for editing and
displaying style rules in the inspector:

- Showing displaying nested rules for matching declarations
- Editing selectors
- Inserting nested rules
- etc...

Tracking issue for devtools support: https://crbug.com/1172985

Is this feature fully tested by web-platform-tests?
No

Requires code in //chrome?
False

Tracking bug: https://crbug.com/1095675

Estimated milestones: No milestones specified

Link to entry on the Chrome Platform Status:
https://chromestatus.com/feature/5800613594529792

/* Steinar */

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/YzrEmc%2BqlqPv72Au%40google.com.

Artur Janc

unread,
Oct 11, 2022, 11:56:15 AM10/11/22
to blink-dev, yoav...@chromium.org, blin...@chromium.org, se...@google.com, se...@chromium.org
I have one security-related question about this feature: how does CSS nesting interact with :visited selectors and the protections to avoid revealing the visitedness of links from https://dbaron.org/mozilla/visited-privacy?

I'm guessing that the solution from https://dbaron.org/mozilla/visited-privacy#algorithm (specifically, the second paragraph in that section) should still apply for nested selectors, but since this seems like a substantial feature I was wondering if you'd explicitly thought about this?

Thanks,
-Artur

Tab Atkins Jr.

unread,
Dec 13, 2022, 4:17:01 PM12/13/22
to Artur Janc, blink-dev, yoav...@chromium.org, se...@google.com, se...@chromium.org
On Tue, Oct 11, 2022 at 8:56 AM 'Artur Janc' via blink-dev
<blin...@chromium.org> wrote:
> I have one security-related question about this feature: how does CSS nesting interact with :visited selectors and the protections to avoid revealing the visitedness of links from https://dbaron.org/mozilla/visited-privacy?
>
> I'm guessing that the solution from https://dbaron.org/mozilla/visited-privacy#algorithm (specifically, the second paragraph in that section) should still apply for nested selectors, but since this seems like a substantial feature I was wondering if you'd explicitly thought about this?

Apologies that this didn't get answered, but the answer is just:
there's nothing special to worry about here. Nesting is essentially
syntax sugar for just writing out a bunch of rules yourself; it just
lets you avoid repetition of common sections of the selectors.

So, all the protections we do for :visited shouldn't be affected by this.

~TJ
Reply all
Reply to author
Forward
0 new messages