blob: 55cd2b4e1c7f4dd2753ae520fc531858b0d32945 [file] [log] [blame]
/*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*/
body {
--color-swatch-border-width: 1px;
--color-swatch-margin: 1px;
--color-swatch-height: 20px;
--color-swatch-padding: 0;
--color-swatch-width: 20px;
-webkit-user-select: none;
background-color: white;
font: -webkit-small-control;
margin: 0;
overflow: hidden;
}
body.controls-refresh {
--color-swatch-margin: 3px;
--color-swatch-height: 18px;
--color-swatch-width: 18px;
--scrollbar-width: 4px;
}
.color-suggestion-picker-main {
background-color: white;
border: solid 1px #8899aa;
box-shadow: inset 2px 2px 2px white,
inset -2px -2px 1px rgba(0,0,0,0.1);
padding: 6px;
float: left;
}
.controls-refresh .color-suggestion-picker-main {
border: 1px solid #bfbfbf;
box-shadow: none;
padding: 8px 8px 4px 8px;
}
.color-swatch {
float: left;
width: var(--color-swatch-width);
height: var(--color-swatch-height);
margin: var(--color-swatch-margin);
padding: var(--color-swatch-padding);
border: var(--color-swatch-border-width) solid #e0e0e0;
border-radius: 0;
box-sizing: content-box;
}
.controls-refresh .color-swatch {
border: var(--color-swatch-border-width) solid rgba(0, 0, 0, 0.19);
border-radius: 2px;
}
.color-swatch:focus {
border: var(--color-swatch-border-width) solid #000000;
outline: none;
}
.color-swatch-container {
width: 100%;
max-height: 104px;
overflow: auto;
display: flex;
flex-flow: row wrap;
align-items: center;
}
.controls-refresh .color-swatch-container {
margin: 4px;
}
.controls-refresh .color-swatch-container::-webkit-scrollbar {
width: var(--scrollbar-width);
}
.controls-refresh .color-swatch-container::-webkit-scrollbar-thumb {
background-color: #cecece;
border-radius: 2px;
height: 47px;
margin: 20px;
width: 4px;
}
.controls-refresh .color-swatch:focus {
outline: solid 2px -webkit-focus-ring-color;
outline-offset: -2px;
}
.other-color {
width: 100%;
margin: 4px 0 0 0;
}
.controls-refresh .other-color {
background-color: #ffffff;
border-color: transparent;
border-radius: 2px;
color: #000000;
font-size: 12px;
line-height: 16px;
margin: 0;
text-align: left;
}
.controls-refresh .other-color:hover {
background-color: #f3f3f3;
}
@media (forced-colors: active) {
.controls-refresh .color-suggestion-picker-main {
border: 1px solid WindowText;
}
.controls-refresh .color-swatch {
forced-color-adjust: none;
border-color: WindowText;
}
.controls-refresh .color-swatch:focus {
outline-color: Highlight;
}
.controls-refresh .color-swatch-container {
forced-color-adjust: none;
}
.controls-refresh .color-swatch-container::-webkit-scrollbar-thumb {
background-color: WindowText;
}
}
@media (prefers-color-scheme: dark) {
.controls-refresh .color-suggestion-picker-main {
background: #3B3B3B;
color: #FFFFFF;
border: 1px solid #858585;
box-shadow: none;
}
.controls-refresh .color-swatch {
border-color: #858585;
}
.controls-refresh .color-swatch:focus {
outline-color: Highlight;
}
.controls-refresh .other-color,
.controls-refresh .other-color:hover {
background: #3B3B3B;
color: #FFFFFF;
border: 1px solid #858585;
}
.controls-refresh .other-color:hover{
border: 1px solid #ACACAC;
}
.controls-refresh .color-swatch-container::-webkit-scrollbar-thumb {
background-color: WindowText;
}
}