CSS pro tip for mac users: always show scroll bars in macOS.

I built a quite complicated component in HTML and CSS last week and I was happy with the result. After testing in different browsers and operating systems, I realised that I had to rewrite the whole thing because I didn’t consider that by defa…


This content originally appeared on Web development blog - Manuel Matuzović and was authored by Manuel Matuzović

I built a quite complicated component in HTML and CSS last week and I was happy with the result. After testing in different browsers and operating systems, I realised that I had to rewrite the whole thing because I didn’t consider that by default scroll bars don’t take up space on macOS, but on Windows they do. I tweeted about a similar issue about a year ago, but it seems that I didn’t take my own advice, so here’s a reminder for you and me.

Change your macOS settings to always show scroll bars. This will help you spot overflow bugs, e.g. caused by width: 100vw, before anybody else does. :)

General settings screen in macOS with "scow scroll bars" set to "always"

Side note: Adding max-width: 100% often helps.

.header {
width: 100vw;
max-width: 100%;
}


This content originally appeared on Web development blog - Manuel Matuzović and was authored by Manuel Matuzović


Print Share Comment Cite Upload Translate Updates
APA

Manuel Matuzović | Sciencx (2020-01-20T06:48:54+00:00) CSS pro tip for mac users: always show scroll bars in macOS.. Retrieved from https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/

MLA
" » CSS pro tip for mac users: always show scroll bars in macOS.." Manuel Matuzović | Sciencx - Monday January 20, 2020, https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/
HARVARD
Manuel Matuzović | Sciencx Monday January 20, 2020 » CSS pro tip for mac users: always show scroll bars in macOS.., viewed ,<https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/>
VANCOUVER
Manuel Matuzović | Sciencx - » CSS pro tip for mac users: always show scroll bars in macOS.. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/
CHICAGO
" » CSS pro tip for mac users: always show scroll bars in macOS.." Manuel Matuzović | Sciencx - Accessed . https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/
IEEE
" » CSS pro tip for mac users: always show scroll bars in macOS.." Manuel Matuzović | Sciencx [Online]. Available: https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/. [Accessed: ]
rf:citation
» CSS pro tip for mac users: always show scroll bars in macOS. | Manuel Matuzović | Sciencx | https://www.scien.cx/2020/01/20/css-pro-tip-for-mac-users-always-show-scroll-bars-in-macos/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.