Files

430 lines
6.7 KiB
CSS

/* Matches the look of sdpi-components (Stream Deck's property inspector is always dark). */
:root {
/* Dark native controls (e.g. the text fields) in hosts that would otherwise draw them light, such as OpenDeck. */
color-scheme: dark;
}
body {
margin: 0;
padding: 4px 10px 16px;
background: #2d2d2d;
color: #d8d8d8;
font-family: "Segoe UI", Arial, Roboto, Helvetica, sans-serif;
font-size: 9pt;
line-height: 1.4;
}
[hidden] {
display: none !important;
}
/* As wide as the settings of the other FeloDeck plugins. */
.status,
.connection,
#action-settings {
max-width: 560px;
}
/* Connection status */
.status {
--status-color: #8b8b8b;
display: flex;
gap: 10px;
align-items: flex-start;
margin: 6px 0 10px;
padding: 9px 12px;
border-left: 3px solid var(--status-color);
border-radius: 5px;
background: #3a3a3a;
}
.status[data-status="connected"] {
--status-color: #3fb950;
}
.status[data-status="unauthorized"] {
--status-color: #e3a008;
}
.status[data-status="unreachable"],
.status[data-status="error"] {
--status-color: #f25c54;
}
.status-dot {
flex: none;
width: 9px;
height: 9px;
margin-top: 4px;
border-radius: 50%;
background: var(--status-color);
}
.status[data-status="checking"] .status-dot,
.status[data-status="connecting"] .status-dot {
animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
50% {
opacity: 0.3;
}
}
.status-text {
flex: 1;
min-width: 0;
}
.status-title {
display: block;
color: #fff;
font-weight: 600;
}
.status-hint {
display: block;
margin-top: 2px;
color: #b3b3b3;
overflow-wrap: anywhere;
}
.status-hint:empty {
display: none;
}
/* "Change": opens the connection settings below. */
.status-action {
flex: none;
padding: 0 2px;
border: 0;
background: none;
color: #2b7fff;
font: inherit;
cursor: pointer;
}
.status-action:hover {
text-decoration: underline;
}
/* Connected: one quiet line instead of a card. */
.status.quiet {
align-items: center;
gap: 7px;
margin: 2px 0 10px;
padding: 0;
border: 0;
background: none;
}
.status.quiet .status-dot {
width: 7px;
height: 7px;
margin: 0;
}
.status.quiet .status-text {
display: flex;
gap: 7px;
align-items: baseline;
}
.status.quiet .status-title {
color: #969696;
font-weight: 400;
}
.status.quiet .status-hint {
margin: 0;
color: #6b6b6b;
}
/* Connection settings, opened from the status line. */
.connection {
margin: 0 0 12px;
padding: 10px 0 6px;
border-radius: 5px;
background: #353535;
}
.box-title {
margin: 0 12px 6px;
color: #e6e6e6;
font-weight: 600;
}
/* Sections of the action settings. The heading folds the settings below it. */
.heading {
margin: 14px 0 4px;
padding-bottom: 3px;
border-bottom: 1px solid #404040;
color: #969696;
font-size: 8pt;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.section > summary {
cursor: pointer;
list-style: none;
user-select: none;
}
.section > summary::-webkit-details-marker {
display: none;
}
.section > summary::before {
content: "";
display: inline-block;
margin: 0 6px 1px 1px;
border-style: solid;
border-width: 3.5px 0 3.5px 5px;
border-color: transparent transparent transparent currentColor;
transition: transform 0.15s;
}
.section[open] > summary::before {
transform: rotate(90deg);
}
.section > summary:hover {
color: #d8d8d8;
}
/* Choices with a small picture of the key. The chosen one gets the blue frame OpenDeck puts around the selected key. */
.tiles {
display: inline-grid;
grid-auto-columns: 1fr;
grid-auto-flow: column;
gap: 6px;
}
.tile {
display: flex;
flex-direction: column;
align-items: center;
gap: 7px;
min-width: 88px;
padding: 10px 8px 7px;
border: 0;
border-radius: 8px;
background: #3d3d3d;
color: #969696;
font: inherit;
cursor: pointer;
transition: background-color 0.12s;
}
.tile:hover {
background: #454545;
}
.tile:focus-visible {
outline: 2px solid rgb(43 127 255 / 0.5);
outline-offset: 1px;
}
.tile-key {
display: block;
width: 62px;
height: 62px;
overflow: hidden;
border-radius: 12px;
background: #000;
box-shadow: 0 0 0 2px #4a4a4a;
transition: box-shadow 0.12s;
}
.tile-key svg {
display: block;
width: 100%;
height: 100%;
}
.tile.on {
background: rgb(43 127 255 / 0.14);
color: #fff;
}
.tile.on .tile-key {
box-shadow: 0 0 0 2px #2b7fff;
}
/* Choices side by side, like in obs-tools. */
.segmented {
display: inline-flex;
flex-wrap: wrap;
gap: 2px;
padding: 2px;
border-radius: 4px;
background: #3d3d3d;
}
.segmented button {
padding: 3px 10px;
border: 0;
border-radius: 3px;
background: transparent;
color: #d8d8d8;
font: inherit;
cursor: pointer;
}
.segmented button:hover {
background: #454545;
}
.segmented button.on {
background: #2b7fff;
color: #fff;
}
.steps {
margin: 0;
padding: 0 12px 0 32px;
}
.steps li + li {
margin-top: 5px;
}
.steps b {
color: #fff;
font-weight: 600;
}
code {
padding: 0 4px;
border-radius: 3px;
background: #252525;
color: #fff;
font-family: Consolas, Menlo, monospace;
font-size: 0.95em;
user-select: all;
}
.note {
margin: 8px 12px;
color: #969696;
}
.hint {
margin: 0 0 10px;
padding: 8px 12px;
border-left: 3px solid #e3a008;
border-radius: 5px;
background: #3a3a3a;
color: #d8d8d8;
}
/* Drop-down, like in obs-tools (property-inspector.js builds it). */
.dropdown {
position: relative;
width: 100%;
min-width: 0;
color: #d8d8d8;
}
.dd-button {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
height: 26px;
padding: 0 9px 0 8px;
border: 0;
border-radius: 3px;
background: #3d3d3d;
color: #d8d8d8;
font: inherit;
text-align: left;
cursor: pointer;
}
.dd-button:hover {
background: #454545;
}
.dd-button:focus-visible,
.dropdown.open .dd-button {
box-shadow: 0 0 0 1px #2b7fff;
outline: none;
}
.dd-label {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dd-chevron {
display: flex;
color: #969696;
transition: transform 0.15s;
}
.dropdown.open .dd-chevron {
transform: rotate(180deg);
}
.dd-pop {
position: absolute;
z-index: 50;
top: calc(100% + 4px);
left: 0;
right: 0;
padding: 4px;
border: 1px solid rgb(255 255 255 / 0.08);
border-radius: 5px;
background: #3a3a3a;
box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
}
.dd-pop.up {
top: auto;
bottom: calc(100% + 4px);
}
.dd-item {
display: flex;
align-items: center;
gap: 6px;
min-height: 26px;
padding: 3px 8px 3px 4px;
border-radius: 3px;
cursor: pointer;
}
.dd-item.active {
background: #4a4a4a;
}
.dd-item.selected {
color: #fff;
}
.dd-check {
display: flex;
flex: none;
align-items: center;
justify-content: center;
width: 16px;
color: #2b7fff;
}
.dd-item.active .dd-check {
color: #5c9cff;
}
.dd-text {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}