Open mfoitzik opened 5 months ago
I am wondering if I am missing something here or do not understand something.
I have also wondered this. As you say, it's easy to fix but I don't understand why it's there in the first place.
I added padding to the sides of the nav to get around this but I'm not understanding why there's an intentional overflow either.
Describe the issue
I am referencing #394 for this issue. The nav component example shown in your documentation causes a horizontal scroll bar. The version of Pico I am using is the v2.0.6. The issue is caused by the negative margin you use on the ul's in the nav example:
I can easily override the two classes above by removing the * -1 and the problem goes away. However, your documentation actually describes and shows that this is a feature ("negative margins on childrens to provide a nice ::focus-visible style for links on keyboard navigation while keeping the content aligned horizontally")
I am wondering if I am missing something here or do not understand something.
Current Behavior
nav example causes horizontal scrollbar in browser
Expected Behavior
no horizontal scrollbar
Reproduction URL
Codepen with problem: https://codepen.io/mfoitzik/pen/QWRKQpd?editors=1000 Codepen with override fix added: https://codepen.io/mfoitzik/pen/ExzgQmp
Environment
I use Windows 10 and tried this in Firefox, Chrome and Edge