From 3f3c1739cb42dde22c4b20f9198e73d793e3d2a3 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Wed, 13 Nov 2024 16:40:39 -0800 Subject: [PATCH] Write out "element" in HTML element classes Write out "representation" too. --- app-proto/main.css | 14 +++++++------- app-proto/src/outline.rs | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app-proto/main.css b/app-proto/main.css index a78efd9..26cdac0 100644 --- a/app-proto/main.css +++ b/app-proto/main.css @@ -66,28 +66,28 @@ summary > div, .constraint { padding-bottom: 4px; } -.elt, .constraint { +.element, .constraint { display: flex; flex-grow: 1; padding-left: 8px; padding-right: 8px; } -.elt-switch { +.element-switch { width: 18px; padding-left: 2px; text-align: center; } -details:has(li) .elt-switch::after { +details:has(li) .element-switch::after { content: '▸'; } -details[open]:has(li) .elt-switch::after { +details[open]:has(li) .element-switch::after { content: '▾'; } -.elt-label { +.element-label { flex-grow: 1; } @@ -95,11 +95,11 @@ details[open]:has(li) .elt-switch::after { flex-grow: 1; } -.elt-rep { +.element-representation { display: flex; } -.elt-rep > div { +.element-representation > div { padding: 2px 0px 0px 0px; font-size: 10pt; font-variant-numeric: tabular-nums; diff --git a/app-proto/src/outline.rs b/app-proto/src/outline.rs index 8f2e6d7..ee1603f 100644 --- a/app-proto/src/outline.rs +++ b/app-proto/src/outline.rs @@ -115,11 +115,11 @@ fn ElementOutlineItem(key: ElementKey, element: assembly::Element) -> View { } ) { div( - class="elt-switch", + class="element-switch", on:click=|event: MouseEvent| event.stop_propagation() ) div( - class="elt", + class="element", on:click={ move |event: MouseEvent| { if event.shift_key() { @@ -139,8 +139,8 @@ fn ElementOutlineItem(key: ElementKey, element: assembly::Element) -> View { } } ) { - div(class="elt-label") { (label) } - div(class="elt-rep") { + div(class="element-label") { (label) } + div(class="element-representation") { Indexed( list=rep_components, view=|coord_str| view! {