Fix safari flexbox/gap issue with grid #449

Merged
Irev-Dev merged 2 commits from kurt/safari-flex-gap-435 into main 2021-08-11 21:38:12 +02:00
Irev-Dev commented 2021-08-11 11:29:14 +02:00 (Migrated from github.com)

Partial fix for #435

Partial fix for #435
Irev-Dev (Migrated from github.com) reviewed 2021-08-11 11:31:18 +02:00
@@ -64,3 +64,3 @@
className="h-full w-10"
className="h-full w-10 mr-4"
aria-describedby={popoverId}
onClick={togglePopover}
Irev-Dev (Migrated from github.com) commented 2021-08-11 11:31:18 +02:00

The one place grid grid-flow-col-dense didn't work, I'm sure if i dug into it It probably would have been a simple fix to get it to work, but just used margin instead.

The one place `grid grid-flow-col-dense` didn't work, I'm sure if i dug into it It probably would have been a simple fix to get it to work, but just used margin instead.
Irev-Dev (Migrated from github.com) reviewed 2021-08-11 11:32:40 +02:00
@@ -37,3 +37,3 @@
<div>
<div className="text-ch-blue-600 font-fira-code flex text-sm">
<div className="text-ch-blue-600 font-fira-code flex text-sm whitespace-nowrap">
{keyName}
Irev-Dev (Migrated from github.com) commented 2021-08-11 11:32:40 +02:00

"created on" was wraping to a new line even though it had lots of space, not sure if related or another safari quirk.

"created on" was wraping to a new line even though it had lots of space, not sure if related or another safari quirk.
Irev-Dev (Migrated from github.com) reviewed 2021-08-11 11:33:46 +02:00
@@ -133,3 +132,4 @@
<div className="grid grid-cols-1 md:auto-cols-preview-layout grid-flow-row-dense absolute inset-0 h-full">
{/* Viewer */}
<div className="md:col-start-2 w-full min-h-md">
<ProfileViewer />
Irev-Dev (Migrated from github.com) commented 2021-08-11 11:33:46 +02:00

slighty different to the rest in that it's flow-row not flow-col, this fixed the gap at the bottom of the page too.

slighty different to the rest in that it's `flow-row` not `flow-col`, this fixed the gap at the bottom of the page too.
Irev-Dev (Migrated from github.com) reviewed 2021-08-11 12:19:13 +02:00
@@ -37,3 +37,3 @@
<div>
<div className="text-ch-blue-600 font-fira-code flex text-sm">
<div className="text-ch-blue-600 font-fira-code flex text-sm whitespace-nowrap">
{keyName}
Irev-Dev (Migrated from github.com) commented 2021-08-11 12:19:13 +02:00

turn off whitespace to see this diff correctly

turn off whitespace to see this diff correctly
franknoirot (Migrated from github.com) approved these changes 2021-08-11 18:06:49 +02:00
franknoirot (Migrated from github.com) left a comment

Nice nice, thanks for your help on this. For anyone's future reference, here's a CSS Tricks guide on how grid-auto-flow: column dense works.

Nice nice, thanks for your help on this. For anyone's future reference, here's a [CSS Tricks guide](https://css-tricks.com/snippets/css/complete-guide-grid/#grid-auto-flow) on how `grid-auto-flow: column dense` works.
@@ -37,3 +37,3 @@
<div>
<div className="text-ch-blue-600 font-fira-code flex text-sm">
<div className="text-ch-blue-600 font-fira-code flex text-sm whitespace-nowrap">
{keyName}
franknoirot (Migrated from github.com) commented 2021-08-11 18:02:41 +02:00

Yeah I saw that happening in your initial screenshot, I bet it had to do with the width of these elements compressing as flex children or something. We can keep an eye on it when getting the mobile view to look good, nowrap can cause layout weirdness on narrow devices.

Yeah I saw that happening in your initial screenshot, I bet it had to do with the width of these elements compressing as flex children or something. We can keep an eye on it when getting the mobile view to look good, `nowrap` can cause layout weirdness on narrow devices.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#449