UNPKG

speedy-vision

Version:

GPU-accelerated Computer Vision for JavaScript

234 lines (199 loc) 4.04 kB
/* * speedy-vision.js * GPU-accelerated Computer Vision for the web * Copyright 2020-2021 Alexandre Martins <alemartf(at)gmail.com> * * 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. * * style.css * Stylesheet for the demos */ /* Base style */ body { background: white; color: black; font-family: sans-serif; margin: 16px; } a:any-link { color: royalblue; } h1 { background-color: lightslategrey; color: white; margin: -16px -16px 16px -16px; padding: 16px; } /* Form controls */ form { display: flex; flex-wrap: wrap; align-items: center; flex-direction: row; margin-bottom: 1em; } form label { margin-right: 0.5em; } form label:not(:first-child) { margin-left: 0.5em; } form input { margin-right: 1.5em; } form select { margin: 0.5em; } input, textarea, select, button { margin: 0; box-sizing: border-box; } button { padding: 8px; min-width: 192px; background: royalblue; color: white; border: 0; font-size: 1em; margin: 0.5em 0 0.5em 0; cursor: pointer; } button:hover { background: cornflowerblue; } button:active { background: royalblue; } select { padding: 4px; border: 0; background: whitesmoke; cursor: pointer; box-shadow: 2px 2px 2px lightslategrey; } select option { padding: 4px; } select option:hover { background: royalblue; color: white; } input[type=text], input[type=number] { background: whitesmoke; border: 0; padding: 4px; margin: 0px; box-shadow: -1px -1px 2px lightslategrey; } input[type=number] { width: 64px; } .separator::before { content: '-'; visibility: hidden; height: 1px; } .separator { display: block; width: 100%; } #status { position: absolute; background: rgb(119, 136, 153); color: #fff; padding: 4px; } /* Checkboxes */ input[type=checkbox] { -webkit-appearance: none; -moz-appearance: none; appearance: none; background: whitesmoke; padding: 10px; box-shadow: 2px 2px 2px lightslategrey; position: relative; } input[type=checkbox]::after { content: ''; font-size: 18px; position: absolute; top: -0px; left: 2px; } input[type=checkbox]:checked, input[type=checkbox]:active { background: royalblue; color: white; } input[type=checkbox]:checked::after { content: '\2714'; padding: 0; margin: 0; } /* range sliders */ input[type=range] { -webkit-appearance: none; cursor: pointer; } input[type=range]::-webkit-slider-thumb { background: royalblue; width: 16px; height: 16px; border-radius: 16px; -webkit-appearance: none; } input[type=range]::-moz-range-thumb { background: royalblue; width: 16px; height: 16px; border-radius: 16px; } input[type=range]::-ms-thumb { background: royalblue; width: 16px; height: 16px; border-radius: 16px; } input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 16px; border-radius: 16px; background: whitesmoke; box-shadow: 1px 1px 2px lightslategrey; } input[type=range]::-moz-range-track { width: 100%; height: 16px; border-radius: 16px; background: whitesmoke; box-shadow: 1px 1px 2px lightslategrey; } input[type=range]::-ms-track { width: 100%; height: 16px; border-radius: 16px; background: whitesmoke; box-shadow: 1px 1px 2px lightslategrey; } /* Watermark */ mark { position: fixed; bottom: 0px; right: 0px; padding: 0.5em; color: lightslategrey; background: rgba(255, 255, 255, 0.8); font-weight: bold; } mark a:any-link { color: lightslategrey; }