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

CSS Nesting #420

Closed
3 tasks done
CanadaHonk opened this issue Sep 14, 2023 · 11 comments
Closed
3 tasks done

CSS Nesting #420

CanadaHonk opened this issue Sep 14, 2023 · 11 comments
Labels
focus-area-proposal Focus Area Proposal

Comments

@CanadaHonk
Copy link

CanadaHonk commented Sep 14, 2023

Description

CSS Nesting is currently supported by all engines but they have varying implementations (from different spec snapshots).

Specification

https://www.w3.org/TR/css-nesting-1/

Open Issues

// todo

Tests

https://wpt.fyi/results/css/css-nesting

Current Implementations

  • Blink
  • Gecko
  • WebKit

Standards Positions

Gecko: mozilla/standards-positions#695
WebKit: WebKit/standards-positions#69

Browser bug reports

Chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1095675
Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=1648037
WebKit: https://bugs.webkit.org/show_bug.cgi?id=223497

Developer discussions

Seen some discussion online of Gecko and Blink having different implementations (from varying spec at the time), seems to cause confusion with nesting.

Polls & Surveys

State of CSS 2023: https://2023.stateofcss.com/en-US/features/

88% of people are aware of CSS Nesting and 26% of people use it

Existing Usage

https://chromestatus.com/metrics/feature/timeline/popularity/4372 (this seems odd?)

Workarounds

Use a preprocessor like PostCSS.

Accessibility Impact

N/A

Privacy Impact

N/A

Other

@CanadaHonk CanadaHonk added the focus-area-proposal Focus Area Proposal label Sep 14, 2023
@foolip
Copy link
Member

foolip commented Oct 5, 2023

For survey data and web developer demand, in State of CSS 2023, CSS Nesting was a very common answer to the question "Are there any existing CSS features that you have difficulties using (or avoid altogether) because of lack of support, or differences between browsers?"

Also, in preliminary results from State of HTML 2023, CSS Nesting was a somewhat common response to the freeform question "Which existing HTML features or browser APIs are you unable to use because of browser differences or lack of support?" To answer CSS Nesting was to ignore the scope of the question, but it says something nevertheless.

@andruud
Copy link

andruud commented Oct 10, 2023

We'd need to also include these tests:

css/css-syntax/var-with-blocks.html
css/css-syntax/trailing-braces.html
css/css-syntax/custom-property-rule-ambiguity.html

@andruud
Copy link

andruud commented Oct 23, 2023

Seen some discussion online of Gecko and Blink having different implementations (from varying spec at the time), seems to cause confusion with nesting.

@CanadaHonk Was this confusion related to relaxed nesting not being supported in all browsers? Or was it something else?


I'm trying to figure out which aspects of css-nesting we need to focus on. In particular, we can not look at the current set of WPTs and assume that they cover what they need to cover.

Also, we're now (apparently) going to change some fundamental parts of css-nesting, although we're not sure how yet. This would make sense to include as well, but we probably need to first confirm that we indeed can make this change at all.

@andruud
Copy link

andruud commented Oct 23, 2023

We should probably ensure that we have a WPT for :is(:host) (via &) (w3c/csswg-drafts#9509) and include that in the list. (cc @emilio)

@emilio
Copy link

emilio commented Oct 23, 2023

I have some in https://bugzilla.mozilla.org/show_bug.cgi?id=1850974

@CanadaHonk
Copy link
Author

Was this confusion related to relaxed nesting not being supported in all browsers?

Yes.

If the spec is not clear, this might have to get delayed until 2025? Or maybe focus on the parts which are stable?

@andruud
Copy link

andruud commented Oct 24, 2023

We could at least include the relaxed nesting part. All known issues related to that are resolved and tested by WPTs.

@andruud
Copy link

andruud commented Nov 15, 2023

I suggest that we only include tests from these two relevant sub-areas:

  • Relaxed nesting.
  • :host within :is() (which automatically transfers over to nesting).

In other words:

// Relaxed nesting
css/css-nesting/nesting-type-selector.html
css/css-nesting/implicit-nesting-ident.html
css/css-nesting/implicit-nesting-ident-recovery.html
css/css-syntax/custom-property-rule-ambiguity.html
css/css-syntax/trailing-braces.html
css/css-syntax/var-with-blocks.html

// :is(:host)
css/css-nesting/host-nesting-001.html
css/css-nesting/host-nesting-002.html
css/css-nesting/host-nesting-003.html
css/css-nesting/host-nesting-004.html
css/css-nesting/host-nesting-005.html
css/css-scoping/host-is-001.html
css/css-scoping/host-is-002.html
css/css-scoping/host-is-003.html
css/css-scoping/host-is-004.html
css/css-scoping/host-is-005.html

Deliberately not included, regardless of the current interop situation in wpt.fyi:

  • Anything related to serialization.

foolip added a commit to foolip/wpt that referenced this issue Nov 28, 2023
@andruud

This comment was marked as resolved.

foolip added a commit to foolip/wpt that referenced this issue Dec 18, 2023
foolip added a commit to web-platform-tests/wpt that referenced this issue Dec 18, 2023
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Dec 21, 2023
…estonly

Automatic update from web-platform-tests
Map even more tests to web-features (#43390)

The list of tests for nesting are from here:
web-platform-tests/interop#420 (comment)
--

wpt-commits: 6495c91853a3cf028a401cf4d228fc0b6a5465e4
wpt-pr: 43390
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this issue Dec 22, 2023
…estonly

Automatic update from web-platform-tests
Map even more tests to web-features (#43390)

The list of tests for nesting are from here:
web-platform-tests/interop#420 (comment)
--

wpt-commits: 6495c91853a3cf028a401cf4d228fc0b6a5465e4
wpt-pr: 43390
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Jan 1, 2024
…estonly

Automatic update from web-platform-tests
Map even more tests to web-features (#43390)

The list of tests for nesting are from here:
web-platform-tests/interop#420 (comment)
--

wpt-commits: 6495c91853a3cf028a401cf4d228fc0b6a5465e4
wpt-pr: 43390

UltraBlame original commit: a52295e0345c455a8beb63d8aa3a1b39dab52e6b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Jan 1, 2024
…estonly

Automatic update from web-platform-tests
Map even more tests to web-features (#43390)

The list of tests for nesting are from here:
web-platform-tests/interop#420 (comment)
--

wpt-commits: 6495c91853a3cf028a401cf4d228fc0b6a5465e4
wpt-pr: 43390

UltraBlame original commit: a52295e0345c455a8beb63d8aa3a1b39dab52e6b
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Jan 1, 2024
…estonly

Automatic update from web-platform-tests
Map even more tests to web-features (#43390)

The list of tests for nesting are from here:
web-platform-tests/interop#420 (comment)
--

wpt-commits: 6495c91853a3cf028a401cf4d228fc0b6a5465e4
wpt-pr: 43390

UltraBlame original commit: a52295e0345c455a8beb63d8aa3a1b39dab52e6b
@wpt-interop
Copy link
Collaborator

This proposal has been accepted as part of Interop 2024! On behalf of the entire Interop team, thank you for proposing it. You’ll be able to track progress on this topic throughout the year via the Interop 2024 dashboard.

@zcorpan
Copy link
Member

zcorpan commented Feb 1, 2024

Thank you for proposing CSS Nesting for inclusion in Interop 2024.

We are pleased to let you know that this proposal was accepted as part of the CSS Nesting focus area. You can follow the progress of this focus area on the Interop 2024 dashboard.

For an overview of our process, see the proposal selection. Thank you for contributing to Interop 2024!

Posted on behalf of the Interop team.

@zcorpan zcorpan closed this as completed Feb 1, 2024
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this issue Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus-area-proposal Focus Area Proposal
Projects
Status: Done
Development

No branches or pull requests

6 participants