Hide element based on screen size

How do I do this? There’s a few elements/blocks that I’d like to hide on smaller mobile screens. Is it possible? I’ve tried using the screen size buttons at the top of the template page that I’m currently editing and then adding a “display: none;” rule under “Block Inspector → Advanced → Custom CSS”. But this adds the custom CSS to all screen sizes, so the block disappears completely, no matter what the screen size is. Which isn’t what I was expecting, given how the rest of the block inspector works.

Never mind. I found out how to do it. Under “Design → Layout → Visual”. So I didn’t need any custom css in the end.