-
Notifications
You must be signed in to change notification settings - Fork 206
[PANGOO-2905][BpkCheckbox]Checkbox With SVG #3774
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
Changes from 10 commits
cd52b6a
2f95367
d3c571b
cb47e84
c92d7d8
26d440c
f5e4880
e44ce50
5d3824b
2e7ccca
3ef54e5
2fa8d2e
2444158
07945ce
6605eba
57a8fb7
bc1b1d9
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 |
---|---|---|
|
@@ -627,34 +627,16 @@ | |
/// @include bpk-checkbox__checkmark(); | ||
/// } | ||
@mixin bpk-checkbox__checkmark { | ||
&::before, | ||
&::after { | ||
position: absolute; | ||
content: ''; | ||
transform: rotate(45deg); | ||
border-radius: $bpk-border-size-lg; | ||
background-color: $bpk-text-primary-inverse-day; | ||
} | ||
|
||
&::before { | ||
top: bpk-spacing-md() - $bpk-one-pixel-rem; | ||
left: 0; | ||
width: bpk-spacing-lg() / 3; | ||
height: bpk-spacing-sm() - $bpk-one-pixel-rem; | ||
} | ||
|
||
&::after { | ||
top: bpk-spacing-sm() / 2; | ||
left: bpk-spacing-md() - $bpk-one-pixel-rem; | ||
width: bpk-spacing-sm() - $bpk-one-pixel-rem; | ||
height: bpk-spacing-md() + ($bpk-one-pixel-rem * 3); | ||
} | ||
background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2213%22%20height%3D%229%22%20viewBox%3D%220%200%2013%209%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.35352%203.64648L5.5%207.5L11.5%201.5%22%20stroke%3D%22white%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E'); | ||
background-repeat: no-repeat; | ||
background-position: $bpk-one-pixel-rem * 0.5 center; | ||
background-size: calc(100% - $bpk-one-pixel-rem * 2.5) auto; | ||
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. note here: the design has confirmed with the backpack designer by @senzg |
||
|
||
&:disabled { | ||
&::before, | ||
&::after { | ||
background-color: $bpk-text-disabled-day; | ||
} | ||
background-image: url('data:image/svg+xml,%3Csvg%20width%3D%2213%22%20height%3D%229%22%20viewBox%3D%220%200%2013%209%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M2.35352%203.64648L5.5%207.5L11.5%201.5%22%20stroke%3D%22lightgrey%22%20stroke-width%3D%223%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E'); | ||
background-repeat: no-repeat; | ||
background-position: $bpk-one-pixel-rem * 0.5 center; | ||
background-size: calc(100% - $bpk-one-pixel-rem * 2.5) auto; | ||
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. Do we still need to declare 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. Oh yes, thanks for your reminding! They are deleted and tested |
||
} | ||
} | ||
|
||
|
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.
Just out of curiosity, how do we get
0.5
and2.5
here?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.
That's only a subjective number to make the visual effect look good. The problem is that the left padding and the right padding of the svg I get are slightly different, it is not good looking without this adjustment.