UNPKG

@finos/perspective-viewer

Version:

The `<perspective-viewer>` Custom Element, frontend for Perspective.js

101 lines (87 loc) 4.22 kB
// ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ // ┃ ██████ ██████ ██████ █ █ █ █ █ █▄ ▀███ █ ┃ // ┃ ▄▄▄▄▄█ █▄▄▄▄▄ ▄▄▄▄▄█ ▀▀▀▀▀█▀▀▀▀▀ █ ▀▀▀▀▀█ ████████▌▐███ ███▄ ▀█ █ ▀▀▀▀▀ ┃ // ┃ █▀▀▀▀▀ █▀▀▀▀▀ █▀██▀▀ ▄▄▄▄▄ █ ▄▄▄▄▄█ ▄▄▄▄▄█ ████████▌▐███ █████▄ █ ▄▄▄▄▄ ┃ // ┃ █ ██████ █ ▀█▄ █ ██████ █ ███▌▐███ ███████▄ █ ┃ // ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫ // ┃ Copyright (c) 2017, the Perspective Authors. ┃ // ┃ ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ ┃ // ┃ This file is part of the Perspective library, distributed under the terms ┃ // ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃ // ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛ @mixin icon { background-repeat: no-repeat; background-color: var(--icon--color); content: ""; display: inline-block; -webkit-mask-size: cover; mask-size: cover; } :host { input[type="checkbox"].alternate { appearance: none; height: 14px; width: 14px; padding: 0px; cursor: pointer; outline: none; margin: 0 5px; &:before { @include icon; width: 14px; height: 14px; font-family: var(--button--font-family, inherit); background-color: var(--icon--color, #ccc); -webkit-mask-image: var(--inactive-column-selector--content, none); mask-image: var(--inactive-column-selector--content, none); } &:hover { border-radius: 2px; outline: 1px solid var(--icon--color); } &:checked:hover { background-color: var(--icon--color, #ccc); &:before { background-color: var(--plugin--background, #ccc); } } &:checked:before { -webkit-mask-image: var(--active-column-selector--content, none); mask-image: var(--active-column-selector--content, none); } } input[type="checkbox"] { float: left; appearance: none; height: 14px; width: 14px; padding: 0px; cursor: pointer; outline: none; margin: 0 5px 0 0; &:checked:before { -webkit-mask-image: var(--column-checkbox-on--mask-image); mask-image: var(--column-checkbox-on--mask-image); } &[disabled]:before { opacity: 0.2s; } &:before { @include icon; height: 13px; width: 13px; -webkit-mask-image: var(--column-checkbox-off--mask-image); mask-image: var(--column-checkbox-off--mask-image); } &:hover { background-color: transparent; } &:hover:before { -webkit-mask-image: var(--column-checkbox-hover--mask-image); mask-image: var(--column-checkbox-hover--mask-image); } } input[type="checkbox"]:not(:disabled) { cursor: pointer; } }