Although not a breaking change because these classes were never documented or exposed in the API, if you were overriding internal Select (non-native) CSS with custom rules of your own, you will need to update some of them:
ods-select-option
->ods-option
ods-select-option-input
->ods-option-input
ods-select-option-content
->ods-option-content
ods-select-option-icon
->ods-option > ods-icon
Additionally, there's now an itermediate element between ods-select-dropdown
and all the ods-option
s.
If you relied on their structure, you will need to change some CSS selectors too.
<div class="ods-select-dropdown">
<div class="ods-option-list">
<label class="ods-option">...</label>
</div>
</div>
As a reminder, try to use "theme tokens" over "base tokens" as much as you can.
In other words, prefer content-main
and background-action
over neutral-800
or primary-500
.
neutral
's palette token scale has changed, shifting all tokens from 700 to 200 one level down and introducing a new token at 700
- Search for
neutral-700
toneutral-200
tokens and replace each with one level lower. For example:neutral-700
->neutral-600
neutral-500
->neutral-400
neutral-200
->neutral-100
- (optional) Visually review all
neutral-600
andneutral-800
, potentially use the newneutral-700
children
is no longer supported in either component, instead compose withFieldLabel
// before
<Input>My input label</Input>
// after
<FieldLabel>
My input label
<Input />
</FieldLabel>
- for improved accessibility, it now requires either
aria-hidden="true"
oraria-label
- use
aria-hidden="true"
when the icon has no semantic meaning and should be hidden from screen readers - otherwise use
aria-label
to describe its semantic meaning to screen readers
- use
// before
<Icon name="cog" />
// after
<Icon name="cog" aria-hidden="true" />
// or
<Icon name="cog" aria-label="Settings" />
.-empty
modifier class on.ods-select-native
should now be on.ods-select
instead
// before
<div class="ods-select">
<div class="ods-select-native -empty"></div>
</div>
// after
<div class="ods-select -empty">
<div class="ods-select-native"></div>
</div>
- (NON-BREAKING)
.ods-select-native
no longer needs.-borderless
class, only its parent.ods-select
does
// before
<div class="ods-select -borderless">
<div class="ods-select-native -borderless"></div>
</div>
// after
<div class="ods-select -borderless">
<div class="ods-select-native"></div>
</div>