mirror of https://github.com/FreeTubeApp/FreeTube
125 lines
2.5 KiB
CSS
125 lines
2.5 KiB
CSS
|
/*
|
||
|
This file is part of FreeTube.
|
||
|
|
||
|
FreeTube is free software: you can redistribute it and/or modify
|
||
|
it under the terms of the GNU General Public License as published by
|
||
|
the Free Software Foundation, either version 3 of the License, or
|
||
|
(at your option) any later version.
|
||
|
|
||
|
FreeTube is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
GNU General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
* Credit goes to pavelvaravko for making this css.
|
||
|
* https://codepen.io/pavelvaravko/pen/qjojOr
|
||
|
*/
|
||
|
|
||
|
/* select starting stylings ------------------------------*/
|
||
|
.select {
|
||
|
position: relative;
|
||
|
width: 350px;
|
||
|
}
|
||
|
|
||
|
.select-text {
|
||
|
position: relative;
|
||
|
font-family: inherit;
|
||
|
background-color: transparent;
|
||
|
width: 350px;
|
||
|
padding: 10px 10px 10px 0;
|
||
|
font-size: 18px;
|
||
|
border-radius: 0;
|
||
|
border: none;
|
||
|
}
|
||
|
|
||
|
/* Remove focus */
|
||
|
.select-text:focus {
|
||
|
outline: none;
|
||
|
}
|
||
|
|
||
|
/* Use custom arrow */
|
||
|
.select .select-text {
|
||
|
appearance: none;
|
||
|
-webkit-appearance:none
|
||
|
}
|
||
|
|
||
|
.select:after {
|
||
|
position: absolute;
|
||
|
top: 18px;
|
||
|
right: 10px;
|
||
|
/* Styling the down arrow */
|
||
|
width: 0;
|
||
|
height: 0;
|
||
|
padding: 0;
|
||
|
content: '';
|
||
|
border-left: 6px solid transparent;
|
||
|
border-right: 6px solid transparent;
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
|
||
|
/* LABEL ======================================= */
|
||
|
.select-label {
|
||
|
font-size: 18px;
|
||
|
font-weight: normal;
|
||
|
position: absolute;
|
||
|
pointer-events: none;
|
||
|
left: 0;
|
||
|
top: 10px;
|
||
|
transition: 0.2s ease all;
|
||
|
}
|
||
|
|
||
|
/* active state */
|
||
|
.select-text:focus ~ .select-label, .select-text:valid ~ .select-label {
|
||
|
color: #2196F3;
|
||
|
top: -20px;
|
||
|
transition: 0.2s ease all;
|
||
|
font-size: 14px;
|
||
|
}
|
||
|
|
||
|
/* BOTTOM BARS ================================= */
|
||
|
.select-bar {
|
||
|
position: relative;
|
||
|
display: block;
|
||
|
width: 350px;
|
||
|
}
|
||
|
|
||
|
.select-bar:before, .select-bar:after {
|
||
|
content: '';
|
||
|
height: 2px;
|
||
|
width: 0;
|
||
|
bottom: 1px;
|
||
|
position: absolute;
|
||
|
background: #2196F3;
|
||
|
transition: 0.2s ease all;
|
||
|
}
|
||
|
|
||
|
.select-bar:before {
|
||
|
left: 50%;
|
||
|
}
|
||
|
|
||
|
.select-bar:after {
|
||
|
right: 50%;
|
||
|
}
|
||
|
|
||
|
/* active state */
|
||
|
.select-text:focus ~ .select-bar:before, .select-text:focus ~ .select-bar:after {
|
||
|
width: 50%;
|
||
|
}
|
||
|
|
||
|
/* HIGHLIGHTER ================================== */
|
||
|
.select-highlight {
|
||
|
position: absolute;
|
||
|
height: 60%;
|
||
|
width: 100px;
|
||
|
top: 25%;
|
||
|
left: 0;
|
||
|
pointer-events: none;
|
||
|
opacity: 0.5;
|
||
|
}
|