blob: 5025959e8c83d07a85d6d941e4515e0194433abf [file] [log] [blame]
// Copyright (C) 2024 The Android Open Source Project
//
// 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.
@use "sass:math";
@mixin track_shell_title() {
font-size: 14px;
max-height: 30px;
overflow: hidden;
text-align: left;
overflow-wrap: break-word;
font-family: "Roboto Condensed", sans-serif;
font-weight: 300;
line-break: anywhere;
}
.track-content.pf-track-content-error {
// Necessary trig because we have a 45deg stripes
$pattern-density: 1px * math.sqrt(2);
$pattern-col: #ddd;
// box-shadow: inset 0 0 0 5px red;
background: repeating-linear-gradient(
-45deg,
$pattern-col,
$pattern-col $pattern-density,
white $pattern-density,
white $pattern-density * 2
);
}
.track {
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: 1fr 0;
&::after {
display: block;
content: "";
grid-column: 1 / span 2;
border-top: 1px solid var(--track-border-color);
margin-top: -1px;
z-index: 2;
}
.track-shell {
@include transition();
padding-left: 10px;
display: grid;
cursor: grab;
grid-template-areas: "title buttons";
grid-template-columns: 1fr auto;
align-items: center;
width: var(--track-shell-width);
border-right: 1px solid #c7d0db;
overflow: hidden;
&.drag {
background-color: #eee;
box-shadow: 0 4px 12px -4px #999 inset;
}
&.drop-before {
box-shadow: 0 4px 2px -1px hsl(213, 40%, 50%) inset;
}
&.drop-after {
box-shadow: 0 -4px 2px -1px hsl(213, 40%, 50%) inset;
}
&.selected {
background-color: #ebeef9;
}
.chip {
background-color: #bed6ff;
border-radius: $pf-border-radius;
font-size: smaller;
padding: 0 0.1rem;
margin-left: 1ch;
}
h1 {
grid-area: title;
color: hsl(213, 22%, 30%);
@include track_shell_title();
}
.track-buttons {
grid-area: buttons;
display: flex;
height: 100%;
align-items: center;
}
.track-button {
@include transition();
color: rgb(60, 86, 136);
cursor: pointer;
width: 22px;
font-size: 18px;
visibility: hidden;
}
.track-button.show {
visibility: visible;
}
.track-button.full-height {
display: flex;
height: 100%;
align-items: center;
justify-content: center;
&:hover {
background-color: #ebeef9;
}
}
&:hover .track-button {
visibility: visible;
}
&.flash {
background-color: #ffe263;
}
}
}
.track-group-panel {
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: 1fr;
height: 40px;
&::after {
display: block;
content: "";
grid-column: 1 / span 2;
border-top: 1px solid var(--track-border-color);
margin-top: -1px;
}
&[collapsed="true"] {
background-color: var(--collapsed-background);
.shell {
border-right: 1px solid #c7d0db;
}
.track-button {
color: rgb(60, 86, 136);
}
}
&[collapsed="false"] {
background-color: var(--expanded-background);
color: white;
font-weight: bold;
.shell.flash {
color: #121212;
}
.track-button {
color: white;
}
span.chip {
color: #121212;
}
}
.shell {
padding: 4px 4px;
display: grid;
grid-template-areas: "fold-button title buttons check";
grid-template-columns: 28px 1fr auto 20px;
align-items: center;
line-height: 1;
width: var(--track-shell-width);
min-height: 40px;
.track-title {
user-select: text;
}
.track-subtitle {
font-size: 0.6rem;
font-weight: normal;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
// Maximum width according to grid-template-columns value for .shell
width: calc(var(--track-shell-width) - 56px);
}
.chip {
background-color: #bed6ff;
border-radius: 3px;
font-size: smaller;
padding: 0 0.1rem;
margin-left: 1ch;
}
.title-wrapper {
grid-area: title;
overflow: hidden;
}
h1 {
@include track_shell_title();
}
.fold-button {
grid-area: fold-button;
}
.track-button {
font-size: 20px;
}
&:hover {
cursor: pointer;
.fold-button {
color: hsl(45, 100%, 48%);
}
}
&.flash {
background-color: #ffe263;
}
&.selected {
background-color: #ebeef9;
}
}
.track-content {
display: grid;
span {
@include track_shell_title();
align-self: center;
}
}
}