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

Add more Caniuse keys #2476

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Add more Caniuse keys #2476

wants to merge 7 commits into from

Conversation

jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Dec 19, 2024

I confirmed that versions match

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Dec 19, 2024
Copy link
Contributor

@captainbrosset captainbrosset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these!
I have two comments, which are more questions/thoughts than things to fix. That's why I'm not setting the "request changes" state here. Let me know what you think about those two.

@@ -2,6 +2,8 @@ name: Safe area inset environment variables
description: The `safe-area-inset-` CSS environment variables represent a rectangle that cannot cut off content within a non-rectangular screen. For example, `top:\ env(safe-area-inset-top);` positions the top of an element below the notch on an iPhone.
spec: https://drafts.csswg.org/css-env-1/#safe-area-insets
group: environment-variables
# Caniuse is for env(), but this currently is the only supported value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also titlebar-area-x/y/width/height, so safe-area-inset isn't the only variable that's supported in env(). I believe there may also be some virtual keyboard variables too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I misremembered the support on title-bar-area-*. I still think this is a valid mapping since it was the first one (and I updated the comment).

@@ -2,6 +2,7 @@ name: Named colors
description: Some CSS color values can be referenced by name, such as `red` or `limegreen`. They stand in for specific RGB color values.
spec: https://drafts.csswg.org/css-color-4/#named-colors
group: color-types
caniuse: css-rebeccapurple
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there also a caniuse entry for named colors? If not, is it ok to only have a caniuse entry that corresponds to a sub-part of our feature, or is there a risk that this would be confusing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not a caniuse entry for named colors. It's a valid question, though. For the main use case of caniuse adding a Baseline banner to rebeccapurple, it would not be confusing. But are there other potential uses of a caniuse key that this would break?

Copy link
Collaborator Author

@jamesnw jamesnw Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our docs say Setting a caniuse value says that a feature is approximately equivalent to or a superset of a Can I Use feature. Since named-colors contains rebeccapurple on web-features, this is okay. I'll open a separate PR with another set of similar situations I identified, but in many cases, it looks like the subfeature that caniuse has as a standalone feature has a distinct support story.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going back through my list, most of the superset features have significant discrepancies, so I ended up just adding caniuse for display, events, and font-kerning on this branch. Apologies for adding after the approval!

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.

2 participants