Skip to content

Commit

Permalink
Added parantheses to [checked] selector and moved style tag into temp…
Browse files Browse the repository at this point in the history
…late, fixed #7 (hopefully)
  • Loading branch information
fxedel committed Jun 27, 2016
1 parent c9d3361 commit 09dd7d9
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions toggle-icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,38 +64,38 @@

<dom-module id="toggle-icon">

<style>
:host {
display: inline-block;
position: relative;
transition: all .3s;
@apply(--toggle-icon);
}

:host[checked] {
@apply(--toggle-icon-checked);
@apply(--toggle-icon-active);
};

#unchecked, #checked {
transition: opacity .3s;
}

#checked {
position: absolute;
left: 0;
top: 0;
}

:host:not([checked]) #checked,
:host[checked] #unchecked {
opacity: 0;
pointer-events: none;
}
</style>

<template>

<style>
:host {
display: inline-block;
position: relative;
transition: all .3s;
@apply(--toggle-icon);
}

:host([checked]) {
@apply(--toggle-icon-checked);
@apply(--toggle-icon-active);
};

#unchecked, #checked {
transition: opacity .3s;
}

#checked {
position: absolute;
left: 0;
top: 0;
}

:host(:not([checked])) #checked,
:host([checked]) #unchecked {
opacity: 0;
pointer-events: none;
}
</style>

<paper-icon-button
id="unchecked"
icon="{{icon}}"
Expand Down

0 comments on commit 09dd7d9

Please sign in to comment.