|
13 | 13 | * 1) This wrapper div occupies all remaining viewport space after PL's header
|
14 | 14 | */
|
15 | 15 | .pl-c-viewport {
|
16 |
| - display: flex; |
17 |
| - flex-direction: column; |
18 |
| - height: 100vh; |
19 |
| - width: 100%; |
20 |
| - position: relative; |
21 |
| - top: $offset-top; |
22 |
| - bottom: 0; |
23 |
| - left: 0; |
24 |
| - right: 0; |
25 |
| - z-index: 0; |
26 |
| - overflow: hidden; |
| 16 | + display: flex; |
| 17 | + flex-direction: column; |
| 18 | + height: 100vh; |
| 19 | + width: 100%; |
| 20 | + position: relative; |
| 21 | + top: $offset-top; |
| 22 | + bottom: 0; |
| 23 | + left: 0; |
| 24 | + right: 0; |
| 25 | + z-index: 0; |
| 26 | + overflow: hidden; |
27 | 27 | }
|
28 | 28 |
|
29 | 29 | /**
|
|
32 | 32 | * used in JS for manual viewport resizing purposes.
|
33 | 33 | */
|
34 | 34 | .pl-c-viewport__cover {
|
35 |
| - width: 100%; |
36 |
| - height: 100%; |
37 |
| - display: none; |
38 |
| - position: absolute; |
39 |
| - z-index: 20; |
40 |
| - cursor: move; |
| 35 | + width: 100%; |
| 36 | + height: 100%; |
| 37 | + display: none; |
| 38 | + position: absolute; |
| 39 | + z-index: 20; |
| 40 | + cursor: move; |
41 | 41 | }
|
42 | 42 |
|
43 | 43 | /**
|
|
46 | 46 | * iframe and the manual resize handle
|
47 | 47 | */
|
48 | 48 | .pl-c-viewport__iframe-wrapper {
|
49 |
| - height: 100%; |
50 |
| - position: relative; |
51 |
| - margin: 0 auto; |
52 |
| - flex: 1; |
53 |
| - -webkit-overflow-scrolling: touch; |
54 |
| - overflow-y: auto; |
55 |
| - overflow-x: hidden; |
| 49 | + height: 100%; |
| 50 | + width: 100%; // bug fix for Safari and Firefox getting stuck calculating a width of 0px when the JS first kicks in |
| 51 | + position: relative; |
| 52 | + margin: 0 auto; |
| 53 | + flex: 1; |
| 54 | + -webkit-overflow-scrolling: touch; |
| 55 | + overflow-y: auto; |
| 56 | + overflow-x: hidden; |
56 | 57 |
|
57 |
| - &.hay-mode { |
58 |
| - transition: all 40s linear; |
59 |
| - } |
| 58 | + &.hay-mode { |
| 59 | + transition: all 40s linear; |
| 60 | + } |
60 | 61 | }
|
61 | 62 |
|
62 | 63 | /**
|
63 | 64 | * Viewport iframe
|
64 | 65 | * 1) this is the actual <iframe>
|
65 | 66 | */
|
66 | 67 | .pl-c-viewport__iframe {
|
67 |
| - position: absolute; |
68 |
| - height: 100%; |
69 |
| - width: 100%; |
70 |
| - border: 0; |
71 |
| - padding: 0; |
72 |
| - margin: 0; |
73 |
| - top: 0; |
74 |
| - bottom: 0; |
75 |
| - left: 0; |
76 |
| - right: 0; |
77 |
| - background-color: $pl-color-white; |
| 68 | + position: absolute; |
| 69 | + height: 100%; |
| 70 | + width: 100%; |
| 71 | + border: 0; |
| 72 | + padding: 0; |
| 73 | + margin: 0; |
| 74 | + top: 0; |
| 75 | + bottom: 0; |
| 76 | + left: 0; |
| 77 | + right: 0; |
| 78 | + background-color: $pl-color-white; |
78 | 79 |
|
79 |
| - /** |
| 80 | + /** |
80 | 81 | * Hay Mode transition
|
81 | 82 | * 1) Hay Mode (disabled by default) starts with the smallest
|
82 | 83 | * viewport then slowly expands http://bradfrost.com/blog/post/ish-2-0/
|
83 | 84 | */
|
84 |
| - &.hay-mode { |
85 |
| - transition: all 40s linear; |
86 |
| - } |
| 85 | + &.hay-mode { |
| 86 | + transition: all 40s linear; |
| 87 | + } |
87 | 88 | }
|
88 | 89 |
|
89 | 90 | /**
|
90 | 91 | * Right pull container
|
91 | 92 | * 1) Container used for manual resizing
|
92 | 93 | */
|
93 | 94 | .pl-c-viewport__resizer {
|
94 |
| - position: absolute; |
95 |
| - right: 0; |
96 |
| - top: 0; |
97 |
| - bottom: 0; |
98 |
| - width: 14px; |
99 |
| - margin: 0; |
100 |
| - height: 100%; |
101 |
| - cursor: ew-resize; |
| 95 | + position: absolute; |
| 96 | + right: 0; |
| 97 | + top: 0; |
| 98 | + bottom: 0; |
| 99 | + width: 14px; |
| 100 | + margin: 0; |
| 101 | + height: 100%; |
| 102 | + cursor: ew-resize; |
102 | 103 | }
|
103 | 104 |
|
104 | 105 | /**
|
105 | 106 | * Right pull
|
106 | 107 | * 1) This is the handle that lets the user resize the viewport
|
107 | 108 | */
|
108 | 109 | .pl-c-viewport__resizer-handle {
|
109 |
| - margin: 0; |
110 |
| - width: 100%; |
111 |
| - height: 100%; |
112 |
| - background: $pl-color-gray-20; |
113 |
| - transition: background $pl-animate-quick ease-out; |
| 110 | + margin: 0; |
| 111 | + width: 100%; |
| 112 | + height: 100%; |
| 113 | + background: $pl-color-gray-20; |
| 114 | + transition: background $pl-animate-quick ease-out; |
114 | 115 |
|
115 |
| - &:hover { |
116 |
| - background: $pl-color-gray-50; |
117 |
| - } |
| 116 | + &:hover { |
| 117 | + background: $pl-color-gray-50; |
| 118 | + } |
118 | 119 |
|
119 |
| - &:active { |
120 |
| - cursor: move; |
121 |
| - background: $pl-color-gray-70; |
122 |
| - } |
| 120 | + &:active { |
| 121 | + cursor: move; |
| 122 | + background: $pl-color-gray-70; |
| 123 | + } |
123 | 124 | }
|
124 | 125 |
|
125 | 126 | /**
|
|
128 | 129 | * transition the width of the viewport
|
129 | 130 | */
|
130 | 131 | .vp-animate {
|
131 |
| - transition: width 0.8s ease-out; |
| 132 | + transition: width 0.8s ease-out; |
132 | 133 | }
|
0 commit comments