Heyo!
I'm kind of new to... web stuffs. I learned like, ugh, I dunno, like a year ago to do some sites for my Mastodon community. I say that because I'm kind of amateur, you know?
Anyway...
I'm doing Backdrop for our "cool stuff." And I am alllllmost done with the first part of making it pretty. One last thing that I can't really find an answer for, though, is... hiding a block if like... screen size is too small.
Basically, I want to find a way to make the sidebar hide when the Tocify block goes to the bottom of the screen.
Am I like.... missing a way to do it?
Accepted answer
Comments
I use a similar module (Tocbot) which uses the same library, but the implementation is different. This is what I use to target the block:
@media (max-width: 47.99em) {
.js-toc-block.is-position-fixed {
display: none;
}
}
But you could just target the sidebar with:
@media (max-width: 47.99em) {
.l-sidebar {
display: none;
}
}
I use a similar module (Tocbot) which uses the same library, but the implementation is different. This is what I use to target the block:
But you could just target the sidebar with: