UNPKG

topcoat-range

Version:

Topcoat default range skin

162 lines (141 loc) 3.68 kB
/** * * Copyright 2012 Adobe Systems Inc.; * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ @font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Light.otf'); font-weight: 200; } @font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Semibold.otf'); font-weight: 600; } body { font: 16px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-weight: 400; } body { margin: 0; padding: 0; background: hsla(180, 5%, 88%, 1); } :focus { outline-color: transparent; outline-style: none; } .topcoat-range { padding: 0; margin: 0; font: inherit; color: inherit; background: transparent; border: none; } .topcoat-range { vertical-align: top; outline: none; } .topcoat-range { -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; } .topcoat-range:disabled { opacity: 0.3; cursor: default; pointer-events: none; } .topcoat-range { -webkit-appearance: none; } .topcoat-range::-moz-range-thumb { cursor: pointer; -webkit-appearance: none; } .topcoat-range::-webkit-slider-thumb { cursor: pointer; -webkit-appearance: none; } /* topdoc name: Range description: Range input modifiers: :active: Active state :disabled: Disabled state :hover: Hover state :focus: Focused markup: <input type="range" class="topcoat-range"> <input type="range" class="topcoat-range" disabled> examples: mobile range: http://codepen.io/Topcoat/pen/BskEn tags: - desktop - mobile - range */ .topcoat-range { border-radius: 6px; border: 1px solid hsla(168, 8%, 65%, 1); background-color: hsla(0, 100%, 100%, 1); height: 1rem; border-radius: 30px; } .topcoat-range::-moz-range-track { border-radius: 6px; border: 1px solid hsla(168, 8%, 65%, 1); background-color: hsla(0, 100%, 100%, 1); height: 1rem; border-radius: 30px; } .topcoat-range::-webkit-slider-thumb { height: 3rem; width: 2rem; background-color: hsla(165, 8%, 91%, 1); border: 1px solid hsla(168, 8%, 65%, 1); border-radius: 6px; box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); } .topcoat-range::-moz-range-thumb { height: 3rem; width: 2rem; background-color: hsla(165, 8%, 91%, 1); border: 1px solid hsla(168, 8%, 65%, 1); border-radius: 6px; box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); } .topcoat-range:focus::-webkit-slider-thumb { border: 1px solid hsla(227, 100%, 50%, 1); box-shadow: inset 0 1px hsla(0, 100%, 100%, 0.36), 0 0 0 2px hsla(208, 82%, 69%, 1); } .topcoat-range:focus::-moz-range-thumb { border: 1px solid hsla(227, 100%, 50%, 1); box-shadow: inset 0 1px hsla(0, 100%, 100%, 0.36), 0 0 0 2px hsla(208, 82%, 69%, 1); } .topcoat-range:active::-webkit-slider-thumb { border: 1px solid hsla(168, 8%, 65%, 1); box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); } .topcoat-range:active::-moz-range-thumb { border: 1px solid hsla(168, 8%, 65%, 1); box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); }