Skip to content

Commit

Permalink
feat(icon): allow setting background color on icon
Browse files Browse the repository at this point in the history
Make it easier to set background color of icons by setting a border radius and padding for the
pre-defined sizes
  • Loading branch information
jgroth authored and adrianschmidt committed Sep 10, 2019
1 parent 2da8208 commit a1f5c3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/icon/icon.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

:host {
background-color: rgba(0, 0, 0, 0);
border-radius: 50%;
display: inline-block;
line-height: 0;

Expand All @@ -23,25 +24,29 @@
height: 1.5rem;
width: 1.5rem;
}
padding: .4rem;
}
:host([size="small"]) {
&,
> div {
height: 2rem;
width: 2rem;
}
padding: .5rem;
}
:host([size="medium"]) {
&,
> div {
height: 2.5rem;
width: 2.5rem;
}
padding: .8rem;
}
:host([size="large"]) {
&,
> div {
height: 3rem;
width: 3rem;
}
padding: .8rem;
}

0 comments on commit a1f5c3c

Please sign in to comment.