Files
l5rx-chiaroscuro/system/styles/scss/ui.scss

1057 lines
26 KiB
SCSS

/* SCSS */
@mixin theme-dark {
// Restricted entries
--l5r5e-restricted-opacity: 0.6;
--l5r5e-restricted-filter: grayscale(0.3);
// l5r5e-multi-select
--l5r5e-dropdown-bg: var(--color-cool-4, #302831);
--l5r5e-dropdown-color: var(--color-light-2, #efe6d8);
--l5r5e-dropdown-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
--l5r5e-dropdown-group-color: var(--color-light-5, #9f8475);
--l5r5e-dropdown-group-bg: rgba(255, 255, 255, 0.05);
--l5r5e-dropdown-option-color: var(--color-light-2, #efe6d8);
--l5r5e-dropdown-no-results-color: var(--color-light-5, #9f8475);
--l5r5e-chip-border-color: var(--color-light-5, #9f8475);
--l5r5e-chip-bg: rgba(93, 20, 43, 0.12);
--l5r5e-chip-color: var(--color-light-2, #efe6d8);
// selection ring
--l5r5e-filter-selected-opacity: 0.6;
--l5r5e-filter-selected-tint: invert(1) sepia(1) saturate(4) hue-rotate(5deg); // → gold
}
@mixin theme-light {
// Restricted entries
--l5r5e-restricted-opacity: 0.35;
--l5r5e-restricted-filter: grayscale(1) brightness(1.1);
// l5r5e-multi-select
--l5r5e-dropdown-bg: #f4efe6;
--l5r5e-dropdown-color: var(--color-dark-2, #222);
--l5r5e-dropdown-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
--l5r5e-dropdown-group-color: var(--color-dark-4, #444);
--l5r5e-dropdown-group-bg: rgba(0, 0, 0, 0.05);
--l5r5e-dropdown-option-color: var(--color-dark-2, #222);
--l5r5e-dropdown-no-results-color: var(--color-dark-4, #444);
--l5r5e-chip-border-color: var(--color-light-5, #9f8475);
--l5r5e-chip-bg: rgba(93, 20, 43, 0.08);
--l5r5e-chip-color: var(--color-dark-2, #222);
// selection ring
--l5r5e-filter-selected-opacity: 0.45;
--l5r5e-filter-selected-tint: invert(0.15) sepia(1) saturate(6) hue-rotate(295deg) brightness(0.7); // → deep red
}
body.theme-light {
@include theme-light();
}
body.theme-dark {
@include theme-dark();
}
.application.theme-light,
.themed.theme-light {
@include theme-light();
}
.application.theme-dark,
.themed.theme-dark {
@include theme-dark();
}
// ─────────────────────────────────────────────────────────────
button {
font-size: 0.75rem;
cursor: url("../assets/cursors/pointer.webp"), pointer;
}
.pointer {
cursor: url("../assets/cursors/pointer.webp"), pointer;
}
// System title was too long and merge version with module number
#game-details {
.system {
overflow: auto;
border-bottom: 1px solid var(--color-border-light-highlight);
.system-title {
white-space: break-spaces;
}
}
}
.chat-message {
ul,li {
list-style: none;
margin: unset;
padding: unset;
}
}
#logo {
content: url("../assets/l5r-logo.webp");
height: 80px;
width: 88px;
margin-left: 0.5rem;
opacity: 0.8;
}
#navigation {
left: 120px;
#nav-toggle,
#scene-list .scene.nav-item {
cursor: default;
color: $white;
background: linear-gradient(
$l5r5e-linear-gradient-second,
$l5r5e-linear-gradient-second-dark,
$l5r5e-linear-gradient-second
);
background-origin: padding-box;
border-image: url("../assets/ui/macro-button.webp") 10 repeat;
border-image-width: 0.25rem;
border-image-outset: 0px;
&:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark
);
}
}
#scene-list {
.scene.nav-item.active {
background: linear-gradient(
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first
);
&:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark
);
}
}
.scene.view,
.scene.context {
cursor: default;
color: #fff;
background: linear-gradient(
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first
);
background-origin: padding-box;
border-image: url("../assets/ui/macro-button.webp") 10 repeat;
border-image-width: 0.25rem;
border-image-outset: 0px;
box-shadow: 0 0 20px red;
&:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark
);
}
}
}
}
#controls {
top: 100px;
ol {
.scene-control.active,
.control-tool.active,
.scene-control:hover,
.control-tool:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first
);
background-origin: padding-box;
border-image: url("../assets/ui/macro-button.webp") 10 repeat;
border-image-width: 0.25rem;
border-image-outset: 0px;
box-shadow: 0 0 10px $red;
&:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark
);
}
}
.scene-control,
.control-tool {
color: $white;
background: linear-gradient(
$l5r5e-linear-gradient-second,
$l5r5e-linear-gradient-second-dark,
$l5r5e-linear-gradient-second
);
background-origin: padding-box;
border-image: url("../assets/ui/macro-button.webp") 10 repeat;
border-image-width: 0.25rem;
border-image-outset: 0px;
&:hover {
background: linear-gradient(
$l5r5e-linear-gradient-first-dark,
$l5r5e-linear-gradient-first,
$l5r5e-linear-gradient-first-dark
);
}
}
}
}
#playlists {
.playlist {
.playlist-header {
h4 {
font: 0.75rem $font-primary;
text-transform: uppercase;
text-align: right;
}
}
}
}
#combat,
#combat-popout {
.combat-tracker-header {
.encounters {
h3 {
font-size: 0.85rem;
}
ul {
display: flex;
color: $l5r5e-white;
&.encounter {
border-right: 1px solid $l5r5e-white-light;
}
li {
cursor: url("../assets/cursors/pointer.webp"), pointer;
}
}
.prepared {
justify-content: space-evenly;
}
.encounter {
justify-content: space-between;
i {
font-size: 23px;
vertical-align: middle;
&:hover {
text-shadow: 0 0 8px $red;
}
}
.active {
color: $l5r5e-maho;
&:hover {
text-shadow: none;
}
}
&-icon {
font-weight: 900;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
&-intrigue:before {
content: "\f21b";
}
&-duel:before {
content: "\f506";
}
&-skirmish:before {
content: "\f505";
}
&-mass_battle:before {
content: "\f447";
}
}
}
}
}
}
#pause {
img {
content: url("../assets/icons/pause.svg");
}
}
.compendium-directory {
min-width: 350px; //Default size set as min
.directory-item {
.ring-rarity-rank {
display: flex;
align-items: center;
justify-content: end;
padding-right: 1rem;
font-size: 0.75rem;
white-space: nowrap;
i[class^="i_"] { // i_water, i_air etc.
margin-right: 0.25rem;
}
}
}
.not-for-players {
opacity: var(--l5r5e-restricted-opacity);
filter: var(--l5r5e-restricted-filter);
}
[data-application-part="filter"] {
.filter-bar {
display: flex;
flex-direction: column;
gap: 0.25rem;
padding: 0.5rem;
}
.flexrow {
position: relative;
display: flex;
align-items: center;
gap: 0.35rem;
margin: 0.35rem 0.5rem;
padding-right: 1.5rem; // space for the clear filter x
&.source-filter {
padding-right: 0;
}
label {
flex-shrink: 0;
width: 3.5rem; // same column alignment
font-size: 0.8rem;
line-height: 1;
margin-right: 0.25rem;
}
}
.number-filter {
flex-wrap: nowrap;
}
// ── Filter buttons (<a> and <i>)
.number-filter a,
.rank-filter a,
.rarity-filter a,
.ring-filter i {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 1.5rem;
padding: 0.1rem 0.3rem;
cursor: pointer;
text-align: center;
border-radius: 3px;
font-size: 1.2rem;
line-height: 1;
user-select: none;
position: relative;
z-index: 1;
}
// ── Selected state circle
.rank-filter a.selected::before,
.rarity-filter a.selected::before,
.ring-filter i.selected::after {
content: "";
position: absolute;
inset: 0;
background: url("../assets/icons/circle.svg") center / contain no-repeat;
opacity: var(--l5r5e-filter-selected-opacity);
filter: var(--l5r5e-filter-selected-tint);
pointer-events: none;
z-index: -1;
}
// Ring-specific adjustment for circle
.ring-filter i.selected::after {
inset: -4px;
}
// ── Inline clear button
a[data-clear] {
position: absolute;
display: inline-flex;
align-items: center;
justify-content: center;
right: 0.25rem;
top: 50%;
transform: translateY(-50%);
margin: 0;
min-width: unset;
opacity: 0.5;
cursor: pointer;
font-size: 0.85rem;
line-height: 1;
user-select: none;
padding: 0.1rem 0.3rem;
&:hover {
opacity: 1;
}
}
.source-filter l5r5e-multi-select {
width: 100%;
}
}
button.gm.applyPlayerFilter {
margin-left: 0.5rem;
margin-bottom: 0.3rem;
}
}
// global tooltip
.l5r5e-tooltip {
cursor: url("../assets/cursors/pointer.webp"), pointer;
.l5r5e-tooltip-ct,
&.l5r5e-tooltip-ct {
visibility: hidden;
min-height: fit-content;
width: 600px;
height: auto;
max-height: 100%;
background: #3e3a30 url("../assets/imgs/bg-l5r.webp") no-repeat;
color: $black-light;
font-size: 0.8rem;
text-align: left;
border: 0 none;
border-radius: 0;
padding: 0.5rem 0.75rem;
display: block;
position: absolute;
z-index: 9999;
* {
color: $black-light;
}
section > ul {
display: flex;
flex-flow: row wrap;
padding: 0.25rem 0 0.25rem 1rem;
li {
flex: 50%;
padding: 0;
padding-right: 1rem;
margin: 0;
list-style-type: square;
}
}
&:before {
z-index: -2;
content: "";
position: absolute;
height: calc(100% + 0.6rem);
width: calc(100% - 0.65rem);
border: 1px solid #c3a582;
border-radius: 0;
top: -0.35rem;
left: 0.25rem;
background: #3e3a30 url("../assets/imgs/bg-l5r.webp") no-repeat;
}
&:after {
z-index: -1;
content: "";
position: absolute;
height: calc(100%);
width: calc(100%);
border: 1px solid #c3a582;
border-radius: 0;
top: -1px;
left: -1px;
}
.goodvalue {
color: #4e8c69;
}
.badvalue {
color: #ab2a00;
}
.reference {
display: flex;
.page {
margin-left: 1ch
}
}
}
.card-header img {
display: inline-block;
background: transparent;
border: 0 none;
width: 20px;
margin: 0;
padding: 0;
}
}
// Send to chat
.l5r5e-chat-item {
color: $black-light;
font-size: 0.8rem;
* {
color: $black-light;
}
h2 {
font-size: 1.1rem;
}
section > ul {
display: flex;
flex-flow: row wrap;
padding: 0.25rem 0 0.25rem 1rem;
li {
flex: 100%;
padding: 1px !important;
margin: 0;
border: 0 none !important;
list-style-type: square;
}
}
.card-header img {
display: inline-block;
background: transparent;
border: 0 none;
width: 20px;
margin: 0;
padding: 0;
}
.reference {
display: flex;
flex-wrap: nowrap;
}
.page {
margin-left: 1ch;
}
}
#l5r5e-gm-monitor {
min-height: 170px;
min-width: 240px;
.window-content {
[data-application-part="hidden_tabs"] {
display: none;
}
table {
margin: 0;
overflow: auto;
}
form {
padding: 0 0.5rem;
}
thead tr > th {
background: rgb(0 0 0 / 90%);
color: #cfcfcfc7;
position: sticky;
z-index: 2;
top: 0;
i.i_void:before {
color: rgba(207,207,207,.8);
}
}
th,
td {
border: 1px solid #5a6e5a50;
padding: 0.25em;
}
img {
border: none;
min-width: 24px;
min-height: 24px;
max-width: 32px;
max-height: 32px;
}
.goodvalue {
color: #4e8c69;
}
.badvalue {
color: #ab2a00;
}
}
// hide "search anywhere" draggable icon
.window-draggable-handle {
display: none;
}
}
#l5r5e-gm-toolbox {
display: flex;
background: linear-gradient(
$l5r5e-linear-gradient-second,
$l5r5e-linear-gradient-second-dark,
$l5r5e-linear-gradient-second
);
border: 1px solid rgb(195, 165, 130);
margin: 0.5rem;
.window-header {
border-bottom: 1px solid rgb(195, 165, 130);
background: none; //keep the same background as the toolbox, not the default black opaque
.window-title {
text-align: center;
}
h1 {
letter-spacing: 0.25rem;
line-height: 2.25rem;
color: $white-light;
padding-top: 1ch;
}
}
.window-content {
padding: 0;
.gm-tools-container {
color: var(--color-text-primary);
display: flex;
font-size: 2rem;
line-height: 2rem;
min-height: 2rem;
margin: 0;
padding: 0;
li {
flex: 1;
display: flex;
margin: 0;
padding: 0;
border-right: 1px solid #c3a582;
cursor: url("../assets/cursors/pointer.webp"), pointer;
&:last-child {
margin: 0;
border: 0 none;
}
:hover {
text-shadow: 0 0 $red;
}
}
.difficulty_hidden {
.fa {
width: 3rem;
}
.difficulty {
flex: 1rem;
width: 2rem;
font-size: 2rem;
text-align: center;
margin: 0;
padding: 0.5rem;
}
}
.fa {
padding: 0.5rem;
}
.fa-bed,
.fa-star-half-alt,
.fa-table,
.fa-podcast {
width: 100%;
padding: 0.5rem;
}
}
}
// hide "search anywhere" draggable icon
.window-draggable-handle {
display: none;
}
}
form#settings-config {
div.form-group:has(l5r5e-multi-select) {
.form-fields {
order: 3; // Move the multiselect to be below the title and description for nicer ui
}
}
div.form-group:has(#settings-config-l5r5e\.compendium-unofficial-content-for-players) {
// Move the tags and input fields to a similar place as for the multiselect
.form-fields {
order: 3;
.tags {
order: 1;
}
}
}
}
l5r5e-combo-box {
// Reset li rules
li {
flex: none !important;
margin: 0 !important;
padding: 0 !important;
}
input {
margin: 0 !important;
flex: none !important;
height: auto !important;
}
display: block;
flex: 1;
min-width: 0; // prevents flex overflow
width: 100%;
.wrapper {
display: block;
position: relative;
width: 100%;
}
.input {
width: 100%;
background: transparent;
border: none;
border-bottom: 1px solid #6e7e6b;
font-family: inherit;
font-size: inherit;
color: inherit;
padding: 2px 4px;
&:focus {
outline: none;
border-bottom-color: #8b0000;
}
&:disabled {
opacity: 0.45;
cursor: not-allowed;
}
}
.dropdown {
// Reset any inherited text styles from parent label
text-shadow: none;
color: #333;
position: absolute;
top: 100%;
left: 0;
right: 0;
z-index: 100; /* floats above everything */
max-height: 200px; /* scrollable */
overflow-y: auto;
background: #f4efe6; /* matches parchment */
border: 1px solid #6e7e6b;
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
margin: 0;
padding: 0;
list-style: none;
text-align: center;
font-size: var(--font-size-16);
font-family: $font-primary;
}
.option {
display: block; // override list-item
margin: 0; // reset any inherited li margins
flex: none; // reset any inherited li flex
padding: 4px 8px;
cursor: pointer;
font-size: 0.85em;
color: #333;
text-transform: uppercase; /* matches the label style in your sheet */
letter-spacing: 0.05em;
border-bottom: 1px solid rgba(110, 126, 107, 0.3);
&:hover,
&.active {
background: #8b0000;
color: #f4efe6;
}
}
.option:last-child,
.group:last-child {
border-bottom: none;
}
.group {
padding: 4px 8px 2px;
font-size: 0.7em;
font-weight: bold;
color: #6e7e6b;
text-transform: uppercase;
letter-spacing: 0.08em;
background: rgba(110, 126, 107, 0.15);
cursor: default;
}
.no-results {
padding: 6px 8px;
color: #999;
font-style: italic;
font-size: 0.85em;
}
}
l5r5e-multi-select,
l5r5e-combo-box {
display: block;
position: relative;
}
l5r5e-combo-box {
.wrapper {
position: relative;
display: block;
padding: 0.375rem 0.625rem;
border-width: 1px;
border-style: solid;
border-color: var(--color-border, #6e7e6b);
border-radius: 4px;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
&:focus-within {
border-color: var(--color-warm-3, #5d142b);
box-shadow: 0 0 0 2px rgba(93, 20, 43, 0.2);
}
&.disabled {
opacity: 0.45;
pointer-events: none;
}
}
input.input {
display: block;
width: 100%;
padding: 0;
border: none;
background: transparent;
outline: none;
font-size: inherit;
line-height: 1.4;
min-width: 4ch;
}
}
l5r5e-multi-select {
.multi-select-container {
position: relative;
}
.selection-box {
position: relative;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem;
padding: 0.3125rem 0.5rem;
min-height: 2.25rem;
border: 1px solid var(--color-border, #6e7e6b);
border-radius: 4px;
cursor: text;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
&:focus-within {
border-color: var(--color-warm-3, #5d142b);
box-shadow: 0 0 0 2px rgba(93, 20, 43, 0.2);
}
&.disabled {
opacity: 0.45;
pointer-events: none;
cursor: default;
.input-sizer {
display: none;
}
}
}
.chip-list {
display: contents;
}
.chip {
display: inline-flex;
align-items: center;
gap: 0.1875rem;
padding: 0.0625rem 0.3125rem;
border: 1px solid var(--l5r5e-chip-border-color);
border-radius: 3px;
background: var(--l5r5e-chip-bg);
color: var(--l5r5e-chip-color);
font-size: 0.8em;
line-height: 1.4;
white-space: nowrap;
user-select: none;
}
.chip-remove {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 0.0625rem;
cursor: pointer;
color: var(--color-light-5, #9f8475);
&:hover {
color: var(--color-warm-2, #c9593f);
}
}
/* Auto-sizing input */
.input-sizer {
display: inline-grid;
flex: 1 1 auto;
min-width: 4ch; // never collapse
max-width: 100%;
&::after {
content: attr(data-value) " ";
grid-area: 1 / 1;
visibility: hidden;
white-space: pre;
font: inherit;
line-height: 1.4;
pointer-events: none;
}
input.input {
grid-area: 1 / 1;
width: 100%;
min-width: 0; // allow flexbox to shrink
padding: 0.125rem 0;
border: none;
background: transparent;
outline: none;
font: inherit;
line-height: 1.4;
}
}
.clear-btn {
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: auto; // pushes it to the end
flex-shrink: 0;
white-space: nowrap;
padding: 0 0.125rem;
border: none;
background: none;
font-size: 1.1em;
cursor: pointer;
color: var(--color-light-5, #9f8475);
&:hover {
color: var(--color-warm-2, #c9593f);
}
}
}
l5r5e-multi-select,
l5r5e-combo-box {
.dropdown {
position: absolute;
top: calc(100% + 0.25rem);
left: 0;
right: 0;
z-index: 100;
max-height: 14rem;
overflow-y: auto;
overflow-x: hidden;
list-style: none;
margin: 0;
padding: 0.25rem 0;
border-width: 1px;
border-style: solid;
border-radius: 4px;
background: var(--l5r5e-dropdown-bg);
border-color: var(--color-border, #6e7e6b);
box-shadow: var(--l5r5e-dropdown-shadow);
color: var(--l5r5e-dropdown-color);
li.group {
padding: 0.375rem 0.75rem 0.125rem;
font-size: 0.7em;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
cursor: default;
user-select: none;
color: var(--l5r5e-dropdown-group-color);
background: var(--l5r5e-dropdown-group-bg);
}
li.option {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.375rem 0.75rem;
font-size: 0.875em;
cursor: pointer;
user-select: none;
color: var(--l5r5e-dropdown-option-color);
&:hover,
&.active {
background: var(--color-warm-3, #5d142b);
color: var(--color-light-1, #f7f3e8);
}
&.selected {
background: rgba(93, 20, 43, 0.25);
}
&.disabled {
cursor: default;
pointer-events: none;
opacity: 0.45;
}
.checkmark {
flex-shrink: 0;
width: 0.875rem;
text-align: center;
font-size: 0.85em;
color: var(--color-warm-1, #ee9b3a);
}
.label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
li.no-results {
padding: 0.5rem 0.75rem;
font-size: 0.875em;
font-style: italic;
user-select: none;
color: var(--l5r5e-dropdown-no-results-color);
}
}
}