blob: fff0b6e1904d96b2eb1eddd7691594d2fe29eb39 [file] [log] [blame]
/*
* Copyright (C) 2013-2017 Apple 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.
*/
.toolbar {
position: absolute;
top: 0;
left: 0;
right: 0;
height: var(--toolbar-height);
display: flex;
padding-top: 3px;
padding-bottom: 3px;
white-space: nowrap;
overflow: hidden;
outline: none;
}
body .toolbar {
background-image: linear-gradient(to bottom, hsl(0, 0%, 92%), hsl(0, 0%, 87%));
box-shadow: inset hsla(0, 0%, 100%, 0.5) 0 1px 1px;
}
body.window-inactive .toolbar {
background-image: none;
background-color: hsl(0, 0%, 96%);
}
body.mac-platform:not(.docked) .toolbar {
padding-top: 21px;
}
body.mac-platform:not(.docked) {
--toolbar-height: 54px;
}
.toolbar .control-section {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
min-width: -webkit-min-content;
-webkit-padding-start: 6px;
-webkit-padding-end: 2px;
}
.toolbar .item-section {
display: flex;
flex: 1;
min-width: -webkit-min-content;
}
.toolbar .item-section.left {
justify-content: flex-start;
}
.toolbar .item-section.center-left {
justify-content: flex-start;
}
.toolbar .item-section.center-right {
justify-content: center;
}
.toolbar .item-section.center {
justify-content: center;
}
.toolbar .item-section.right {
justify-content: flex-end;
padding-right: 4px;
}
.toolbar .item {
display: flex;
outline: none;
}
.toolbar .search-bar {
width: 100%;
min-width: 125px;
}
.toolbar .search-bar > input[type="search"] {
width: 100%;
font-size: 12px;
background-clip: initial;
margin: 4px;
}
.toolbar .search-bar > input[type="search"]::-webkit-textfield-decoration-container {
margin-left: 4px;
}
body.legacy-mac .toolbar .item.button,
body.legacy-mac .toolbar .search-bar > input[type="search"],
body.legacy-mac .toolbar .dashboard-container {
background-color: hsl(0, 0%, 99%);
border: 1px solid transparent;
border-top-color: hsl(0, 0%, 100%);
box-shadow: hsla(0, 0%, 0%, 0.15) 0 1px 0;
border-radius: 4px;
}
body.legacy-mac .toolbar .search-bar > input[type="search"] {
box-shadow: 0 0 0 7px hsla(211, 96%, 48%, 0);
transition: box-shadow .25s cubic-bezier(0.165, 0.840, 0.440, 1) /* easeOutQuart */;
}
body.legacy-mac .toolbar .search-bar > input[type="search"]:focus {
box-shadow: hsla(0, 0%, 0%, 0.15) 0 1px 0, 0 0 0 3px hsla(211, 96%, 48%, 0.4);
}
body.legacy-mac .toolbar .item.button:active {
border-top-color: hsl(0, 0%, 94%);
background-color: hsl(0, 0%, 89%);
}
body.window-inactive.legacy-mac .toolbar .item.button,
body.window-inactive.legacy-mac .toolbar .search-bar > input[type="search"],
body.window-inactive.legacy-mac .toolbar .dashboard-container {
border: 1px solid hsl(0, 0%, 86%);
background-color: hsl(0, 0%, 96%);
box-shadow: none;
}
body.latest-mac .toolbar .item.button,
body.latest-mac .toolbar .search-bar > input[type="search"],
body.latest-mac .toolbar .dashboard-container {
background-image: linear-gradient(hsl(0, 0%, 99%), var(--panel-background-color));
box-shadow: hsla(0, 0%, 0%, 0.3) 0 1px 1px -1px;
border-radius: 4px;
border: 1px solid hsl(0, 1%, 82%);
border-top-color: hsl(0, 0%, 83%);
border-bottom-color: hsl(0, 0%, 76%);
}
body.latest-mac .toolbar .search-bar > input[type="search"] {
box-shadow: hsla(0, 0%, 0%, 0.3) 0 1px 1px -1px, 0 0 0 7px hsla(211, 96%, 48%, 0);
transition: box-shadow .25s cubic-bezier(0.165, 0.840, 0.440, 1) /* easeOutQuart */;
}
body.latest-mac .toolbar .search-bar > input[type="search"]:focus {
box-shadow: hsla(0, 0%, 0%, 0.15) 0 1px 0, 0 0 0 3px hsla(211, 96%, 48%, 0.4);
}
@media (-webkit-min-device-pixel-ratio: 2) {
body.latest-mac .toolbar .item.button,
body.latest-mac .toolbar .search-bar > input[type="search"],
body.latest-mac .toolbar .dashboard-container {
border: 0.5px solid hsl(0, 0%, 78%);
border-top-color: hsl(0, 0%, 80%);
border-bottom-color: hsl(0, 0%, 65%);
}
}
body.latest-mac .toolbar .item.button:active {
background-image: linear-gradient(hsl(0, 0%, 89%), hsl(0, 0%, 86%));
box-shadow: hsla(0, 0%, 0%, 0.3) 0 1px 1px -1px, inset 0 1px 1px -1px white;
}
body.latest-mac.window-inactive .toolbar .item.button,
body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"],
body.latest-mac.window-inactive .toolbar .dashboard-container {
opacity: 0.65;
border-color: hsla(0, 0%, 0%, 0.15);
background-color: transparent;
background-image: none;
}
@media (-webkit-min-device-pixel-ratio: 2) {
body.latest-mac.window-inactive .toolbar .item.button,
body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"],
body.latest-mac.window-inactive .toolbar .dashboard-container {
box-shadow: inset 0 0 1px 0 hsla(0, 0%, 0%, 0.1);
}
}
@media (max-width: 539px) {
.toolbar .item.download {
display: none;
}
}
@media (prefers-color-scheme: dark) {
body .toolbar {
background-image: linear-gradient(to bottom, hsl(0, 0%, 25%), hsl(0, 0%, 22%));
box-shadow: none;
}
body.window-inactive .toolbar {
background-color: var(--background-color);
}
body.latest-mac .toolbar .item.button,
body.latest-mac .toolbar .search-bar > input[type="search"] {
background-image: none;
background-color: var(--button-background-color);
border-color: var(--button-background-color);
border-top-color: hsla(0, 100%, 100%, 0.2);
box-shadow: none;
}
body.latest-mac .toolbar .search-bar > input[type="search"] {
color: var(--text-color);
}
body.latest-mac .toolbar .search-bar > input[type="search"]:focus {
color: var(--text-color-active);
/* FIXME: Use native outline for the default theme as well. */
box-shadow: unset;
transition: unset;
outline: -webkit-focus-ring-color auto 5px;
outline-offset: -3px;
}
body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder {
color: var(--text-color-secondary);
}
body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder {
color: var(--text-color-tertiary);
}
body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button {
/* Setting `color` has no effect on the magnifying glass icon. */
opacity: 0.5;
}
body.latest-mac .toolbar .dashboard-container {
background-image: none;
background-color: var(--dashboard-background-color);
border-color: var(--dashboard-background-color);
border-top-color: hsla(0, 100%, 100%, 0.1);
box-shadow: none;
}
body.latest-mac .toolbar .item.button:active {
background-image: none;
border-top-color: hsla(0, 100%, 100%, 0.2);
box-shadow: none;
}
body.latest-mac.window-inactive .toolbar .item.button,
body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"],
body.latest-mac.window-inactive .toolbar .dashboard-container {
opacity: 1;
color: var(--glyph-color);
border-color: transparent;
border-top-color: hsla(0, 100%, 100%, 0.1);
background-image: none;
background: var(--button-background-color-inactive);
}
}