Skip to content

Commit 6a4d21f

Browse files
authored
Merge pull request #27 from sghoweri/mobile-code-formatting
Add Smooth Scrolling to Code Snippets + Improve Code Wrapping on Mobile
2 parents 714fae2 + 22bbd98 commit 6a4d21f

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

dist/styleguide/css/styleguide.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@
886886
font-size: 90%;
887887
color: #808080;
888888
overflow: auto;
889+
-webkit-overflow-scrolling: touch;
889890
}
890891
.sg-pattern-extra-info:empty {
891892
padding: 0;
@@ -939,6 +940,7 @@
939940
}
940941
.sg-pattern-extra-code pre {
941942
overflow: scroll !important;
943+
-webkit-overflow-scrolling: touch;
942944
padding: 0 0.5rem 0.5rem !important;
943945
margin: 0 !important;
944946
line-height: 1 !important;
@@ -965,6 +967,17 @@
965967
}
966968
}
967969

970+
.language-markup code[class*=language-],
971+
.language-markup pre[class*=language-] {
972+
white-space: pre-wrap;
973+
}
974+
@media all and (min-width: 42em) {
975+
.language-markup code[class*=language-],
976+
.language-markup pre[class*=language-] {
977+
white-space: pre;
978+
}
979+
}
980+
968981
/*------------------------------------*\
969982
#TABS
970983
\*------------------------------------*/

0 commit comments

Comments
 (0)