File tree Expand file tree Collapse file tree 4 files changed +27
-7
lines changed
packages/uikit-workshop/src Expand file tree Collapse file tree 4 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 12
12
padding : 0 ;
13
13
background : $pl-color-gray-13 ;
14
14
-webkit-text-size-adjust : 100% ;
15
+ display : flex ;
16
+ flex-direction : column ;
17
+ height : 100vh ;
15
18
}
Original file line number Diff line number Diff line change 7
7
* "show pattern info" is selected on the pattern detail screen.
8
8
*/
9
9
.pl-c-modal {
10
- display : none ;
10
+ display : flex ;
11
+ flex-direction : column ;
11
12
font-family : $pl-font ;
12
13
background : $pl-color-black ;
13
14
color : $pl-color-gray-20 ;
17
18
left : 0 ;
18
19
z-index : 5 ;
19
20
width : 100% ;
20
- height : 50% ;
21
- transition : bottom 0.3s ease-out ;
21
+ height : 0 ;
22
+ transition : transform 0.3s ease , height 0.3s ease ;
23
+ transform : translate3d (0 , 100% , 0 );
24
+ pointer-events : none ;
25
+ will-change : height , transform ;
26
+ overflow : hidden ;
22
27
23
28
/* *
24
29
* Active modal
25
30
*/
26
31
& .pl-is-active {
27
- display : flex ;
28
- flex-direction : column ;
29
- bottom : 0 ;
32
+ transform : translate3d (0 , 0 , 0 );
33
+ height : 50vh ; // default height unless manually resized
34
+ transition : transform 0.3s ease ;
35
+ pointer-events : auto ;
30
36
}
31
37
}
32
38
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
- height : 100vh ;
18
+ flex-direction : column ;
19
+ height : auto ;
19
20
width : 100% ;
20
21
position : relative ;
21
22
top : $offset-top ;
24
25
right : 0 ;
25
26
z-index : 0 ;
26
27
overflow : hidden ;
28
+ flex-grow : 1 ;
29
+ transition : height 0.3s ease ;
30
+ transform : translate3d (0 , 0 , 0 );
31
+ will-change : height ;
32
+
33
+ @supports (position : sticky ) {
34
+ top : 0 ;
35
+ }
27
36
}
28
37
29
38
/* *
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ export const modalViewer = {
124
124
125
125
//Remove active class to modal
126
126
$ ( '.pl-js-modal' ) . removeClass ( 'pl-is-active' ) ;
127
+ $ ( '.pl-js-modal' ) . removeAttr ( 'style' ) ; // remove inline height CSS
127
128
128
129
// WIP: refactoring viewport panel to use CSS vars to resize
129
130
// $('html').css('--pl-viewport-height', window.innerHeight - 32 + 'px');
@@ -145,6 +146,7 @@ export const modalViewer = {
145
146
*/
146
147
hide : function ( ) {
147
148
$ ( '.pl-js-modal' ) . removeClass ( 'pl-is-active' ) ;
149
+ $ ( '.pl-js-modal' ) . removeAttr ( 'style' ) ; // remove inline height CSS
148
150
149
151
// WIP: refactoring viewport panel to use CSS vars to resize
150
152
// $('html').css(
You can’t perform that action at this time.
0 commit comments