Skip to content

Manually set the support status of advanced attr() #3160

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

foolip
Copy link
Collaborator

@foolip foolip commented Jul 17, 2025

There is no BCD entry for attr() working outside of the content property for pseudo-elements, so this is the only way right now.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Jul 17, 2025
@foolip
Copy link
Collaborator Author

foolip commented Jul 17, 2025

I asked @tursunova about this and she found that I'm just wrong here. https://bugs.webkit.org/show_bug.cgi?id=26609 and https://bugzilla.mozilla.org/show_bug.cgi?id=435426 remain open, so only Chromium supports attr() as defined by attr.yml here in web-features:

The attr() CSS function, in the context of any property, returns the value of an attribute of an HTML element, with the option to return it as a specific type or unit. You can set a default value for missing or invalid attributes.

Since there doesn't seem to be anything in BCD matching what we need, I guess we'll need to write a custom support statement.

There is no BCD entry for attr() working outside of the content
property for pseudo-elements, so this is the only way right now.
@foolip foolip changed the title Pin advanced attr() support to the <fallback> syntax Manually set the support status of advanced attr() Jul 17, 2025
@foolip
Copy link
Collaborator Author

foolip commented Jul 17, 2025

I've updated this PR to manually set the status. But @tursunova also asks if we should drop <fallback> here? None of the BCD entries here correspond to the important behavior that developers have been asking for, so I could see the argument for making this a BCD-free entry. @ddbeck WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant