Skip to content

[select] Should the inner HTML & styles of the selected option be copied into selected-value? #571

Description

@clarumedia

Chrome 103.0.5060.114

When an option is "selected" using the "selected" attribute, shouldn't the style of that option supersede the style of the select ?
Use case: colours set on select options via CSS, the selected colour would display having been selected.

<select>
	<option style='color:blue;' >1 Blaa x</option>
	<option style='color:red;' selected >I would expect the collapsed select control to be red because this is the selected option</option>
	<option style='color:green;' >3 Blaa more</option>
</select>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

needs editsThis is ready for edits to be madeselectThese are issues that relate to the select component

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions