better fader pips again, yet simple : using repeating linear gradient to draw evenly spaced pips, not related to the fader's height !

This commit is contained in:
jean-emmanuel 2016-03-25 00:11:24 +01:00
parent 8593e7db50
commit f732feff29
2 changed files with 19 additions and 20 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,18 +1,3 @@
@mixin pips($color,$direction: "to bottom") {
$gradient: $color, $color 1px, transparent 1px,transparent 1%;
@for $i from 1 through 100 {
$dump: ();
$dump: $color + ' '+ $i+'%, ' + $color +' calc('+$i+'% + 1px),transparent calc('+$i+'% + 1px),transparent '+($i+1)+'%';
$gradient: join($gradient, unquote($dump), comma);
}
background: linear-gradient(unquote($direction), $gradient);
}
.fader-container {
width:100rem;
min-height: 200rem;
@ -159,16 +144,25 @@
z-index: 0;
width: 38rem;
margin-left: -19rem;
@include pips(var(--color-pips));
background: repeating-linear-gradient(to bottom, var(--color-pips) 0, var(--color-pips) 1px, transparent 1px, transparent 3px);
.pip {
height:1px;
background: var(--color-pips);
color:var(--color-fg);
box-shadow: 0 0 0 1px;
position: absolute;
width:44rem;
margin-left:-3rem;
&:before {
content:"";
position: absolute;
top:-2px;
left:0;
right:0;
bottom:-2px;
background: var(--color-fg);
z-index: -1;
}
span {
position: absolute;
width:30rem;
@ -252,13 +246,18 @@
height:4rem;
width:100%;
margin:0;
@include pips(var(--color-pips),'to left');
background: repeating-linear-gradient(to right, var(--color-pips) 0, var(--color-pips) 1px, transparent 1px, transparent 3px);
}
.pip {
width:1px;
height:6rem;
margin: 0;
&:before {
top:0;
bottom:0;
left:-2px;
right:-2px;
}
span {
top:15rem;
left:-15rem!important;