From bcfc72a515c54026879357db716bc4d5dad50d7a Mon Sep 17 00:00:00 2001
From: Philipp Bock <p@philippbock.com>
Date: Mon, 27 May 2024 14:11:01 +0200
Subject: [PATCH] Fix session holders shrinking on hover

---
 app/assets/stylesheets/application.tailwind.css | 1 +
 app/views/conferences/show.html.erb             | 7 +++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css
index 47241ee..5b4a2da 100644
--- a/app/assets/stylesheets/application.tailwind.css
+++ b/app/assets/stylesheets/application.tailwind.css
@@ -25,6 +25,7 @@ select {
   @apply pl-2 pr-6 py-1;
 }
 .session-holder { @apply w-full; }
+.session-holder:hover { height: auto; min-height: var(--height); }
 .session {
   @apply border p-2 bg-slate-100 border-slate-300 rounded-md w-full hover:shadow-2xl;
 
diff --git a/app/views/conferences/show.html.erb b/app/views/conferences/show.html.erb
index 054bb99..60a14f7 100644
--- a/app/views/conferences/show.html.erb
+++ b/app/views/conferences/show.html.erb
@@ -116,12 +116,11 @@ current_time = Time.zone.now.in_time_zone(@conference.time_zone)
             <h4><%= stage.name %></h4>
             <div class="stage-sessions">
               <% sessions.each do |session| %>
-                <div class="session-holder hover:z-30 h-full hover:!h-auto" style="
+                <div class="session-holder hover:z-30 h-full" style="
                   position: absolute;
                   top: <%= (session.starts_at - timeline_starts_at) / 3600.0 * pixels_per_hour %>px;
-                  max-height: <%= (session.ends_at - session.starts_at) / 3600.0 * pixels_per_hour %>px;
-                  min-height: <%= (session.ends_at - session.starts_at) / 3600.0 * pixels_per_hour %>px;
-                  hxeight: <%= (session.ends_at - session.starts_at) / 3600.0 * pixels_per_hour %>px;
+                  --height: <%= (session.ends_at - session.starts_at) / 3600.0 * pixels_per_hour %>px;
+                  height: var(--height);
                 ">
                   <%= render partial: "sessions/session", locals: { session: session } %>
                 </div>
-- 
GitLab