blob: 7aa736e1b04b8d6fbe9d40ca35b8a88e45805258 [file] [log] [blame]
// Copyright (C) 2018 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.
:root {
--record-button-color: hsl(213, 50%, 95%);
--record-button-active-color: hsl(213, 70%, 78%);
}
.record-page {
&.three {
@media (min-width: 2000px) {
grid-template: "config command pbtxt" auto / auto auto auto;
}
grid-template: "config command" min-content "config pbtxt" auto / auto auto;
}
&.two {
grid-template: "config command" auto / auto auto;
}
.config {
grid-area: config;
}
.command {
grid-area: command;
}
.pbtxt {
grid-area: pbtxt;
}
.config-presets {
button {
font-size: smaller;
margin-right: 0.5rem;
padding: 3px;
border-radius: 4px;
background-color: var(--record-button-color);
}
button.selected {
background-color: var(--record-button-active-color);
}
}
display: grid;
justify-content: space-evenly;
grid-column-gap: 2rem;
padding: 2rem;
overflow-y: scroll;
* {
overflow: initial;
}
i {
display: block;
padding: 0.5rem 0;
font-size: smaller;
}
.heading {
padding-top: 0.75rem;
}
.control-group {
margin-left: 2rem;
}
.text-column {
// 2-3 alphabets per line is comfortable for reading.
// https://practicaltypography.com/line-length.html
max-width: calc(26ch*2.34 + 1rem);
user-select: text;
word-break: break-word;
}
.example-code {
display: block;
padding: 1rem;
background-color: black;
color: white;
margin: 1rem 0;
margin-top: calc(20px + 1rem);
border-radius: 3px;
position: relative;
border-top-right-radius: 4px;
overflow: initial;
user-select: text;
::before {
height: 20px;
content: "";
display: block;
width: 100%;
background-color: var(--record-button-color);
left: 0;
position: absolute;
right: 0;
top: -18px;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
button {
margin-left: auto;
display: block;
font-style: italic;
font-size: 75%;
}
}
label * {
overflow: visible;
}
input {
margin-right: 0.5rem;
}
label {
margin-bottom: 0.75rem;
overflow: visible;
}
label.range {
display: grid;
grid-template-areas: 'title control unit';
grid-template-columns: 1fr auto 2rem;
align-items: center;
.range-control {
display: flex;
align-items: center;
button {
font-size: smaller;
margin-right: 0.5rem;
padding: 3px;
border-radius: 4px;
background-color: var(--record-button-color);
}
button.selected {
background-color: var(--record-button-active-color);
}
input {
text-align: right;
font-size: 100%;
width: 10ch;
padding: 0;
}
}
& * {
@include transition(0.3s);
}
&.disabled * {
opacity: 0;
}
}
label.multiselect {
display: grid;
grid-template-areas: 'label quick input' 'selected selected selected';
grid-template-columns: 1fr auto auto;
grid-template-rows: auto auto;
align-items: center;
button {
font-size: smaller;
margin-right: 0.5rem;
padding: 3px;
border-radius: 4px;
background-color: var(--record-button-color);
}
input {
text-align: right;
font-size: 100%;
padding: 0;
}
.multiselect-selected {
grid-area: selected;
button {
font-size: smaller;
margin-right: 0.5rem;
margin-top: 0.5rem;
padding: 3px;
border-radius: 4px;
background-color: #fde3e3;
}
}
& * {
@include transition(0.3s);
}
&.disabled * {
opacity: 0;
}
&.disabled .multiselect-selected button {
display: none;
}
}
label.checkbox {
position: relative;
user-select: none;
display: flex;
justify-content: space-between;
align-items: center;
input {
margin-left: 0px;
position: relative;
display: block;
height: 20px;
width: 44px;
background: #89898966;
border-radius: 100px;
cursor: pointer;
transition: all 0.3s ease;
-moz-appearance: none;
-webkit-appearance: none;
&:focus {
outline: none;
}
&::after {
position: absolute;
left: -2px;
top: -3px;
display: block;
width: 26px;
height: 26px;
border-radius: 100px;
background: #f5f5f5;
box-shadow: 0px 3px 3px rgba(0,0,0,0.15);
content: '';
transition: all 0.3s ease;
}
&:checked {
background: #8398b7;
}
&:checked::after {
left: 20px;
background: #27303d;
}
}
&.disabled input {
opacity: 0;
}
}
.disabled {
color: #ddd;
filter: grayscale(1);
}
}