diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index ae43714..cf2cde3 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -29,6 +29,8 @@
--color-dark-red: #b21237;
--color-red: #ff1f5b;
+ --depth: 0;
+
--z-index-flashes: 100;
--z-index-table-row-outline: 10;
}
@@ -363,24 +365,9 @@ table.items th,
table.items td {
padding-inline: 1em 0;
}
-table.items td:has(input, textarea) {
- padding-inline-start: calc(0.6em - 0.9px);
-}
-table.items th:last-child {
- padding-inline-end: 0.4em;
-}
-table.items td:last-child {
- padding-inline-end: 0.1em;
-}
-table.items td {
- border-top: solid 1px var(--color-border-gray);
- height: 2.4em;
- padding-block: 0.1em;
-}
/* For to fill
completely, we use an ::after pseudoelement. */
table.items td.link {
padding: 0;
- padding-inline-start: calc(1em + var(--depth) * 0.8em);
position: relative;
}
table.items td.link a {
@@ -392,11 +379,25 @@ table.items td.link a::after {
inset: 0;
position: absolute;
}
-table.items td.subunit {
- padding-inline-start: 1.8em;
+table.items td:first-child {
+ padding-inline-start: calc(1em + var(--depth) * 0.8em);
}
-table.items td.subunit:has(input, textarea) {
- padding-inline-start: calc(1.4em - 1px);
+table.items td:has(input, textarea) {
+ padding-inline-start: calc(0.6em - 0.9px);
+}
+table.items td:first-child:has(input, textarea) {
+ padding-inline-start: calc(0.6em + var(--depth) * 0.8em - 0.9px);
+}
+table.items th:last-child {
+ padding-inline-end: 0.4em;
+}
+table.items td:last-child {
+ padding-inline-end: 0.1em;
+}
+table.items td {
+ border-top: solid 1px var(--color-border-gray);
+ height: 2.4em;
+ padding-block: 0.1em;
}
table.items td.actions {
align-items: center;
diff --git a/app/views/default/units/_unit.html.erb b/app/views/default/units/_unit.html.erb
index bce8a73..dadfc99 100644
--- a/app/views/default/units/_unit.html.erb
+++ b/app/views/default/units/_unit.html.erb
@@ -1,5 +1,6 @@
<%= tag.tr do %>
- |
+ |
<%= unit %>
|
diff --git a/app/views/quantities/_form.html.erb b/app/views/quantities/_form.html.erb
index a08128a..0e5a39d 100644
--- a/app/views/quantities/_form.html.erb
+++ b/app/views/quantities/_form.html.erb
@@ -2,7 +2,7 @@
<%- tag.tr id: row, class: "form", onkeydown: "processKey(event)",
data: {link: link, form: form_tag, hidden_row: hidden_row} do %>
-
+ |
<%= form.text_field :name, required: true, autofocus: true, size: 20 %>
|
diff --git a/app/views/units/_form.html.erb b/app/views/units/_form.html.erb
index 82c08cb..7fc73af 100644
--- a/app/views/units/_form.html.erb
+++ b/app/views/units/_form.html.erb
@@ -2,7 +2,7 @@
<%- tag.tr id: row, class: "form", onkeydown: "processKey(event)",
data: {link: link, form: form_tag, hidden_row: hidden_row} do %>
- |
+ |
<%= form.text_field :symbol, required: true, autofocus: true, size: 12 %>
|
diff --git a/app/views/units/_unit.html.erb b/app/views/units/_unit.html.erb
index f3bc986..f332fdc 100644
--- a/app/views/units/_unit.html.erb
+++ b/app/views/units/_unit.html.erb
@@ -6,7 +6,7 @@
drop_id: dom_id(unit.base || unit),
drop_id_param: "unit[base_id]"} do %>
- |
+ |
<%= link_to unit, edit_unit_path(unit), onclick: 'this.blur();', data: {turbo_stream: true} %>
|
<%= unit.description %> |