/* 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 . */ /* * Credit goes to pavelvaravko for making this css. * https://codepen.io/pavelvaravko/pen/qjojOr */ /* select starting stylings ------------------------------*/ .select { position: relative; width: 200px; padding: 0px 10px 10px 0; margin-top: 30px; } .disabled, .disabled + svg.iconSelect { opacity: 0.4; cursor: not-allowed; } .select-text { position: relative; font-family: inherit; background-color: transparent; color: var(--primary-text-color); width: 200px; padding: 10px 10px 10px 0; font-size: 18px; border-radius: 0; border: none; } .select option { color: var(--secondary-text-color); background-color: var(--card-bg-color); } /* Remove focus */ .select-text:focus { outline: none; } /* Use custom arrow */ .select .select-text { appearance: none; -webkit-appearance:none } .iconSelect { position: absolute; top: 10px; right: 15px; /* Styling the down arrow */ padding: 0; content: ''; border-left: 6px solid transparent; border-right: 6px solid transparent; pointer-events: none; color: var(--tertiary-text-color); } .selectTooltip { position: absolute; top: -20px; right: 17px; } /* LABEL ======================================= */ .select-label { font-size: 18px; font-weight: normal; position: absolute; pointer-events: none; left: 0; top: 10px; transition: 0.2s ease all; color: var(--tertiary-text-color); } /* active state */ .select-text:focus ~ .select-label, .select-text:valid ~ .select-label { color: var(--accent-color); top: -20px; transition: 0.2s ease all; font-size: 14px; } /* BOTTOM BARS ================================= */ .select-bar { position: relative; display: block; width: 200px; } .select-bar:before, .select-bar:after { content: ''; height: 2px; width: 0; bottom: 1px; position: absolute; background: var(--accent-color); 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; }