-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material/slide-toggle): fix m3 slide-toggle handle (#28503)
* fix(material/slide-toggle): boilerplate for m3 custom tokens * 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 * fix(material/slide-toggle): fix m3 width, height, and margin
- Loading branch information
1 parent
f20e4ed
commit d799c04
Showing
6 changed files
with
161 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@use '../../token-utils'; | ||
@use '../../../style/sass-utils'; | ||
|
||
// The prefix used to generate the fully qualified name for tokens in this file. | ||
$prefix: (mat, switch); | ||
|
||
// Tokens that can't be configured through Angular Material's current theming API, | ||
// but may be in a future version of the theming API. | ||
@function get-unthemable-tokens() { | ||
@return ( | ||
unselected-handle-size: 20px, | ||
selected-handle-size: 20px, | ||
pressed-handle-size: 20px, | ||
with-icon-handle-size: 20px, | ||
|
||
selected-handle-horizontal-margin: 0, | ||
selected-with-icon-handle-horizontal-margin: 0, | ||
selected-pressed-handle-horizontal-margin: 0, | ||
unselected-handle-horizontal-margin: 0, | ||
unselected-with-icon-handle-horizontal-margin: 0, | ||
unselected-pressed-handle-horizontal-margin: 0, | ||
); | ||
} | ||
|
||
// Tokens that can be configured through Angular Material's color theming API. | ||
@function get-color-tokens($theme) { | ||
@return (); | ||
} | ||
|
||
// Tokens that can be configured through Angular Material's typography theming API. | ||
@function get-typography-tokens($theme) { | ||
@return (); | ||
} | ||
|
||
// Tokens that can be configured through Angular Material's density theming API. | ||
@function get-density-tokens($theme) { | ||
@return (); | ||
} | ||
|
||
// Combines the tokens generated by the above functions into a single map with placeholder values. | ||
// This is used to create token slots. | ||
@function get-token-slots() { | ||
@return sass-utils.deep-merge-all( | ||
get-unthemable-tokens(), | ||
get-color-tokens(token-utils.$placeholder-color-config), | ||
get-typography-tokens(token-utils.$placeholder-typography-config), | ||
get-density-tokens(token-utils.$placeholder-density-config) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters