-
Notifications
You must be signed in to change notification settings - Fork 175
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
feat(ui): bottom nav #2164
feat(ui): bottom nav #2164
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export function bottomNavObservers (store) { | ||
store.observe('bottomNav', bottomNav => { | ||
// disables or enables the style | ||
document.body.classList.toggle('bottom-nav', bottomNav); | ||
document.querySelector('.main-content').classList.toggle('bottom-nav', bottomNav); | ||
document.getElementById('main-nav').classList.toggle('bottom-nav', bottomNav); | ||
}, { init: false }) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ body { | |
|
||
.main-content { | ||
contain: content; // see https://www.w3.org/TR/2018/CR-css-contain-1-20181108/#valdef-contain-content | ||
padding-top: var(--main-content-pad-top); | ||
padding-block-start: var(--main-content-pad-top); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this orthogonal to the PR? Does this have an effect with different languages? (I can't think of any bottom-to-top languages, but I'm sure they exist?) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you could take it out 🤷 |
||
|
||
@supports not (contain: content) { | ||
// For browsers which don't support the "contain" CSS property, | ||
|
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.
It's not clear to me why we need to set this in three different places.
Historically, the way I've done this is to toggle the entire
<style>
tag itself. You can see some examples here:pinafore/src/build/template.html
Lines 35 to 44 in b152359
pinafore/src/routes/_store/observers/grayscaleObservers.js
Lines 5 to 16 in 16e6634
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.
agreed. i'll have to pull up my sleeves and try to get my local env running so i can clean this up