-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make footer sticky. #35
Make footer sticky. #35
Conversation
5a7ce81
to
711e98e
Compare
711e98e
to
0b49dfe
Compare
Assigning to @tinykite because I'm way out of my element! (HTML pun intended) |
@mdellabitta Yeah, CSS grid is pretty great! Observe that this literally only took one line: |
src/css/layout.css
Outdated
html { | ||
height: 100%; | ||
min-height: 100%; | ||
} | ||
|
||
body { | ||
min-height: 100%; | ||
display: grid; | ||
grid-template-rows: auto 1fr auto; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would be helpful for me to write a style guide (after everything else critical is written, perhaps) about the conventions and organization strategies for cap static. The layout.css
file is specifically intended for layout classes — that are prepended with l-
.
For example, l-interiorPage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 moved!
This is great! My only suggestion would be the move the global root selector classes you wrote (for body and html) to |
Technique from https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Sticky_footers
Before:

After:

Even though only the 404 page is affected at present, since it is the only short page, I moved the footer on the landing page and on the caselaw page, so that on every page, it is a sibling of
main
instead of a child ofmain
, so that this CSS would work properly there, had they been shorter. (The footer was already a sibling ofmain
on the gallery and about pages).With this change, an empty page,
looks like

instead of
