Untitled

mail@pastecode.io avatar
unknown
plain_text
17 days ago
2.1 kB
2
Indexable
Never
input[type="range"] {
  --c: white; /* active color */
  --g: 8px; /* the gap */
  --l: 5px; /* line thickness*/
  --s: 4px; /* thumb size*/
  --is-active-fg-color: #1db954;
  
  -webkit-appearance: none;
  appearance: none; 
  /* creating a custom design */
  width: 100%;
  outline: none;
  /*  slider progress trick  */
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}

/* Track: webkit browsers */
input[type="range"]::-webkit-slider-runnable-track {
  height: 15px;
  background: #ccc;
  border-radius: 16px;
}

/* Track: Mozilla Firefox */
input[type="range"]::-moz-range-track {
  height: 15px;
  background: #ccc;
  border-radius: 16px;
}

/* Thumb: webkit */
input[type="range"]::-webkit-slider-thumb {
  /* removing default appearance */
  -webkit-appearance: none;
  appearance: none; 
  /* creating a custom design */
  height: 15px;
  width: 15px;
  background-color: #ffffff;
  //border-radius: 50%;
  //border: 2px solid --c;
  /*  slider progress trick  */
  box-shadow: -407px 0 0 400px white;
}

input[type="range"]:hover {
  /* removing default appearance */
  -webkit-appearance: none;
  appearance: none; 
  /* creating a custom design */
  width: 100%;
  cursor: pointer;
  outline: #1db954;
  // border-radius: 15px;
  overflow: visible;  
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  background-color: #ff0095;
  /* New additions */
  //height: 156px;
  // background: #ccc;
  &::-webkit-slider-runnable-track{
    background: #581bff;
    border-radius: 16px;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
  }
  &::-webkit-slider-thumb{
     /* removing default appearance */
    -webkit-appearance: none;
    appearance: none; 
    /* creating a custom design */
    height: 15px;
    width: 15px;
    
    background-color: #f50;
    border-radius: 50%;
    border: none;

    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    transition: .2s ease-in-out;
  }
}
Leave a Comment