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 9090 "fg-loadcss" : " ^2.0.1" ,
9191 "fg-loadjs" : " ^1.0.0" ,
9292 "hogan.js" : " ^3.0.2" ,
93+ "iframe-resizer" : " ^3.6.2" ,
9394 "jquery" : " ^3.3.1" ,
9495 "js-cookie" : " ^2.2.0" ,
9596 "jshint" : " ^2.9.5" ,
100101 "prismjs" : " ^1.15.0" ,
101102 "pwa-helpers" : " ^0.8.3" ,
102103 "redux-thunk" : " ^2.3.0" ,
104+ "react-animate-height" : " ^2.0.4" ,
103105 "redux" : " ^4.0.0" ,
104106 "reselect" : " ^3.0.1" ,
105107 "scriptjs" : " ^2.5.8" ,
Original file line number Diff line number Diff line change 1515.pl-c-viewport {
1616 display : flex ;
1717 flex-direction : column ;
18- flex-direction : column ;
19- height : auto ;
2018 width : 100% ;
2119 position : relative ;
2220 top : $offset-top ;
2321 bottom : 0 ;
2422 left : 0 ;
2523 right : 0 ;
2624 z-index : 0 ;
27- overflow : hidden ;
2825 flex-grow : 1 ;
2926 transition : height 0.3s ease ;
3027
6057* iframe and the manual resize handle
6158*/
6259.pl-c-viewport__iframe-wrapper {
63- height : 100% ;
60+ display : flex ;
61+ flex-direction : column ;
62+ max-width : 100vw ;
6463 width : 100% ; // bug fix for Safari and Firefox getting stuck calculating a width of 0px when the JS first kicks in
6564 position : relative ;
6665 margin : 0 auto ;
6766 flex : 1 ;
6867 -webkit-overflow-scrolling : touch ;
69- overflow-y : auto ;
70- overflow-x : hidden ;
7168
7269 & .hay-mode {
7370 transition : all 40s linear ;
7471 }
7572 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+ }
7679}
7780
7881/* *
7982* Viewport iframe
8083* 1) this is the actual <iframe>
8184*/
8285.pl-c-viewport__iframe {
83- position : absolute ;
84- height : 100 % ;
86+ min-height : calc ( 100 vh - 35.5 px ) ;
87+ flex-grow : 1 ;
8588 width : 100% ;
8689 border : 0 ;
8790 padding : 0 ;
9396 background-color : $pl-color-white ;
9497 max-width : 100vw ; // https://github.com/bolt-design-system/bolt/pull/868
9598
99+ & .is-ready {
100+ min-height : 0 ;
101+ }
102+
96103 .pl-c-body--theme-sidebar & {
97104 @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 } );
99106 }
100107 }
101108
159166 display : flex ;
160167 flex-grow : 1 ;
161168 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
163171
164172 .pl-c-body--theme-sidebar & {
165173 @media all and (min-width : $pl-bp-med ) {
Original file line number Diff line number Diff line change 11import './utils/postmessage' ;
22import './components/modal-styleguide' ;
33import './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