-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(select): Fix alignment issues, upgrade anchor to interactive…
… element - `mdc-select__selected-text` has been downgraded to a decorative role, its parent `mdc-select__anchor` will take on all interactivity responsibility. - `mdc-select__anchor` will now use flexbox to align its children instead of hard-coded padding. This means that the order of its children has been changed to reflect the actual order non-absolute-positioned elements appear in DOM (i.e. dropdown icon now appears AFTER selected text) - To ensure pseudo-classes from above change's baseline styles don't clash with ripple, the ripple has been moved to a separate `<span class="mdc-select__ripple">` element. - `mdc-select__selected-text` has been converted from `<div>` to a readonly `<input>` so that it provides a neat baseline for external alignment regardless of whether its inner text is nil. Note this is not directly related to #5428, which requests a hidden input with the select's *value*, not *text*. BREAKING CHANGE: HTML Markup significantly changed, see README; REMOVED adapter methods `isSelectedTextFocused`, `getSelectedTextAttr`, `setSelectedTextAttr`; ADDED adapter methods `isSelectAnchorFocused`, `getSelectAnchorAttr`, `setSelectAnchorAttr`; removed variables `outlined-dense-label-position-y`, `icon-padding`; added variables `minimum-height-for-filled-label`, `filled-baseline-top`, `selected-text-height`, `anchor-padding-left`, `anchor-padding-left-with-leading-icon`, `anchor-padding-right`. PiperOrigin-RevId: 305913109
- Loading branch information
1 parent
008c4d3
commit 261025a
Showing
11 changed files
with
416 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.