-
Notifications
You must be signed in to change notification settings - Fork 77
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
Provide CSS variable for input placeholder color #8967
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Dashboards
Issues logged by ArcGIS Dashboards team members.
calcite-components
Issues specific to the @esri/calcite-components package.
design-tokens
Issues requiring design tokens.
enhancement
Issues tied to a new feature or request.
estimate - 3
A day or two of work, likely requires updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
p - low
Issue is non core or affecting less that 10% of people using the library
Milestone
Comments
That's great, thanks! |
Installed and assigned for verification. |
@alisonailea the placeholder text color token doesn't seem to be working while I'm testing locally. Are you seeing the same behavior? |
alisonailea
added a commit
that referenced
this issue
Jan 6, 2025
**Related Issue:** #8967 ## Summary Breaks the placeholder styles into separate lines to avoid a browser specific selector erroring out the whole line. <img width="1436" alt="Screenshot 2024-12-18 at 3 21 01 PM" src="https://github.com/user-attachments/assets/721214f6-48a4-486d-b98e-e8d30e8b6099" /> BEGIN_COMMIT_OVERRIDE END_COMMIT_OVERRIDE
Installed and assigned for verification. |
benelan
pushed a commit
that referenced
this issue
Feb 8, 2025
**Related Issue:** #8967 ## Summary Breaks the placeholder styles into separate lines to avoid a browser specific selector erroring out the whole line. <img width="1436" alt="Screenshot 2024-12-18 at 3 21 01 PM" src="https://github.com/user-attachments/assets/721214f6-48a4-486d-b98e-e8d30e8b6099" /> BEGIN_COMMIT_OVERRIDE END_COMMIT_OVERRIDE
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
4 - verified
Issues that have been released and confirmed resolved.
ArcGIS Dashboards
Issues logged by ArcGIS Dashboards team members.
calcite-components
Issues specific to the @esri/calcite-components package.
design-tokens
Issues requiring design tokens.
enhancement
Issues tied to a new feature or request.
estimate - 3
A day or two of work, likely requires updates to tests.
impact - p2 - want for an upcoming milestone
User set priority impact status of p2 - want for an upcoming milestone
p - low
Issue is non core or affecting less that 10% of people using the library
Check existing issues
Description
Because the input background color can be changed using
--calcite-color-foreground-1
, there should be a way to change the placeholder text color for general theming purposes as well as to maintain a sufficient contrast ratio. From https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum#:~:text=including%20placeholder%20text, placeholder text is included in the minimum contrast Success Criterion (1.4.3). Against foreground-1 there are some failures in some browser default/mode combinations, for example:Chrome, dark mode: #757575 against #2B2B2B = 3.07:1
Safari, light mode: #A9A9A9 (
darkgray
) against #FFFFFF = 2.35:1(Note: To check the placeholder color in the user agent stylesheet, inspect an input when “Show user agent shadow DOM” is enabled in dev tools settings > preferences > elements (Chrome)).
Acceptance Criteria
It is possible to set the placeholder color in an input, for example
--calcite-color-input-placeholder: #6d6d88
or maybe with an existing variable like
--calcite-color-text-3
, which would be applied as the color in the::placeholder
pseudo-element.Relevant Info
No response
Which Component
calcite-input, calcite-input-*
Example Use Case
No response
Priority impact
p2 - want for current milestone
Calcite package
Esri team
ArcGIS Dashboards
The text was updated successfully, but these errors were encountered: