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

fix(material/slide-toggle): fix m3 slide-toggle handle #28503

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

wagnermaciel
Copy link
Contributor

No description provided.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Jan 30, 2024
@wagnermaciel wagnermaciel changed the title fix(material/slide-toggle): fix m3 width, height, and margin fix(material/slide-toggle): fix m3 handle width, height, and margin Jan 30, 2024
@wagnermaciel wagnermaciel changed the title fix(material/slide-toggle): fix m3 handle width, height, and margin fix(material/slide-toggle): fix m3 slide-toggle handle Jan 30, 2024
@wagnermaciel wagnermaciel marked this pull request as ready for review January 30, 2024 20:17
src/material-experimental/theming/_custom-tokens.scss Outdated Show resolved Hide resolved
@return ((
unselected-handle-width: 16px,
unselected-handle-height: 16px,
selected-handle-width: 24px,
Copy link
Member

Choose a reason for hiding this comment

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

For my own curiosity: does the M3 slide toggle really have a differently-sized handle depending on the selected state? I would imagine that would cause it to jump around.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep lol. It's not too bad because of the transition, but I definitely found it strange at first as well
https://m3.material.io/components/switch/specs#34f9a158-a2b3-4c15-841b-578978126788

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They even have a base state with 20px but from what I can tell, that state is not reachable

src/material/core/tokens/m2/mat/_switch.scss Outdated Show resolved Hide resolved
@wagnermaciel wagnermaciel added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release and removed detected: feature PR contains a feature commit labels Feb 1, 2024
@wagnermaciel wagnermaciel removed the request for review from mmalerba February 1, 2024 17:18
* create a custom-tokens function
* set up theme mixins to create custom token values
* create an m2 mat- tokens file
* added a new namespace in _m3-tokens.scss
* appended the new tokens to m2-tokens-from-theme
@wagnermaciel wagnermaciel added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Feb 1, 2024
@wagnermaciel wagnermaciel merged commit d799c04 into angular:main Feb 1, 2024
24 of 26 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants