From dba543ca0e438c7d0e084c3b45bc1ec8af4429a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sat, 22 Jan 2022 20:18:57 +0100 Subject: [PATCH] [ui] move sections with labels in borders into a util stylesheet --- webui/src/components/AttributeView.svelte | 35 +---------------------- webui/src/components/util.scss | 31 ++++++++++++++++++++ 2 files changed, 32 insertions(+), 34 deletions(-) create mode 100644 webui/src/components/util.scss diff --git a/webui/src/components/AttributeView.svelte b/webui/src/components/AttributeView.svelte index a37afa5..e32204d 100644 --- a/webui/src/components/AttributeView.svelte +++ b/webui/src/components/AttributeView.svelte @@ -129,52 +129,19 @@ diff --git a/webui/src/components/util.scss b/webui/src/components/util.scss new file mode 100644 index 0000000..cd9a3eb --- /dev/null +++ b/webui/src/components/util.scss @@ -0,0 +1,31 @@ +section.labelborder { + position: relative; + overflow: visible; + + margin-top: 1.66em; + padding: 1ex 0.95ex; + + border: 0.1em solid var(--foreground); + border-radius: 4px; + + header { + margin-bottom: 0.2em; + + & > * { + position: absolute; + top: -0.66em; + + margin: 0; + + background: var(--background-lighter); + font-weight: 600; + + line-height: 1; + padding: 0 0.75ex; + } + + h3 { + left: 1ex; + } + } + } \ No newline at end of file