I’m building my navigation from scratch because Blocs built-in navigation is inadequate for my needs. PROBLEM: When my menu dropdown is displayed in LG and then display size is switched to MD or smaller, I want that dropdown to automatically be hidden (actually: close).
I’ve read this:
I can type “d-lg-none” with success in the Classes field of the right sidebar when my dropdown is selected in MD or SM or XS, and when I preview and switch to LG, that dropdown is hidden. (Not closed though, because when I switch from LG back to a smaller screen size, the dropdown is still displayed. Not sure how to close it, but I guess hiding it is adequate.)
The problem is that Blocs doesn’t allow me to type class names with spaces into the Classes field of the right sidebar. I’ve made a menu dropdown especially for LG-only and I want that hidden when switching to MD or smaller. To do that, all I need to do is just type the following into Classes in the right sidebar:
But Blocs won’t allow it. Blocs automatically adds a hyphen where that space is, thereby breaking the code!
So how do I accomplish my aim?
Here’s my Blocs 3.2.2 document so you can easily test it and see what’s going on:
Archive.zip (108.2 KB)
Open the document and Preview in Blocs. You should be in LG. Click “製品” to make the dropdown appear. Now click “MD” and note the dropdown still displays, which is a problem. I want it to be closed automatically when the breakpoint switch occurs. How can I do that?