Add permanent scrollbar to code blocks.

This adds a permanent scrollbar to code blocks to get around some
Chrome on Mac issues where scrollbars won’t appear with particular
combinations of hardware.

Fixes: #1565.
This commit is contained in:
Brock Whittaker 2016-08-22 18:22:53 -07:00 committed by Tim Abbott
parent 1d0ae8b11c
commit ce4ff5850c
1 changed files with 19 additions and 0 deletions

View File

@ -261,7 +261,26 @@ pre {
margin-bottom: 5px;
}
/* Ensure the horizontal scrollbar is visible on Mac */
pre::-webkit-scrollbar {
height: 8px;
background-color: rgba(0,0,0,0.05);
}
pre::-webkit-scrollbar-thumb {
background-color: rgba(0,0,0,0.3);
border-radius: 20px;
transition: all 0.2s ease;
}
pre::-webkit-scrollbar-thumb:hover {
background-color: rgb(0,0,0,0.6);
}
pre code {
overflow-x: scroll;
white-space: pre;
}