buttons: add led option to toggle, remove useless .light dom elements

This commit is contained in:
jean-emmanuel 2017-07-13 10:35:55 +02:00
parent 513eda1af2
commit 1be9cecaa7
7 changed files with 58 additions and 29 deletions

View file

@ -183,24 +183,26 @@
.modal-container {
@extend .toggle-container;
> .toggle .light:after {
content:"\f0da";
> .toggle:after {
content:"\f0da"!important;
font-family: FontAwesome;
transform: rotateZ(-45deg);
font-size: 20rem;
display: block;
width:8rem;
height:6rem;
right:2rem;
top:1rem;
left:auto;
right:2rem!important;
top:1rem!important;
left:auto!important;
bottom:auto!important;
line-height: 10rem;
text-align: center;
float:right;
position: absolute;;
position: absolute;
box-shadow: none;
background: none;
background: none!important;
color:var(--color-text-fade);
opacity: 1!important;
}
> .panel {
@ -245,7 +247,7 @@
}
&.on {
z-index: 99999;
> .toggle .light:after {
> .toggle:after {
color:var(--color-custom);
}
}

View file

@ -14,8 +14,10 @@
background: radial-gradient( ellipse at center, transparent, var(--color-bg));
}
}
.light:after{
display: none;
&.on:not(.active) {
&:after {
opacity: 0;
}
}
}

View file

@ -14,22 +14,12 @@
border-radius: inherit;
.light {
&:before {
content:"";
flex:1;
display: flex;
opacity: 1;
box-shadow: 0 0 0 1rem var(--color-light) inset;
pointer-events: none;
border-radius: inherit;
&:before {
content:"";
flex:1;
opacity: 0;
box-shadow: 0 0 0 1rem var(--color-custom) inset;
border-radius: inherit;
}
}
&.on {
@ -44,8 +34,9 @@
background: radial-gradient( ellipse at center, transparent, var(--color-bg));
}
.light:before {
&:before {
opacity: 0.3;
box-shadow: 0 0 0 1rem var(--color-custom) inset;
}
}
@ -70,9 +61,7 @@
align-items: center;
z-index: 2;
font-family: roboto;
// font-weight: bold;
color:var(--color-text);
// letter-spacing: 1rem;
}
&.on > .label {
@ -80,4 +69,32 @@
opacity: 1;
}
&.led {
.toggle:after {
content:"";
opacity: 1;
position: absolute;
display: block;
top:3rem;
left:3rem;
right:3rem;
height: 4rem;
background: var(--color-track);
box-shadow: 0 0 0 1rem var(--color-light), 0 0 0 1rem var(--color-bg) inset;
z-index: 1;
border-radius: inherit;
opacity: 0.7;
}
.toggle.on:after {
background: var(--color-custom);
}
.toggle:before {
box-shadow: 0 0 0 1rem var(--color-light) inset;
opacity: 1;
}
> .label {
top:7rem;
}
}
}