refactor(themes): add styling support for datetime inputs#2223
Open
simeonoff wants to merge 1 commit into
Open
refactor(themes): add styling support for datetime inputs#2223simeonoff wants to merge 1 commit into
simeonoff wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the igc-input theming layer to better support native date, time, datetime-local, week, and month inputs by ensuring their internal UI and floating-label behaviors can be styled consistently in both light and dark modes.
Changes:
- Split input “shared” theme overrides into distinct light/dark variants and wire them into the theme registry.
- Extend Material shared input styling selectors to account for datetime-like input types.
- Add cross-theme tweaks for native datetime text rendering and ensure correct UA control styling via
color-scheme.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/input/themes/themes.ts | Uses separate light/dark shared style bundles for input themes. |
| src/components/input/themes/shared/input.material.scss | Adds Material theme selector logic for datetime-like input types. |
| src/components/input/themes/shared/input.common.scss | Tweaks shared styling to better theme native datetime edit text. |
| src/components/input/themes/light/input.shared.scss | Sets color-scheme: light for native control rendering. |
| src/components/input/themes/dark/input.shared.scss | Introduces dark shared styles and sets color-scheme: dark. |
| input[type='week'], | ||
| input[type='month'] | ||
| ) + [part='notch'] [part='label'], | ||
| input:has(:not(:placeholder-shown)) + [part='notch'] [part='label'] { |
Comment on lines
+510
to
+513
| :host(:not( | ||
| [aria-haspopup='dialog'], | ||
| [role='combobox'] | ||
| )[outlined][readonly]:focus-within) { |
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.
Description
This PR adds styling support for
date,time,datetime-local,week, andmonthinput types.Type of Change
Related Issues
Related to IgniteUI/igniteui-angular#17270