refactor(switch): separate css vars - #1159
Conversation
|
Deploy preview for pf-next ready! Built with commit 5388f09 |
andybraren
left a comment
There was a problem hiding this comment.
Variable separation confirmed. Let --pf-c-switch__toggle--Padding burn up in the atmosphere and I think this is go for merge. Over.
| &::before { | ||
| position: absolute; | ||
| top: var(--pf-c-switch__toggle--Padding); | ||
| left: var(--pf-c-switch__toggle--Padding); |
There was a problem hiding this comment.
--pf-c-switch__toggle--Padding at the top is no longer needed now that it's split.
| --pf-c-switch__toggle--before--BackgroundColor: var(--pf-global--BackgroundColor--light-100); | ||
| --pf-c-switch__toggle--before--Top: calc(#{var(--pf-c-switch--Height)} / 2 * (1 - 1 / #{var(--pf-global--golden-ratio)})); | ||
| --pf-c-switch__toggle--before--Left: var(--pf-c-switch__toggle--before--Top); | ||
| --pf-c-switch__label--Color: var(--pf-global--Color--dark-100); |
There was a problem hiding this comment.
The variables for at least --pf-c-switch__toggle and --pf-c-switch__label could probably be reordered to match the order in which they're used down below, but that's not really important (or this PR's job).
There was a problem hiding this comment.
Ooh fancy! I don't think we do that as a thing (or I haven't anyways), but sure why not?
|
That's a big 10-4 good buddy. Updated. Over and out. |
fixes #1158