Support for shape attribute

This commit is contained in:
Paul T 2018-06-29 23:37:18 -04:00
parent 6d3fe85ab1
commit 9f521ed7f4

View file

@ -34,7 +34,7 @@ export class BoxIconElement extends HTMLElement {
'rotate', 'rotate',
'flip', 'flip',
'animation', 'animation',
'border', 'shape',
]; ];
} }
@ -102,6 +102,16 @@ export class BoxIconElement extends HTMLElement {
width: 3.0rem; width: 3.0rem;
height: 3.0rem; height: 3.0rem;
} }
:host([shape=square]) {
padding: .25em;
border: .07em solid rgba(0,0,0,.1);
border-radius: .25em;
}
:host([shape=circle]) {
padding: .25em;
border: .07em solid rgba(0,0,0,.1);
border-radius: 50%;
}
#icon, #icon,
svg { svg {
width: 100%; width: 100%;