Skip to content

Commit

Permalink
Fix icon size
Browse files Browse the repository at this point in the history
  • Loading branch information
vietanhtran16 committed Nov 7, 2024
1 parent 75c06ad commit c839349
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/purple-hairs-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@kaizen/components": patch
---

Fix icon-size
12 changes: 12 additions & 0 deletions packages/components/src/__future__/Icon/Icon.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@
"opsz" var(--icon-optical-size, var(--icon-size, 20));
}

.icon.IconOverride {
font-size: calc(1px * var(--icon-size, 20));
font-weight: var(--icon-font-weight, 400);
vertical-align: var(--icon-vertical-align);

/* Must use vars otherwise whole attribute must be set again */
font-variation-settings:
"FILL" var(--icon-fill, 0),
"GRAD" var(--icon-grade, 0),
"opsz" var(--icon-optical-size, var(--icon-size, 20));
}

.filled {
--icon-fill: 1;
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/__future__/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const MaterialIcon = ({
className={classNames(
"material-symbols-outlined",
styles.icon,
"IconOverride",
isFilled && styles.filled,
className
)}
Expand Down

0 comments on commit c839349

Please sign in to comment.