Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix safari flexbox/gap issue with grid #449

Merged
merged 2 commits into from
Aug 11, 2021
Merged

Conversation

Irev-Dev
Copy link
Owner

Partial fix for #435

@Irev-Dev Irev-Dev self-assigned this Aug 11, 2021
<div
className="h-full w-10"
className="h-full w-10 mr-4"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@@ -35,12 +35,12 @@ const KeyValue = ({
if (!children || hide) return null
return (
<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">
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

turn off whitespace to see this diff correctly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@@ -136,7 +136,7 @@ const ProjectProfile = ({
</div>

{/* Side panel */}
<div className="bg-ch-gray-760 font-fira-sans px-20 pt-12 flex flex-col gap-6 overflow-y-auto">
<div className="bg-ch-gray-760 font-fira-sans px-20 pt-12 grid grid-flow-row-dense gap-6 overflow-y-auto">
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

@franknoirot franknoirot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@@ -35,12 +35,12 @@ const KeyValue = ({
if (!children || hide) return null
return (
<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">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Irev-Dev Irev-Dev merged commit 5677855 into main Aug 11, 2021
@Irev-Dev Irev-Dev deleted the kurt/safari-flex-gap-435 branch August 11, 2021 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants