Skip to content

Commit

Permalink
Add responsive scaling to Icon component
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-b-rose committed Jan 28, 2024
1 parent 825fe1b commit 27cb6b4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/chilly-dogs-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/polaris-icons': minor
'@shopify/polaris': minor
---

Added responsive scaling to icons used with the `Icon` component
9 changes: 9 additions & 0 deletions polaris-react/src/components/Icon/Icon.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@

.Icon svg {
fill: currentColor;
height: 20px;
width: 20px;

@media (--p-breakpoints-md-up) {
box-sizing: content-box;
padding: var(--p-space-050);
height: 16px;
width: 16px;
}
}

.toneInherit svg {
Expand Down
4 changes: 4 additions & 0 deletions polaris-react/src/components/Navigation/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,13 @@ $nav-animation-variables: (
margin-bottom: var(--p-space-200);

@media (--p-breakpoints-md-up) {
box-sizing: content-box;
margin-top: var(--p-space-100);
margin-right: var(--p-space-200);
margin-bottom: var(--p-space-100);
padding: var(--p-space-050);
width: 16px;
height: 16px;
}

svg {
Expand Down

0 comments on commit 27cb6b4

Please sign in to comment.