Skip to content
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

feat(styles): update select disabled styles #3228

Merged
merged 6 commits into from
Jul 17, 2024

Conversation

davidritter-dotcom
Copy link
Contributor

No description provided.

@davidritter-dotcom davidritter-dotcom requested a review from a team as a code owner July 10, 2024 07:43
@davidritter-dotcom davidritter-dotcom linked an issue Jul 10, 2024 that may be closed by this pull request
Copy link

changeset-bot bot commented Jul 10, 2024

⚠️ No Changeset found

Latest commit: e66f863

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@swisspost-bot
Copy link
Contributor

swisspost-bot commented Jul 10, 2024

Related Previews

@davidritter-dotcom davidritter-dotcom changed the title Update select disabled styles feat(styles): update select disabled styles Jul 10, 2024
Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the styles to match Figma? When the selection is disabled:

  • the label and hint should be --post-gray-60
  • the chevron icon should be --post-gray-40
  • the text should be --post-gray-60 and not strikethrough

@davidritter-dotcom
Copy link
Contributor Author

Can you update the styles to match Figma? When the selection is disabled:

  • the label and hint should be --post-gray-60
  • the chevron icon should be --post-gray-40
  • the text should be --post-gray-60 and not strikethrough

The Design in Figma is already updated and the text is now strikethrough also in the select.

Copy link
Contributor

@alizedebray alizedebray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you declare the variables like so:

$input-disabled-color: var(--post-gray-60);
$input-disabled-border-color: var(--post-gray-40);

Then the other files can remain unchanged, still using forms.$input-disabled-color and forms.$input-disabled-border-color

The only place where you will have to declare the gray manually is here, because you cannot use a var() in a background URL:

$form-select-disabled-color: forms.$input-disabled-color;
$form-select-indicator-disabled: url('#{icons.get-colored-svg-url('2113', $form-select-disabled-color)}') !default;

This approach helps with consistency as you only define the gray twice: once in the form variables and once in the select background.

packages/styles/src/variables/components/_forms.scss Outdated Show resolved Hide resolved
packages/styles/src/variables/components/_forms.scss Outdated Show resolved Hide resolved
@davidritter-dotcom
Copy link
Contributor Author

davidritter-dotcom commented Jul 16, 2024

If you declare the variables like so:

$input-disabled-color: var(--post-gray-60);
$input-disabled-border-color: var(--post-gray-40);

Then the other files can remain unchanged, still using forms.$input-disabled-color and forms.$input-disabled-border-color

The only place where you will have to declare the gray manually is here, because you cannot use a var() in a background URL:

$form-select-disabled-color: forms.$input-disabled-color;
$form-select-indicator-disabled: url('#{icons.get-colored-svg-url('2113', $form-select-disabled-color)}') !default;

This approach helps with consistency as you only define the gray twice: once in the form variables and once in the select background.

@alizedebray the svg doesn't work if there is a css variable behind the sass variable, so I just put a color sass variable for the background URL.

Copy link

@davidritter-dotcom davidritter-dotcom merged commit 55c2edc into main Jul 17, 2024
10 checks passed
@davidritter-dotcom davidritter-dotcom deleted the 3216-select-disabled-styles branch July 17, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select disabled styles
3 participants