Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit b1c7cc4

Browse files
committed
Added position: relative to sg-pattern
Prevents absolutely-positioned elements from floating to the top
1 parent 3712052 commit b1c7cc4

File tree

4 files changed

+154
-176
lines changed

4 files changed

+154
-176
lines changed

core/styleguide/css/styleguide.css

Lines changed: 76 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
/*------------------------------------*\
5050
$PATTERN LAB INTERFACE
5151
\*------------------------------------*/
52-
5352
#patternlab-html, #patternlab-body {
5453
margin: 0;
5554
padding: 0;
@@ -70,7 +69,7 @@
7069
clip: rect(1px, 1px, 1px, 1px); }
7170

7271
.sg-cf, .sg-pattern {
73-
/*zoom: 1;*/ }
72+
/**zoom: 1;*/ }
7473
.sg-cf:before, .sg-pattern:before, .sg-cf:after, .sg-pattern:after {
7574
content: " ";
7675
display: table; }
@@ -227,6 +226,9 @@
227226
min-width: 0; }
228227
.sg-controls .sg-nav-phases .sg-acc-panel.active {
229228
max-height: none; }
229+
@media all and (min-width: 69.5em) {
230+
.sg-controls {
231+
width: 41.5em; } }
230232

231233
.sg-control-trigger {
232234
border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
@@ -263,7 +265,7 @@
263265
.sg-current-size:hover .sg-input {
264266
background: #999999;
265267
color: #000; }
266-
@media all and (min-width: 72.5em) {
268+
@media all and (min-width: 69.5em) {
267269
.sg-current-size {
268270
float: left; } }
269271

@@ -273,7 +275,7 @@
273275
.sg-size {
274276
width: auto; } }
275277

276-
@media all and (min-width: 72.5em) {
278+
@media all and (min-width: 69.5em) {
277279
.sg-size-options {
278280
float: left;
279281
position: static;
@@ -284,16 +286,12 @@
284286
border: 0;
285287
border-left: 1px solid rgba(255, 255, 255, 0.05); } }
286288

287-
.sg-find, .sg-mqs {
288-
display: none;
289-
}
289+
.sg-find {
290+
display: none; }
290291

291292
@media all and (min-width: 48em) {
292-
.sg-find, .sg-mqs {
293-
display: block;
294-
}
295-
}
296-
293+
.sg-find {
294+
display: block; } }
297295
#sg-form {
298296
margin: 0;
299297
border: 0;
@@ -322,7 +320,7 @@
322320
top: 2em;
323321
left: 0; }
324322

325-
.sg-iconitem:before {
323+
.sg-checkbox:before {
326324
display: inline-block;
327325
margin-right: 0.4em; }
328326

@@ -338,8 +336,7 @@
338336
bottom: 0;
339337
left: 0;
340338
right: 0;
341-
z-index: 0;
342-
}
339+
z-index: 0; }
343340
#sg-vp-wrap.wrap-animate {
344341
-webkit-transition: left 0.3s ease-out;
345342
-moz-transition: left 0.3s ease-out;
@@ -358,8 +355,7 @@
358355
bottom: 0;
359356
left: 0;
360357
right: 0;
361-
background-color: white;
362-
}
358+
background-color: white; }
363359
#sg-viewport.hay-mode {
364360
-webkit-transition: all 40s linear;
365361
-moz-transition: all 40s linear;
@@ -387,8 +383,7 @@
387383
margin: 0 auto;
388384
-webkit-overflow-scrolling: touch;
389385
overflow-y: auto;
390-
overflow-x: hidden;
391-
}
386+
overflow-x: hidden; }
392387
#sg-gen-container.hay-mode {
393388
-webkit-transition: all 40s linear;
394389
-moz-transition: all 40s linear;
@@ -401,8 +396,7 @@
401396
float: right;
402397
margin: 0;
403398
height: 100%;
404-
cursor: col-resize;
405-
}
399+
cursor: col-resize; }
406400

407401
#sg-rightpull {
408402
margin: 0;
@@ -432,7 +426,8 @@
432426
\*------------------------------------*/
433427
/* Section Pattern */
434428
.sg-pattern {
435-
margin-bottom: 2em; }
429+
margin-bottom: 2em;
430+
position: relative; }
436431

437432
/* Section Head */
438433
.sg-pattern-head {
@@ -522,13 +517,12 @@
522517
color: #fff;
523518
text-transform: uppercase;
524519
text-decoration: none;
525-
text-align: right;
520+
text-align: right;
526521
display: block; }
527522

528523
.has-annotation {
529524
cursor: help !important;
530-
box-shadow: 0 0 10px gray;
531-
}
525+
box-shadow: 0 0 10px gray; }
532526
.has-annotation a, .has-annotation input {
533527
cursor: help !important; }
534528
.has-annotation:hover {
@@ -537,20 +531,19 @@
537531
box-shadow: inset 0 0 20px gray; }
538532

539533
.annotation-tip {
540-
display: block;
541-
position: absolute;
542-
margin-top: -10px !important;
543-
margin-left: -10px !important;
544-
width: 25px !important;
545-
height: 25px !important;
546-
border-radius: 13px !important;
547-
text-align: center !important;
548-
background: #444 !important;
549-
color: #fff !important;
550-
font-weight: bold !important;
551-
font-size: 16px !important;
552-
z-index: 100;
553-
}
534+
display: block;
535+
position: absolute;
536+
margin-top: -10px !important;
537+
margin-left: -10px !important;
538+
width: 25px !important;
539+
height: 25px !important;
540+
border-radius: 13px !important;
541+
text-align: center !important;
542+
background: #444 !important;
543+
color: #fff !important;
544+
font-weight: bold !important;
545+
font-size: 16px !important;
546+
z-index: 100; }
554547

555548
#sg-comments-container {
556549
max-width: 60em;
@@ -641,75 +634,70 @@ div.clear {
641634
.spinner {
642635
height: 30px;
643636
width: 30px;
644-
margin-left: auto; margin-right: auto;
637+
margin-left: auto;
638+
margin-right: auto;
645639
background-position: center center;
646640
background-repeat: no-repeat;
647-
background: url('../images/spinner.gif');
641+
background: url("../images/spinner.gif");
648642
border-radius: 50%;
649643
opacity: .7; }
650644

645+
/* Pattern Lab icon fonts */
651646
/* Pattern Lab icon fonts */
652647
@font-face {
653-
font-family: 'icomoon';
654-
src:url('../fonts/icomoon.eot?srsv7g');
655-
src:url('../fonts/icomoon.eot?#iefixsrsv7g') format('embedded-opentype'),
656-
url('../fonts/icomoon.woff?srsv7g') format('woff'),
657-
url('../fonts/icomoon.ttf?srsv7g') format('truetype'),
658-
url('../fonts/icomoon.svg?srsv7g#icomoon') format('svg');
659-
font-weight: normal;
660-
font-style: normal;
661-
}
662-
663-
.icon-search, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .icon-radio-checked, .icon-radio-unchecked, .icon-file, .icon-link, .icon-keyboard, .icon-qrcode, .icon-eye, .sg-iconitem {
664-
font-family: 'icomoon';
665-
speak: none;
666-
font-style: normal;
667-
font-weight: normal;
668-
font-variant: normal;
669-
text-transform: none;
670-
line-height: 1;
671-
672-
/* Better Font Rendering =========== */
673-
-webkit-font-smoothing: antialiased;
674-
-moz-osx-font-smoothing: grayscale;
675-
}
648+
font-family: 'icomoon';
649+
src: url("../fonts/icomoon.eot?srsv7g");
650+
src: url("../fonts/icomoon.eot?#iefixsrsv7g") format("embedded-opentype"), url("../fonts/icomoon.woff?srsv7g") format("woff"), url("../fonts/icomoon.ttf?srsv7g") format("truetype"), url("../fonts/icomoon.svg?srsv7g#icomoon") format("svg");
651+
font-weight: normal;
652+
font-style: normal; }
653+
654+
.icon-search, .icon-cog, .icon-minus, .icon-plus, .icon-menu, .icon-radio-checked, .icon-radio-unchecked, .icon-file, .icon-link, .icon-keyboard, .icon-qrcode, .icon-eye, .sg-checkbox {
655+
font-family: 'icomoon';
656+
speak: none;
657+
font-style: normal;
658+
font-weight: normal;
659+
font-variant: normal;
660+
text-transform: none;
661+
line-height: 1;
662+
/* Better Font Rendering =========== */
663+
-webkit-font-smoothing: antialiased;
664+
-moz-osx-font-smoothing: grayscale; }
676665

677666
.icon-search:before {
678-
content: "\e600";
679-
}
667+
content: "\e600"; }
668+
680669
.icon-cog:before {
681-
content: "\e601";
682-
}
670+
content: "\e601"; }
671+
683672
.icon-minus:before {
684-
content: "\e602";
685-
}
673+
content: "\e602"; }
674+
686675
.icon-plus:before {
687-
content: "\e603";
688-
}
676+
content: "\e603"; }
677+
689678
.icon-menu:before {
690-
content: "\e604";
691-
}
679+
content: "\e604"; }
680+
692681
.icon-radio-checked:before, .sg-checkbox.active:before {
693-
content: "\e605";
694-
}
682+
content: "\e605"; }
683+
695684
.icon-radio-unchecked:before, .sg-checkbox:before {
696-
content: "\e606";
697-
}
685+
content: "\e606"; }
686+
698687
.icon-file:before {
699-
content: "\e607";
700-
}
688+
content: "\e607"; }
689+
701690
.icon-link:before {
702-
content: "\e608";
703-
}
691+
content: "\e608"; }
692+
704693
.icon-keyboard:before {
705-
content: "\e609";
706-
}
694+
content: "\e609"; }
695+
707696
.icon-qrcode:before {
708-
content: "\e60a";
709-
}
697+
content: "\e60a"; }
698+
710699
.icon-eye:before {
711-
content: "\e60b";
712-
}
700+
content: "\e60b"; }
713701

714702
/******************************************************************/
715703
/* End Pattern Lab Interface code */

core/styleguide/css/styleguide.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ $animate-quick: 0.2s;
611611
/* Section Pattern */
612612
.sg-pattern {
613613
margin-bottom: $sg-doublespace;
614+
position: relative; //Prevents absolutely-positioned elements from floating to the top
614615
@extend .sg-cf;
615616
}
616617

0 commit comments

Comments
 (0)