diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 148e380..5197b94 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -312,26 +312,25 @@ table.items td {
border-top: solid 1px #dddddd;
padding-block: 0.1em;
}
-/* NOTE: for to fill
completely, we use 2 copies of same . 1st is
- * left transparent in | to resize | to link length. 2nd is positioned
- * absolutely over whole | cell. */
+/* For to fill | completely, we use an ::after pseudoelement. */
+/* TODO: change selector from td.link to td:has(a) once :has() is available on
+ * FF */
table.items td.link {
padding: 0;
position: relative;
-}
-table.items td.link a {
- color: transparent;
- font: inherit;
- padding-inline-start: 1em;
text-align: left;
}
-table.items td.link a:last-child {
+table.items td.link a {
color: inherit;
- display: flex;
+ font: inherit;
+ padding-inline-start: 1em;
+}
+table.items td.link a::after {
+ content: '';
inset: 0;
position: absolute;
}
-table.items td.link a.subunit {
+table.items td.link .subunit {
padding-inline-start: 1.6em;
}
table.items td.actions {
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c8083d7..70c60a5 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -88,11 +88,6 @@ module ApplicationHelper
image_element_to(:link, name, image, options, html_options)
end
- # Workaround to fill | with link completely, see CSS for details.
- def table_link_to(...)
- link_to(...) * 2
- end
-
private
diff --git a/app/views/units/index.html.erb b/app/views/units/index.html.erb
index efa9f5b..445f2e9 100644
--- a/app/views/units/index.html.erb
+++ b/app/views/units/index.html.erb
@@ -21,7 +21,7 @@
<% Unit.each_with_level(@units) do |unit, level| %>
|
- <%= table_link_to unit.symbol, edit_unit_path(unit), class: level > 0 ? 'subunit' : '' %>
+ <%= link_to unit.symbol, edit_unit_path(unit), class: level > 0 ? 'subunit' : '' %>
|
<%= unit.name %> |
<%= scientifize(unit.multiplier) unless unit.multiplier == 1 %> |
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index 6455d7a..9c3605c 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -11,7 +11,7 @@
<% @users.each do |user| %>
- <%= table_link_to user.email, user_path(user) %> |
+ <%= link_to user.email, user_path(user) %> |
<% if user == current_user %>
<%= user.status %>
|