-
Notifications
You must be signed in to change notification settings - Fork 22.8k
<selectedcontent>: update to description and specification #40501
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
base: main
Are you sure you want to change the base?
Conversation
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs (comment last updated: 2025-07-31 14:21:12) |
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Dipika Bhattacharya <[email protected]>
Co-authored-by: Dipika Bhattacharya <[email protected]>
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few more cleanup suggestions, but it's looking ready to land. Thanks!
|
||
This could be fixed by hiding the problem content when it is contained inside `<selectedcontent>`. For example: | ||
By targeting the content inside `<selectedcontent>`, you can hide elements such as images in the button, without affecting how they appear in the drop-down, as shown in the following snippet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving this to the previous para to keep continuity in text explaining the example
By targeting the content inside `<selectedcontent>`, you can hide elements such as images in the button, without affecting how they appear in the drop-down, as shown in the following snippet: |
|
||
For example, your `<option>` elements may contain icons, images, or even videos. This content might look nice inside the picker, but could cause the select button to increase in size, look untidy, and affect the surrounding layout. | ||
For example, your `<option>` elements may contain icons, images, or even videos that render nicely inside the drop-down, but could cause the select `<button>` to increase in size, look untidy, and affect the surrounding layout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, your `<option>` elements may contain icons, images, or even videos that render nicely inside the drop-down, but could cause the select `<button>` to increase in size, look untidy, and affect the surrounding layout. | |
For example, your `<option>` elements may contain icons, images, or even videos that render nicely inside the drop-down, but could cause the select `<button>` to increase in size, look untidy, and affect the surrounding layout. By targeting the content inside `<selectedcontent>`, you can hide elements such as images in the button, without affecting how they appear in the drop-down, as shown in the following snippet: |
files/en-us/web/html/reference/elements/selectedcontent/index.md
Outdated
Show resolved
Hide resolved
|
||
It is useful to be able to target the currently-selected `<option>` element's content as it appears inside the select button with CSS styles, without affecting the styling of the content as it appears inside the picker. | ||
You can target the currently selected `<option>` element's content as it appears inside the select button with CSS styles. This lets you customize how the selected option appears in the button, separately from how it appears in the drop-down list, as it doesn't affect the styling of the content of the `<option>` that was cloned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt about this? changed the order a bit
You can target the currently selected `<option>` element's content as it appears inside the select button with CSS styles. This lets you customize how the selected option appears in the button, separately from how it appears in the drop-down list, as it doesn't affect the styling of the content of the `<option>` that was cloned. | |
You can target the content of the currently selected `<option>` element and style how it appears inside the select button. Styling the button doesn't affect the styling of the content of the `<option>` that was cloned. This lets you customize how the selected option appears in the button, separately from how it appears in the drop-down list. |
per #40499