Skip to content

Commit 183acd6

Browse files
committed
Styleguide.js changes for small screens
1 parent ce13eae commit 183acd6

File tree

5 files changed

+22
-3
lines changed

5 files changed

+22
-3
lines changed

public/styleguide/css/styleguide.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,11 @@
347347
-o-transition: all 40s linear;
348348
transition: all 40s linear; }
349349

350+
.no-resize #sg-cover, .no-resize #sg-rightpull-container {
351+
display: none; }
352+
.no-resize #sg-viewport {
353+
overflow: hidden !important; }
354+
350355
#sg-cover {
351356
width: 100%;
352357
height: 100%;

public/styleguide/css/styleguide.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,17 @@ $animate-quick: 0.2s;
503503
}
504504
}
505505

506+
.no-resize {
507+
#sg-cover, #sg-rightpull-container {
508+
display: none;
509+
}
510+
511+
#sg-viewport {
512+
overflow: hidden !important;
513+
}
514+
515+
}
516+
506517
#sg-cover {
507518
width: 100%;
508519
height: 100%;

public/styleguide/js/code-viewer-ck.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/styleguide/js/postmessage-ck.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/styleguide/js/styleguide.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,10 @@
307307

308308
//Detect larger screen and no touch support
309309
if('ontouchstart' in document.documentElement && window.matchMedia("(max-width: 700px)").matches) {
310-
console.log('touch and less than 700px');
310+
$('body').addClass('no-resize');
311+
$('#sg-viewport ').width(sw);
312+
313+
alert('workit');
311314
} else {
312315

313316
}

0 commit comments

Comments
 (0)