Skip to content

refactor(switch): separate css vars - #1159

Merged
matthewcarleton merged 2 commits into
patternfly:masterfrom
mcoker:issue-1158
Jan 8, 2019
Merged

refactor(switch): separate css vars#1159
matthewcarleton merged 2 commits into
patternfly:masterfrom
mcoker:issue-1158

Conversation

@mcoker

@mcoker mcoker commented Dec 29, 2018

Copy link
Copy Markdown
Contributor

fixes #1158

@patternfly-build

patternfly-build commented Dec 29, 2018

Copy link
Copy Markdown
Collaborator

Deploy preview for pf-next ready!

Built with commit 5388f09

https://deploy-preview-1159--pf-next.netlify.com

@andybraren andybraren left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

--pf-c-switch__toggle--Padding at the top is no longer needed now that it's split.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good catch!

--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);

@andybraren andybraren Jan 4, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ooh fancy! I don't think we do that as a thing (or I haven't anyways), but sure why not?

@mcoker

mcoker commented Jan 4, 2019

Copy link
Copy Markdown
Contributor Author

That's a big 10-4 good buddy. Updated. Over and out.

@matthewcarleton
matthewcarleton merged commit 9109a20 into patternfly:master Jan 8, 2019
@mcoker
mcoker deleted the issue-1158 branch December 16, 2019 23:16
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.

4 participants