-
Notifications
You must be signed in to change notification settings - Fork 905
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
feat(icon): add --md-icon-size
token
#5150
feat(icon): add --md-icon-size
token
#5150
Conversation
Signed-off-by: Thorsten Scherler <[email protected]>
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
tokens/_md-comp-icon.scss
Outdated
// go/keep-sorted end | ||
); | ||
|
||
@function _get-new-tokens($exclude-hardcoded-values) { | ||
@return ( | ||
// go/keep-sorted start | ||
font: if($exclude-hardcoded-values, null, 'Material Symbols Outlined'), | ||
size: if($exclude-hardcoded-values, null, '24px'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about whether this is the correct way to set the default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is correct, however, the default font is actually not injected font-family: var(--md-icon-font,);
which you can see in current main
branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct, but you'll want to remove the string quotes around the pixel value
size: if($exclude-hardcoded-values, null, 24px),
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Signed-off-by: Thorsten Scherler <[email protected]>
Thanks for the PR! We'll take a look at it during our weekly sync |
@asyncLiz when is your weekly? I have a bet with my manager that this one gets merged quicker than a company one. 😉 😁 BTW my team does https://www.cloudbees.com/capabilities/continuous-integration/pipeline-explorer where we use https://github.com/scherler/sirocco-wc/ and |
We agree with the addition, but I might not get to reviewing it until next week. Thanks for your patience! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks and sorry for the delay! Left a few comments to address :)
icon/internal/_icon.scss
Outdated
color: inherit; | ||
font-variation-settings: inherit; | ||
font-weight: 400; | ||
font-family: var(--md-icon-font, #{map.get($tokens, font)}); | ||
font-family: map.get($tokens, font); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add single quotes around the keys in map.get
?
map.get($tokens, 'font');
tokens/_md-comp-icon.scss
Outdated
// go/keep-sorted end | ||
); | ||
|
||
@function _get-new-tokens($exclude-hardcoded-values) { | ||
@return ( | ||
// go/keep-sorted start | ||
font: if($exclude-hardcoded-values, null, 'Material Symbols Outlined'), | ||
size: if($exclude-hardcoded-values, null, '24px'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks correct, but you'll want to remove the string quotes around the pixel value
size: if($exclude-hardcoded-values, null, 24px),
--md-icon-size
token
Signed-off-by: Thorsten Scherler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
128abcb
into
material-components:main
@asyncLiz thanks to you |
Fixes #5055
In the old version, the size was controlled by a css variable
font-size: var(--mdc-icon-size, 24px);
Our development is heavily dependent on this to control the size, and the quickest update route is to get back themd-icon-size
token
.Addresses #5055 see as well #5055 (comment)