File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @cloudfour/patterns ' : patch
3
+ ---
4
+
5
+ Prevent visually-hidden language labels from breaking width of overflowing code blocks
Original file line number Diff line number Diff line change @@ -135,7 +135,9 @@ audio {
135
135
* Code blocks
136
136
*
137
137
* 1. Don't allow code blocks to overflow willy-nilly.
138
- * 2. Set a shallower tab size to encourage accessible code samples without
138
+ * 2. Prevent absolute-positioned children (such as visually-hidden language
139
+ * labels) from breaking horizontal scroll in Chrome.
140
+ * 3. Set a shallower tab size to encourage accessible code samples without
139
141
* compromising horizontal real estate.
140
142
*/
141
143
@@ -145,7 +147,8 @@ pre {
145
147
color : color .$text-light ;
146
148
overflow : auto ; /* 1 */
147
149
padding : ms .step (1 );
148
- tab-size : 2 ; /* 2 */
150
+ position : relative ; /* 2 */
151
+ tab-size : 2 ; /* 3 */
149
152
}
150
153
151
154
/* *
You can’t perform that action at this time.
0 commit comments