Skip to content
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

Updated switch styling #4254

Merged
merged 7 commits into from
Jan 19, 2022
Merged

Updated switch styling #4254

merged 7 commits into from
Jan 19, 2022

Conversation

mtruj013
Copy link
Contributor

@mtruj013 mtruj013 commented Jan 18, 2022

Done

Updated switch styling as per visual update

Fixes #4249

QA

  • Open demo
  • See the the styling changes have been made accurately

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

Screenshots

Screenshot 2022-01-19 at 09 56 14

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4254.demos.haus

scss/_patterns_switch.scss Outdated Show resolved Hide resolved
@bartaz
Copy link
Contributor

bartaz commented Jan 18, 2022

There seem to be a border around the handle (in switched off option) and blue border in switched on.
Also switched off version seems to have bit darker background than implemented (the same as slider grey?):

Screenshot 2022-01-18 at 13.26.19.png

Screenshot 2022-01-18 at 13.32.09.png

@mtruj013 mtruj013 requested a review from bartaz January 18, 2022 15:18
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Couple small fixes in the code needed.

Also, the switch (now smaller) seems to be too high compared to text:

Screenshot 2022-01-18 at 16 43 15

I believe we would need to add align-items: center to the .p-switch in line 5 to fix that.

scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
@mtruj013 mtruj013 requested a review from bartaz January 18, 2022 16:14
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

Some adjustments for the $knob-size variable needed.

scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
scss/_patterns_switch.scss Outdated Show resolved Hide resolved
@lyubomir-popov
Copy link
Contributor

Looks great.

Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mtruj013 mtruj013 merged commit 89f03db into canonical:main Jan 19, 2022
@mtruj013 mtruj013 deleted the update-switch branch January 19, 2022 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update style of the Switch
4 participants