summaryrefslogtreecommitdiff
path: root/ui/lib/components
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2025-01-01 18:09:46 -0500
committerKit La Touche <kit@transneptune.net>2025-01-01 18:09:46 -0500
commitc9b3394e9fc2cf6eb505ab03a6479eae996ed6e9 (patch)
treec536430d2fb2e4093fb3b09cbda04369b68a6911 /ui/lib/components
parent628337f3afcd5125299cbf620832779ab209022b (diff)
Just oh so many styles
Diffstat (limited to 'ui/lib/components')
-rw-r--r--ui/lib/components/Message.svelte40
-rw-r--r--ui/lib/components/MessageRun.svelte15
2 files changed, 3 insertions, 52 deletions
diff --git a/ui/lib/components/Message.svelte b/ui/lib/components/Message.svelte
index cfadbba..6918b5d 100644
--- a/ui/lib/components/Message.svelte
+++ b/ui/lib/components/Message.svelte
@@ -26,8 +26,8 @@
</script>
<div
- class="message relative"
- class:bg-warning-800={deleteArmed}
+ class="message"
+ class:delete-armed={deleteArmed}
role="article"
data-at={at}
{onmouseleave}
@@ -43,39 +43,3 @@
{@html renderedBody}
</section>
</div>
-
-<style>
- .message .handle {
- display: none;
- }
- .message:hover .handle {
- display: flex;
- }
- .message-body {
- overflow: auto;
- max-width: 80vw;
- @media (width > 640px) {
- /* 21rem is width of the nav bar in full-screen mode. */
- max-width: calc(90vw - 21rem);
- }
- }
- .message-body:empty:after {
- content: '.';
- visibility: hidden;
- }
- /* Without the global selector, the Svelte CSS compiler will see this as
- * unused, and purge it from the output. However, this is "plausibly used"
- * because it may occur in renderedBody.
- */
- :global(.message-body blockquote) {
- border-left: 0.25rem solid lightgrey;
- margin-left: 0.5rem;
- padding-left: 0.5rem;
- }
- :global(.message-body pre) {
- border: 1px solid #312e81;
- border-radius: 0.25rem;
- background-color: #282555;;
- padding: 0.25rem;
- }
-</style>
diff --git a/ui/lib/components/MessageRun.svelte b/ui/lib/components/MessageRun.svelte
index 6cad381..09388ac 100644
--- a/ui/lib/components/MessageRun.svelte
+++ b/ui/lib/components/MessageRun.svelte
@@ -9,6 +9,7 @@
</script>
<div
+ class="message-run"
class:own-message={ownMessage}
class:other-message={!ownMessage}
>
@@ -19,17 +20,3 @@
<Message {...message} editable={ownMessage} />
{/each}
</div>
-
-<style>
- .own-message {
- background-color: rgb(32, 42, 74);
- }
- /* Honestly, I don't love scoping styles per component, and this is a great
- * example of why. MessageRuns know if they're own-message, but Messages in
- * them need to get a style based on that fact. I don't wanna bucket-brigade
- * that fact into the Message, when it's a pure CSS concern.
- */
- .own-message :global(*) {
- color: rgb(198, 198, 198);
- }
-</style>