-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix(renderers): normalize DateTimeInput placeholder color #1029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,6 +78,11 @@ import { BoundProperty } from '../../core/types'; | |
| border: 1px solid #ccc; | ||
| font-family: inherit; | ||
| flex: 1; | ||
| color: #333; | ||
| } | ||
| .a2ui-date-time-input::-webkit-datetime-edit, | ||
| .a2ui-date-time-input::-webkit-datetime-edit-fields-wrapper { | ||
| color: #333; | ||
| } | ||
|
||
| `, | ||
| ], | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,6 +57,12 @@ export class DateTimeInput extends Root { | |
| padding: 8px; | ||
| border: 1px solid #ccc; | ||
| width: 100%; | ||
| color: #333; | ||
| } | ||
|
|
||
| input::-webkit-datetime-edit, | ||
| input::-webkit-datetime-edit-fields-wrapper { | ||
| color: #333; | ||
| } | ||
|
||
| `, | ||
| ]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ | |
| * limitations under the License. | ||
| */ | ||
|
|
||
| import { html, nothing } from "lit"; | ||
| import { css, html, nothing } from "lit"; | ||
| import { customElement } from "lit/decorators.js"; | ||
| import { DateTimeInputApi } from "@a2ui/web_core/v0_9/basic_catalog"; | ||
| import { A2uiLitElement, A2uiController } from "@a2ui/lit/v0_9"; | ||
|
|
@@ -27,6 +27,17 @@ export class A2uiDateTimeInputElement extends A2uiLitElement< | |
| return new A2uiController(this, DateTimeInputApi); | ||
| } | ||
|
|
||
| static styles = css` | ||
| input { | ||
| color: #333; | ||
| } | ||
|
|
||
| input::-webkit-datetime-edit, | ||
| input::-webkit-datetime-edit-fields-wrapper { | ||
| color: #333; | ||
| } | ||
| `; | ||
|
Comment on lines
+30
to
+36
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, combined selectors in 811f6da. |
||
|
|
||
| render() { | ||
| const props = this.controller.props; | ||
| if (!props) return nothing; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -292,6 +292,11 @@ export const componentSpecificStyles: string = ` | |
| padding: 8px; | ||
| border: 1px solid #ccc; | ||
| width: 100%; | ||
| color: #333; | ||
| } | ||
| :where(.a2ui-surface .a2ui-datetime-input) input::-webkit-datetime-edit, | ||
| :where(.a2ui-surface .a2ui-datetime-input) input::-webkit-datetime-edit-fields-wrapper { | ||
| color: #333; | ||
| } | ||
|
||
|
|
||
| .a2ui-surface *, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid repetition and improve maintainability, you can combine these CSS rules since they share the same declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, combined selectors in 811f6da.