Cleanup secret block styling (#2088)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run

This commit is contained in:
Carlos Fernandez 2026-07-13 18:56:34 -04:00 committed by GitHub
parent 02a73d774a
commit 3a5529f1dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -599,27 +599,23 @@
} }
secret-block { secret-block {
position: relative; display: block;
section.secret {
background-color: @red-10; /** A buffer to make the hover behavior work a bit better. The bottom in the button needs to compensate */
padding: 0; @buffer: 8px;
margin-top: 0.375rem; margin-top: -@buffer;
&.revealed { padding-top: @buffer;
background-color: @green-10;
}
p {
margin: 0.5rem 0;
}
}
button.reveal { button.reveal {
--button-size: 0.875rem; --button-size: 1rem;
height: var(--button-size);
position: absolute; position: absolute;
margin: auto; margin: auto;
left: 0; left: 0;
right: 0; right: 0;
width: min-content; width: min-content;
padding: 1px 8px 0 8px; padding: 1px 8px 0 8px;
bottom: calc(100% - 0.4375rem - 2px); bottom: calc(100% - 0.4375rem - 1px);
background-color: var(--dh-window-button-color-bg); // todo: find a better var name background-color: var(--dh-window-button-color-bg); // todo: find a better var name
border-color: var(--color-secret-border); border-color: var(--color-secret-border);
@ -627,6 +623,7 @@
font-size: var(--font-size-10); font-size: var(--font-size-10);
user-select: none; user-select: none;
text-transform: uppercase; text-transform: uppercase;
white-space: nowrap;
visibility: hidden; visibility: hidden;
} }
@ -635,6 +632,20 @@
visibility: visible; visibility: visible;
} }
} }
/**
* The element inside a secret-block.
* This is separate since during prosemirror editing, the secret-block container does not exist.
*/
section.secret {
--color-secret-bg: @red-10;
--color-revealed-bg: @green-10;
position: relative;
padding: 0;
p {
margin: 0.5rem 0;
}
}
} }
.system-daggerheart { .system-daggerheart {