Make the burger menu look nice before realizing details/summary cannot be nicely responsive
One unmentioned con: The menu has to be repeated in HTML for this to switch responsively from spelled-out menu to hamburger, with the widescreen version outside the details. (Or JavaScript is needed to set the initial open/close state based on viewport size, and that seems to defeat the purpose.) Left as comment at https://lucas-levin.com/code/blog/burger-navigation-menu-with-no-javascript-and-no-checkbox-hack
This commit is contained in:
parent
234bc216c5
commit
c2f931f06a
1 changed files with 5 additions and 3 deletions
|
@ -65,12 +65,14 @@
|
|||
|
||||
// Main navigation, goes to code in page.html.twig
|
||||
details .burger-icon {
|
||||
transition: transform 0.1s;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: 0;
|
||||
padding: 1.25rem 2.5rem 1rem 1.5rem;
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
padding: .25rem;
|
||||
cursor: pointer;
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
details[open] .burger-icon {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue