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

misc. alignments and columns fixes #636

Merged
merged 8 commits into from Nov 4, 2020
Merged

Conversation

samueldr
Copy link
Member

@samueldr samueldr commented Nov 4, 2020

This PR closes #634.


With this, we also gain a new debugging superpower: the site width is always shown with yellow rulers. In addition to this, columns are pink, and the flexible spacing helpers are orange and green.

(What does this mean? Scroll down to the NixOS logo in the footer and double click the lambdaflake.)


These are all issues I've had to fixup following through actually fixing what #634 fixed (which was not fixing the issue it tried to, this is for another PR.)

Mostly things that were found out to accidentally align invisibly with an additional stray "gutter" width to the right. Comparing the site with the live one you should see some changes at many places columns are used. For some it might have changed how the text can flow.

This does address the stray padding @turboMaCk saw

The padding would end up causing a mis-alignment of columns.

The `calc()` is needed here as the total space available is 100%, but if
we don't remove it from the width of the elements we'd end up with
100%+n*margin
It seems the previous method didn't compose well.

It would end up creating a bit of padding where there shouldn't be since
using #container() at the same place as #columns() can't work.
There's too many items in the menu when bordering on xs.
Setting all margins like that breaks #columns()
The negative margins being applied all the time caused issues when the
total width of the viewport was smaller than the site width + those
margin sizes.
The way this is fixed also better explains what the desire is. We
actually want three columns, not two. It's only that we want the second
column to span two out of the three columns.

We will need an abstraction over that.
@samueldr samueldr requested a review from garbas November 4, 2020 01:56
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2020

Copy link
Member

@garbas garbas 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

@garbas garbas merged commit 1cd0f13 into master Nov 4, 2020
@garbas garbas deleted the fix/misc-columns-and-alignment branch November 4, 2020 11:12
@turboMaCk
Copy link
Member

For the record this looks great 👍 I also like the idea introducing the debugging grid.

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.

None yet

3 participants