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 progress to accent elements list #10646

Merged
merged 3 commits into from
Nov 23, 2021
Merged

add progress to accent elements list #10646

merged 3 commits into from
Nov 23, 2021

Conversation

dev-nicolaos
Copy link
Contributor

Summary

Adds the HTML <progress> element to the list of elements that may make use of the CSS accent-color property.

Motivation

Inform people who might be learning about accent-color that it can be used for <progress> elements.

Supporting details

https://drafts.csswg.org/css-ui/#propdef-accent-color
https://web.dev/accent-color/#supported-elements

Related issues

None that I could find

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@dev-nicolaos dev-nicolaos requested a review from a team as a code owner November 19, 2021 20:38
@dev-nicolaos dev-nicolaos requested review from ddbeck and removed request for a team November 19, 2021 20:38
@github-actions github-actions bot added the Content:Glossary Glossary entries label Nov 19, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2021

Preview URLs

Flaws

None! 🎉

External URLs

URL: /en-US/docs/Glossary/accent
Title: accent
on GitHub

No new external URLs

(this comment was updated 2021-11-22 19:47:43.889862)

Copy link
Collaborator

@wbamberg wbamberg 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 this PR!

You've linked to the spec, but I don't see where in the spec supported elements are listed. Am I missing it here? Or is this just the implementation status of Firefox and Chrome? (not saying this isn't useful information, but it makes a difference to how we might express it)

Also (though I appreciate it wasn't introduced in this PR) I don't think this list of "HTML elements that may have an accent" should be listed in the "accent" glossary page at all. That page should just say:

  • what an accent color is
  • the fact that it can be set in CSS using accent-color

We should document "the set of HTML elements that can be styled using accent-color" in the page for accent-color: https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color. Probably by removing the sentence "An accent appears in elements such as of type="checkbox", or type="radio"." and adding a new bit under the interactive example that lists supported elements.

If this set is not determined by the specification maybe it could say something like "Browsers that support accent-color currently apply it to the following HTML elements:"

@dev-nicolaos
Copy link
Contributor Author

You've linked to the spec, but I don't see where in the spec supported elements are listed. Am I missing it here? Or is this just the implementation status of Firefox and Chrome? (not saying this isn't useful information, but it makes a difference to how we might express it)

According to the spec, this property can be applied to "all elements", though I think that just means its valid CSS and not necessarily that it will have any effect.

image

Beyond that the only element mentioned by the spec is radio buttons, and that is just used as an example. The way I read it, the spec doesn't mandate any list elements browsers are required to use accent-color for, rather it outlines how a browser should make use of the property when it does choose to apply it to an element. My guess is this is why the current list has the heading HTML elements that may have an accent, because it is left up to the browser which elements to implement it for.

If this set is not determined by the specification maybe it could say something like "Browsers that support accent-color currently apply it to the following HTML elements:"

Yeah IMO that's a clearer heading.

Also (though I appreciate it wasn't introduced in this PR) I don't think this list of "HTML elements that may have an accent" should be listed in the "accent" glossary page at all. That page should just say:

  • what an accent color is
  • the fact that it can be set in CSS using accent-color

We should document "the set of HTML elements that can be styled using accent-color" in the page for accent-color: https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color. Probably by removing the sentence "An accent appears in elements such as of type="checkbox", or type="radio"." and adding a new bit under the interactive example that lists supported elements.

Makes sense. I'll see if I can get this PR adjusted to meet that outline.

@dev-nicolaos dev-nicolaos requested a review from a team as a code owner November 22, 2021 20:12
@dev-nicolaos dev-nicolaos requested review from rachelandrew and wbamberg and removed request for a team November 22, 2021 20:12
Copy link
Collaborator

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

I think this is a significant improvement, thank you @dev-nicolaos !

@wbamberg wbamberg merged commit e8438c1 into mdn:main Nov 23, 2021
@dev-nicolaos dev-nicolaos deleted the patch-1 branch November 23, 2021 17:59
@dev-nicolaos dev-nicolaos mentioned this pull request Nov 29, 2021
3 tasks
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:Glossary Glossary entries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants