-
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: component check list #3511
Closed
Closed
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
f3b2a68
feat: add list style file
dd1750b
feat: add list-check documentation
f90299a
chore: add nested unordered list
9ffa7d3
Merge branch 'main' into 3438-component-check-list
5bd951d
feat: add basic style of check list
64165d2
chore: adjust spaces
7bbe725
style clean-up variable
c3cb103
chore: move list to Components
d1d08b7
Merge branch 'main' into 3438-component-check-list
bashirkarimi 1741047
chore: remove extra paragraphs
e753c90
fix: remove unnecessary nested selector
025ade8
Merge branch 'main' into 3438-component-check-list
33b23f1
feat: implement tokens with get function
3450d87
feat: add changeset
968b0d7
Merge branch 'main' into 3438-component-check-list
a4a3011
Merge branch 'main' into 3438-component-check-list
7ef2afa
chore: add space to check mark on mobile
438d838
Merge branch 'main' into 3438-component-check-list
bashirkarimi cb16621
Merge branch 'main' into 3438-component-check-list
bashirkarimi 4edb8a9
chore: reformat the css properties
e089735
Merge branch 'main' into 3438-component-check-list
bashirkarimi 8a73022
Merge branch 'main' into 3438-component-check-list
bashirkarimi ce49461
Merge branch 'main' into 3438-component-check-list
gfellerph 9796f64
Merge branch 'main' into 3438-component-check-list
a3b0fc2
chore: adjust check mark size and use icon mixin
1ab8058
style: format code
0c7d64f
Merge branch 'main' into 3438-component-check-list
bashirkarimi 5d27550
fix: update tokens
2016e74
fix: adjust space between icon and text
801f284
Merge branch 'main' into 3438-component-check-list
1ee084e
feat: add style for high contrast mode
6b32e06
Merge branch 'main' into 3438-component-check-list
bashirkarimi a40ec70
fix: update token name
70bf8f4
Merge branch 'main' into 3438-component-check-list
e9edf80
fix: change token set and remove keys
2a6cff5
Update docs
alizedebray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@swisspost/design-system-documentation': minor | ||
'@swisspost/design-system-styles': minor | ||
--- | ||
|
||
Added the checks list component, an unordered list where each item is preceded by a check icon. |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
@use 'forms'; | ||
@use 'grid'; | ||
@use 'icons'; | ||
@use 'list'; | ||
@use 'lead'; | ||
@use 'list-group'; | ||
@use 'modal'; | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@use '../mixins/media'; | ||
@use '../mixins/icons'; | ||
@use '../mixins/utilities'; | ||
@use '../functions/tokens'; | ||
@use '../tokens/components'; | ||
|
||
tokens.$default-map: components.$post-list-simple; | ||
|
||
$sizing-icon: tokens.get('list-simple-checks-sizing-icon'); | ||
$padding-icon: tokens.get('list-simple-checks-padding-icon'); | ||
|
||
.list-checks { | ||
list-style: none; | ||
padding-left: 0; | ||
padding-block: tokens.get('list-simple-checks-padding-block-outer'); | ||
margin-bottom: 0; | ||
|
||
> li { | ||
position: relative; | ||
padding-inline-start: calc( | ||
#{tokens.get('list-simple-checks-gap-inline-text')} + #{$sizing-icon} + (#{$padding-icon} * 2) | ||
); | ||
|
||
&::before, | ||
&::after { | ||
content: ''; | ||
position: absolute; | ||
} | ||
|
||
&::before { | ||
@include icons.icon(2105); | ||
left: calc($padding-icon); | ||
top: calc($padding-icon); | ||
width: $sizing-icon; | ||
height: $sizing-icon; | ||
background-color: tokens.get('list-checks-color-icon-fg'); | ||
z-index: 2; | ||
|
||
@include utilities.high-contrast-mode() { | ||
background-color: Canvas; | ||
} | ||
} | ||
|
||
&::after { | ||
left: 0; | ||
top: 0; | ||
width: calc(#{$sizing-icon} + (#{$padding-icon} * 2)); | ||
height: calc(#{$sizing-icon} + (#{$padding-icon} * 2)); | ||
background-color: tokens.get('list-checks-color-icon-bg'); | ||
border-radius: 50%; | ||
|
||
@include utilities.high-contrast-mode() { | ||
background-color: CanvasText; | ||
color: Canvas; | ||
} | ||
} | ||
|
||
@include media.max(400px) { | ||
&::before, | ||
&::after { | ||
margin-inline: tokens.get('list-simple-checks-icon-container-inline'); | ||
margin-block: tokens.get('list-simple-checks-icon-container-block'); | ||
} | ||
} | ||
|
||
> ul { | ||
padding-bottom: 0; | ||
} | ||
} | ||
|
||
> li:not(:last-child) { | ||
margin-block-end: tokens.get('list-simple-checks-gap-block-text'); | ||
} | ||
} |
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.
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.
Could you please update this file by replacing the
bottom
andleft
properties withblock-end
andinline-start
?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.
The
bottom
andleft
which have0
value are reseting thereboot
and can not be changed. The rest are changed accordingly.