Floating labels: always float date and time inputs - #42833
Open
mdo wants to merge 3 commits into
Open
Conversation
Date, time, datetime-local, month, and week inputs do not support placeholders like text fields, so floating labels looked filled even when empty and padding stayed inconsistent. Keep those controls (and selects) in the floated label and padding state, and document the behavior. Fixes #39257
|
|
||
| // Internals are protected: consumers cannot reach a component's private state | ||
| // @ts-expect-error — _config is protected | ||
| tooltipFromElement._config |
| // @ts-expect-error — _config is protected | ||
| tooltipFromElement._config | ||
| // @ts-expect-error — _element is protected | ||
| toast._element |
|
|
||
| // Internals are protected: consumers cannot reach a component's private state | ||
| // @ts-expect-error — _config is protected | ||
| tooltipFromElement._config |
| // @ts-expect-error — _config is protected | ||
| tooltipFromElement._config | ||
| // @ts-expect-error — _element is protected | ||
| toast._element |
| const dialog: Dialog = new Dialog(element, { modal: true, keyboard: false }) | ||
| const drawer: Drawer = new Drawer(element, { scroll: true }) | ||
| const popover: Popover = new Popover(element, { content: 'Hello', animation: true }) | ||
| const range: Range = new Range(element, { formatter: value => `${value} %` }) |
| const drawer: Drawer = new Drawer(element, { scroll: true }) | ||
| const popover: Popover = new Popover(element, { content: 'Hello', animation: true }) | ||
| const range: Range = new Range(element, { formatter: value => `${value} %` }) | ||
| const chips: Chips = new Chips(element, { separator: ';', maxChips: 5, allowDuplicates: true }) |
Date and time inputs show hard `/` and `:` dividers that fight the control’s muted placeholder look in WebKit and Blink. Color those separators with the control placeholder token, and fold the duplicate date and time docs section into one.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.form-floating-alwaysfor an always-floated label with a visible placeholder.Fixes #39257
Supersedes #36155