Skip to content

Commit

Permalink
refactor(icon): use em for width and height of the icons. (#897)
Browse files Browse the repository at this point in the history
Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
  • Loading branch information
desig9stein and simeonoff authored Sep 18, 2023
1 parent 182fcf9 commit 8c61f5e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
6 changes: 6 additions & 0 deletions src/components/icon/icon.base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
justify-content: center;
}

igc-icon,
svg {
width: 1em;
height: 1em;
}

:host([size='small']) {
--component-size: var(--ig-size, var(--ig-size-small));
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/icon/light/icon.bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ svg {
fill: currentcolor;
}

:host,
igc-icon,
svg {
width: var-get($theme, 'size');
height: var-get($theme, 'size');
font-size: var-get($theme, 'size');
}
5 changes: 2 additions & 3 deletions src/components/icon/light/icon.fluent.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ svg {
fill: currentcolor;
}

:host,
igc-icon,
svg {
width: var-get($theme, 'size');
height: var-get($theme, 'size');
font-size: var-get($theme, 'size');
}
5 changes: 2 additions & 3 deletions src/components/icon/light/icon.indigo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ svg {
fill: currentcolor;
}

:host,
igc-icon,
svg {
width: var-get($theme, 'size');
height: var-get($theme, 'size');
font-size: var-get($theme, 'size');
}
5 changes: 2 additions & 3 deletions src/components/icon/light/icon.material.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ svg {
fill: currentcolor;
}

:host,
igc-icon,
svg {
width: var-get($theme, 'size');
height: var-get($theme, 'size');
font-size: var-get($theme, 'size');
}

0 comments on commit 8c61f5e

Please sign in to comment.