WordPress / wp20.wordpress.net

Celebrating 20 years of WordPress
5 stars 1 forks source link

Fix header layout issues on small screens #102

Closed adamwoodnz closed 1 year ago

adamwoodnz commented 1 year ago

Fixes #101

The addition of the accessible locale switcher caused a regression on screens exactly 768px wide (typical iPad), due to the way breakpoints are implemented in twentyseventeen. This PR adjusts the overrides and desktop styles around that breakpoint, so that:

I also noticed that we hadn't handled overflow for long locale names in the switcher, so I've also added text-overflow: ellipsis for that.

How to test

Screenshots

See #101 for before

Tablet (768px ) default Nav active Locale switcher active
localhost_8888_(iPad) (2) localhost_8888_(iPad) (3) localhost_8888_(iPad) (4)
Desktop Mobile Mobile small
localhost_8888__locale=en_NZ(Desktop) localhost_8888__locale=en_NZ(Samsung Galaxy S20 Ultra) localhost_8888_(Galaxy S5)