-
Notifications
You must be signed in to change notification settings - Fork 14
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): tokenise radio buttons #3540
Conversation
commit 8825864 Author: Tim Schär <[email protected]> Date: Tue Sep 10 15:22:04 2024 +0200 fix(setup): build tokens before styles is started
🦋 Changeset detectedLatest commit: 98afc4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Quality Gate passedIssues Measures |
'@swisspost/design-system-styles': patch | ||
--- | ||
|
||
Started adapting the radio-button styles to match v2 design. |
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.
Started adapting the radio-button styles to match v2 design. | |
Aligned radio button styles with the new Post design. |
@use '../tokens/components' as components; | ||
@use '../functions/tokens' as tokens; |
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.
This is not necessary:
@use '../tokens/components' as components; | |
@use '../functions/tokens' as tokens; | |
@use '../tokens/components'; | |
@use '../functions/tokens'; |
transition: color animation.$transition-base-timing; | ||
color: tokens.get('radio-button-enabled-fg'); | ||
background-color: tokens.get('radio-button-enabled-bg'); | ||
transition: color #{animation.$transition-base-timing}; |
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.
transition: color #{animation.$transition-base-timing}; | |
transition: color animation.$transition-base-timing; |
height: tokens.get('radio-button-icon-ring'); | ||
width: tokens.get('radio-button-icon-ring'); | ||
border: tokens.get('radio-button-icon-border-width') solid | ||
tokens.get('radio-button-enabled-stroke'); | ||
margin-top: 1px; |
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.
What is this margin for? Can it be removed?
If not can you add a comment to explain it?
// TODO: Use tokens | ||
border: 3px solid transparent; |
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.
Did you contact @Vandapanda to create the missing tokens?
@@ -149,6 +167,9 @@ | |||
} | |||
} | |||
|
|||
border: 0; | |||
background-image: url('#{form-check.$form-check-input-disabled-background-url-light-lg}'); |
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.
Is this still correct or do we simply use a dashed border now?
|
||
.form-check { | ||
display: flex; | ||
flex-wrap: wrap; | ||
row-gap: form-check.$form-check-row-gap; | ||
margin-bottom: form-check.$form-check-margin-bottom; | ||
|
||
@include utility-mx.focus-style() { | ||
@include utility-mx.focus-style-custom() { |
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.
You can use the focus-style
mixin here.
The v2 design implementation is currently incomplete due to several factors:
To address these issues and track progress, a new ticket ([component]: Radio Button (rework) #3537 ) has been created to document the necessary steps for full implementation.