Skip to content

Allow overlapping BCD keys #2891

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Apr 23, 2025

Note: Don't merge this without confirming with me first. I want to show this PR to MDN in a meeting Thursday, April 23, 2025, before merging. I'll strike out this message when that's done.

This PR allows BCD keys to exist in multiple features and it demonstrates the capability with a single key, css.properties.text-wrap-style.pretty.

css.properties.text-wrap-style.pretty already exists in text-wrap-style. This PR adds the key to a second feature, text-wrap-pretty. This seems pretty logical to me: text-wrap-style shows support for the property in general, where text-wrap-pretty represents the specific value of pretty, which you might use in two properties.

Up to now, we've enforced (but never documented) a limitation that a key can only be in one feature at a time. Last I talked to MDN—the original objector to key duplication—were open to allowing keys to span features. It seems like it'd be nice to introduce this to a single, low-risk pair of features before extending the practice elsewhere.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Apr 23, 2025
@ddbeck ddbeck added the blocked Blocked waiting for something external label Apr 23, 2025
@foolip
Copy link
Collaborator

foolip commented Apr 25, 2025

It would be good to use another feature as the first one, since I'd like to fix #2543 at some point and probably remove some of the features.

I think a very safe and old case to pioneer with is HTMLModElement as part of both <ins> and <del>.

@ddbeck
Copy link
Collaborator Author

ddbeck commented Apr 25, 2025

Over in #1173 (comment), I recapped the discussion on this concept (overlapping keys) from the WebDX call this week.

Concretely, I need to incorporate a few updates here:

  • Allowlisting overlapping keys, so we can't overlap keys unintentionally
  • Documenting authoring guidelines, so we know when to overlap keys
  • Documenting expectations for consumers, so they know how to interpret this data sensibly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked waiting for something external feature definition Creating or defining new features or groups of features.
Projects
None yet
2 participants