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

Fixing page width overflow after bottom cards change #276

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

lidiazuin
Copy link
Collaborator

No description provided.

@lidiazuin lidiazuin added the bug Something isn't working label Oct 23, 2024
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for neo4j-docs-ui ready!

Name Link
🔨 Latest commit 0e1490f
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-docs-ui/deploys/671b5c6bdbf1160008cf12f4
😎 Deploy Preview https://deploy-preview-276--neo4j-docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

body.docs-ndl .cards:nth-last-child(-n+2) .sectionbody {
flex: 0 0 152%;
body.docs-ndl .cards:nth-last-child(-n+2) .sectionbody>div.sect2 {
flex: 0 0 49%;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think targeting >div.sect2 is the right way to go, but we need something more specific, because this also affects cards on other pages. Any page where there is a cards section will have this applied to the last set of cards.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually I've been looking at nth-child and nth-last-child and while there's some things we can do with it, we might want to just create a class that displays two cards on a row and then add that as a role on sections of pages where we want to use it.

Or we could have something slightly 'interesting'...

body.docs-ndl .doc > div:nth-child(even of .cards) .sectionbody > div:nth-child(-n + 2 of .sect2) {
  flex: 0 0 49%;
}

In every even numbered set of cards, the first two cards will be half-width.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we will need a new class. Even this suggestion that you made is breaking the subpages too. I will see what I can do.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this change would apply to those pages as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I fixed it now, but one thing that was broken in the ui preview was in the hub page, icons with bigger resolution would expand and overflow, and icons with smaller resolutions and png wouldn't "grow". We could enforce a max-width, but on the live website, all icons seem to be in the right size and in case some are not, I can just re-upload to the proper size.

@recrwplay recrwplay self-requested a review October 28, 2024 09:32
Copy link
Collaborator

@recrwplay recrwplay left a comment

Choose a reason for hiding this comment

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

Looks good!

@lidiazuin lidiazuin merged commit 21f04af into neo4j-documentation:master Oct 28, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants