File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 90
90
"fg-loadcss" : " ^2.0.1" ,
91
91
"fg-loadjs" : " ^1.0.0" ,
92
92
"hogan.js" : " ^3.0.2" ,
93
+ "iframe-resizer" : " ^3.6.2" ,
93
94
"jquery" : " ^3.3.1" ,
94
95
"js-cookie" : " ^2.2.0" ,
95
96
"jshint" : " ^2.9.5" ,
100
101
"prismjs" : " ^1.15.0" ,
101
102
"pwa-helpers" : " ^0.8.3" ,
102
103
"redux-thunk" : " ^2.3.0" ,
104
+ "react-animate-height" : " ^2.0.4" ,
103
105
"redux" : " ^4.0.0" ,
104
106
"reselect" : " ^3.0.1" ,
105
107
"scriptjs" : " ^2.5.8" ,
Original file line number Diff line number Diff line change 15
15
.pl-c-viewport {
16
16
display : flex ;
17
17
flex-direction : column ;
18
- flex-direction : column ;
19
- height : auto ;
20
18
width : 100% ;
21
19
position : relative ;
22
20
top : $offset-top ;
23
21
bottom : 0 ;
24
22
left : 0 ;
25
23
right : 0 ;
26
24
z-index : 0 ;
27
- overflow : hidden ;
28
25
flex-grow : 1 ;
29
26
transition : height 0.3s ease ;
30
27
60
57
* iframe and the manual resize handle
61
58
*/
62
59
.pl-c-viewport__iframe-wrapper {
63
- height : 100% ;
60
+ display : flex ;
61
+ flex-direction : column ;
62
+ max-width : 100vw ;
64
63
width : 100% ; // bug fix for Safari and Firefox getting stuck calculating a width of 0px when the JS first kicks in
65
64
position : relative ;
66
65
margin : 0 auto ;
67
66
flex : 1 ;
68
67
-webkit-overflow-scrolling : touch ;
69
- overflow-y : auto ;
70
- overflow-x : hidden ;
71
68
72
69
& .hay-mode {
73
70
transition : all 40s linear ;
74
71
}
75
72
width : 100% ; // bug fix for Safari and Firefox getting stuck calculating a width of 0px when the JS first kicks in
73
+
74
+ .pl-c-body--theme-sidebar & {
75
+ @media all and (min-width : $pl-bp-med ) {
76
+ max-width : calc (100vw - #{$pl-sidebar-width } );
77
+ }
78
+ }
76
79
}
77
80
78
81
/* *
79
82
* Viewport iframe
80
83
* 1) this is the actual <iframe>
81
84
*/
82
85
.pl-c-viewport__iframe {
83
- position : absolute ;
84
- height : 100 % ;
86
+ min-height : calc ( 100 vh - 35.5 px ) ;
87
+ flex-grow : 1 ;
85
88
width : 100% ;
86
89
border : 0 ;
87
90
padding : 0 ;
93
96
background-color : $pl-color-white ;
94
97
max-width : 100vw ; // https://github.com/bolt-design-system/bolt/pull/868
95
98
99
+ & .is-ready {
100
+ min-height : 0 ;
101
+ }
102
+
96
103
.pl-c-body--theme-sidebar & {
97
104
@media all and (min-width : $pl-bp-med ) {
98
- max-width : calc (100vw - #{$pl-sidebar-width } + 14 px );
105
+ max-width : calc (100vw - #{$pl-sidebar-width } );
99
106
}
100
107
}
101
108
159
166
display : flex ;
160
167
flex-grow : 1 ;
161
168
flex-direction : column ;
162
- max-width : calc (100vw );
169
+ max-width : 100vw ;
170
+ position : relative ; // used for absolute positioning if position sticky isn't supported
163
171
164
172
.pl-c-body--theme-sidebar & {
165
173
@media all and (min-width : $pl-bp-med ) {
Original file line number Diff line number Diff line change 1
1
import './utils/postmessage' ;
2
2
import './components/modal-styleguide' ;
3
3
import './components/pl-search/pl-search.iframe-helper' ; // communicates with the main <pl-search> component via the PL iframe
4
+ import 'iframe-resizer/js/iframeResizer.contentWindow.min.js' ; // automatically syncs inner iFrame height with main Pattern Lab page
You can’t perform that action at this time.
0 commit comments