@adobe/coral-spectrum
Version:
Coral Spectrum is a JavaScript library of Web Components following Spectrum design patterns.
335 lines (310 loc) • 9.29 kB
CSS
/**
* Copyright 2019 Adobe. All rights reserved.
* This file is licensed to you 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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
._coral-TreeView {
display: block;
list-style: none;
position: relative;
padding: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
outline: none;
}
._coral-TreeView-item {
overflow: hidden;
}
._coral-TreeView-item.is-open > ._coral-TreeView-itemLink > ._coral-TreeView-indicator {
transform: rotate(90deg);
}
._coral-TreeView-item.is-open > ._coral-TreeView {
height: auto;
visibility: visible;
}
._coral-TreeView-itemLink {
display: block;
box-sizing: border-box;
cursor: pointer;
padding: 12px 30px;
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
._coral-TreeView-itemLink:focus {
outline: none;
}
._coral-TreeView-itemLink ._coral-Icon {
vertical-align: top;
margin-right: 8px;
}
._coral-TreeView-itemLink::before {
content: '';
position: absolute;
left: 2px;
right: 0;
z-index: -1;
margin-top: -8px;
height: 36px;
background-color: transparent;
border-radius: 4px;
}
._coral-TreeView-indicator {
display: block;
box-sizing: content-box;
float: left;
position: relative;
left: 10px;
top: -5px;
margin-left: -34px;
margin-bottom: -10px;
padding: 10px;
transition: transform ease 130ms;
pointer-events: all ;
}
._coral-TreeView ._coral-TreeView {
position: static;
padding-left: 28px;
height: 0;
visibility: hidden;
}
._coral-TreeView-item--indent1 {
padding-left: 28px;
}
._coral-TreeView-item--indent2 {
padding-left: 56px;
}
._coral-TreeView-item--indent3 {
padding-left: 84px;
}
._coral-TreeView-item--indent4 {
padding-left: 112px;
}
._coral-TreeView-item--indent5 {
padding-left: 140px;
}
._coral-TreeView-item--indent6 {
padding-left: 168px;
}
._coral-TreeView-item--indent7 {
padding-left: 196px;
}
._coral-TreeView-item--indent8 {
padding-left: 224px;
}
._coral-TreeView-item--indent9 {
padding-left: 252px;
}
._coral-TreeView-item--indent10 {
padding-left: 280px;
}
.coral--large ._coral-TreeView-itemLink {
padding: 12px 30px;
}
.coral--large ._coral-TreeView-itemLink ._coral-Icon {
margin-right: 10px;
}
.coral--large ._coral-TreeView-itemLink::before {
left: 2px;
margin-top: -8px;
height: 45px;
border-radius: 5px;
}
.coral--large ._coral-TreeView-indicator {
left: 13px;
top: -6px;
margin-left: -42px;
margin-bottom: -13px;
padding: 13px;
transition: transform ease 130ms;
}
.coral--large ._coral-TreeView ._coral-TreeView,.coral--large ._coral-TreeView-item--indent1 {
padding-left: 35px;
}
.coral--large ._coral-TreeView-item--indent2 {
padding-left: 70px;
}
.coral--large ._coral-TreeView-item--indent3 {
padding-left: 105px;
}
.coral--large ._coral-TreeView-item--indent4 {
padding-left: 140px;
}
.coral--large ._coral-TreeView-item--indent5 {
padding-left: 175px;
}
.coral--large ._coral-TreeView-item--indent6 {
padding-left: 210px;
}
.coral--large ._coral-TreeView-item--indent7 {
padding-left: 245px;
}
.coral--large ._coral-TreeView-item--indent8 {
padding-left: 280px;
}
.coral--large ._coral-TreeView-item--indent9 {
padding-left: 315px;
}
.coral--large ._coral-TreeView-item--indent10 {
padding-left: 350px;
}
.coral--light ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink {
color: rgb(179, 179, 179);
}
.coral--light ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink ._coral-Icon {
color: rgb(202, 202, 202);
}
.coral--light ._coral-TreeView-itemLink {
color: rgb(75, 75, 75);
}
.coral--light ._coral-TreeView-itemLink:hover,
.coral--light ._coral-TreeView-itemLink.is-selected {
color: rgb(44, 44, 44);
}
.coral--light ._coral-TreeView-itemLink:hover::before,
.coral--light ._coral-TreeView-itemLink.is-selected::before {
background-color: rgba(44,44,44,0.04);
}
.coral--light ._coral-TreeView-itemLink.focus-ring {
color: rgb(44, 44, 44);
}
.coral--light ._coral-TreeView-itemLink.focus-ring::before {
background-color: rgba(44,44,44,0.04);
box-shadow: 0px 0px 0px 2px rgb(38, 128, 235) inset;
}
.coral--light ._coral-TreeView-itemLink.is-drop-target::before {
background-color: rgba(20,115,230,0.1);
box-shadow: 0px 0px 0px 2px rgb(38, 128, 235) inset;
}
.coral--lightest ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink {
color: rgb(188, 188, 188);
}
.coral--lightest ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink ._coral-Icon {
color: rgb(211, 211, 211);
}
.coral--lightest ._coral-TreeView-itemLink {
color: rgb(80, 80, 80);
}
.coral--lightest ._coral-TreeView-itemLink:hover,
.coral--lightest ._coral-TreeView-itemLink.is-selected {
color: rgb(50, 50, 50);
}
.coral--lightest ._coral-TreeView-itemLink:hover::before,
.coral--lightest ._coral-TreeView-itemLink.is-selected::before {
background-color: rgba(50,50,50,0.04);
}
.coral--lightest ._coral-TreeView-itemLink.focus-ring {
color: rgb(50, 50, 50);
}
.coral--lightest ._coral-TreeView-itemLink.focus-ring::before {
background-color: rgba(50,50,50,0.04);
box-shadow: 0px 0px 0px 2px rgb(55, 142, 240) inset;
}
.coral--lightest ._coral-TreeView-itemLink.is-drop-target::before {
background-color: rgba(38,128,235,0.1);
box-shadow: 0px 0px 0px 2px rgb(55, 142, 240) inset;
}
.coral--dark ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink {
color: rgb(110, 110, 110);
}
.coral--dark ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink ._coral-Icon {
color: rgb(90, 90, 90);
}
.coral--dark ._coral-TreeView-itemLink {
color: rgb(227, 227, 227);
}
.coral--dark ._coral-TreeView-itemLink:hover,
.coral--dark ._coral-TreeView-itemLink.is-selected {
color: rgb(255, 255, 255);
}
.coral--dark ._coral-TreeView-itemLink:hover::before,
.coral--dark ._coral-TreeView-itemLink.is-selected::before {
background-color: rgba(255,255,255,0.06);
}
.coral--dark ._coral-TreeView-itemLink.focus-ring {
color: rgb(255, 255, 255);
}
.coral--dark ._coral-TreeView-itemLink.focus-ring::before {
background-color: rgba(255,255,255,0.06);
box-shadow: 0px 0px 0px 2px rgb(38, 128, 235) inset;
}
.coral--dark ._coral-TreeView-itemLink.is-drop-target::before {
background-color: rgba(55,142,240,0.15);
box-shadow: 0px 0px 0px 2px rgb(38, 128, 235) inset;
}
.coral--darkest ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink {
color: rgb(92, 92, 92);
}
.coral--darkest ._coral-TreeView-item.is-disabled > ._coral-TreeView-itemLink ._coral-Icon {
color: rgb(73, 73, 73);
}
.coral--darkest ._coral-TreeView-itemLink {
color: rgb(200, 200, 200);
}
.coral--darkest ._coral-TreeView-itemLink:hover,
.coral--darkest ._coral-TreeView-itemLink.is-selected {
color: rgb(239, 239, 239);
}
.coral--darkest ._coral-TreeView-itemLink:hover::before,
.coral--darkest ._coral-TreeView-itemLink.is-selected::before {
background-color: rgba(239,239,239,0.08);
}
.coral--darkest ._coral-TreeView-itemLink.focus-ring {
color: rgb(239, 239, 239);
}
.coral--darkest ._coral-TreeView-itemLink.focus-ring::before {
background-color: rgba(239,239,239,0.08);
box-shadow: 0px 0px 0px 2px rgb(20, 115, 230) inset;
}
.coral--darkest ._coral-TreeView-itemLink.is-drop-target::before {
background-color: rgba(38,128,235,0.2);
box-shadow: 0px 0px 0px 2px rgb(20, 115, 230) inset;
}
._coral-TreeView {
transition: height 250ms cubic-bezier(.45, 0, .40, 1);
overflow: hidden;
}
._coral-TreeView ._coral-TreeView {
height: inherit;
visibility: inherit;
}
._coral-TreeView ._coral-TreeView-item--leaf > ._coral-TreeView-itemLink > ._coral-TreeView-indicator {
display: none;
}
.coral--darkest ._coral-TreeView-itemLink.is-disabled {
color: #494949;
cursor: default;
}
.coral--darkest ._coral-TreeView-itemLink.is-disabled:hover:before {
background-color: transparent;
}
.coral--dark ._coral-TreeView-itemLink.is-disabled {
color: #5c5c5c;
cursor: default;
}
.coral--dark ._coral-TreeView-itemLink.is-disabled:hover:before {
background-color: transparent;
}
.coral--light ._coral-TreeView-itemLink.is-disabled {
color: #b3b3b3;
cursor: default;
}
.coral--light ._coral-TreeView-itemLink.is-disabled:hover:before {
background-color: transparent;
}
.coral--lightest ._coral-TreeView-itemLink.is-disabled {
color: #bcbcbc;
cursor: default;
}
.coral--lightest ._coral-TreeView-itemLink.is-disabled:hover:before {
background-color: transparent;
}