Skip to content

Commit 62f8bdb

Browse files
committed
fix: misc firefox-related bug fixes and quirks, including requiring the modal-viewer JS to get further delayed to prevent JS binding issues
1 parent 930b619 commit 62f8bdb

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

packages/uikit-workshop/src/sass/scss/04-components/_controls.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
flex-wrap: nowrap;
1313

1414
// IE 11 layout bug
15-
.pl-c-body--theme-sidebar & {
16-
display: block;
15+
@media all and (min-width: $pl-bp-med) {
16+
.pl-c-body--theme-sidebar & {
17+
display: block;
18+
}
1719
}
1820
}
1921

packages/uikit-workshop/src/sass/scss/04-components/_ish-sizing.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,8 @@
7575

7676
@media all and (min-width: $pl-bp-med) {
7777
align-items: center;
78-
justify-content: center;
79-
overflow-x: auto;
8078
-webkit-overflow-scrolling: touch;
8179

82-
.pl-c-body--theme-sidebar & {
83-
display: block;
84-
display: flex;
85-
}
8680
}
8781

8882
@media all and (min-width: $pl-bp-large) {

packages/uikit-workshop/src/sass/scss/04-components/_navigation.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@
5757

5858
@media all and (min-width: $pl-bp-med) {
5959
display: flex; /* 2 */
60+
61+
// workaround to Firefox-specific flexbox quirk
62+
.pl-c-body--theme-sidebar & {
63+
display: block;
64+
}
6065
}
6166
}
6267

packages/uikit-workshop/src/sass/scss/04-components/_viewport.scss

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
overflow: hidden;
2828
flex-grow: 1;
2929
transition: height 0.3s ease;
30-
transform: translate3d(0, 0, 0);
31-
will-change: height;
3230

3331
@supports (position: sticky) {
3432
top: 0;
@@ -48,9 +46,12 @@
4846
width: 100%;
4947
height: 100%;
5048
display: none;
51-
position: absolute;
52-
z-index: 20;
49+
position: fixed;
50+
top: 0;
51+
left: 0;
52+
z-index: 200;
5353
cursor: move;
54+
pointer-events: auto; // Firefox bug fix
5455
}
5556

5657
/**

packages/uikit-workshop/src/scripts/components/pl-toggle-layout/pl-toggle-layout.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pl-toggle-layout {
1010
cursor: pointer;
1111

1212
@media all and (min-width: $pl-bp-med) {
13-
display: inline-flex;
13+
display: flex;
1414
}
1515
}
1616

packages/uikit-workshop/src/scripts/components/pl-toggle-theme/pl-toggle-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import '{ .pl-c-tools__action, .pl-c-tools__action-text, .pl-c-tools__action-icon } from ../../../sass/scss/04-components/_tools.scss';
33

44
pl-toggle-theme {
5-
display: inline-flex;
5+
display: flex;
66
align-self: center;
77
justify-content: center;
88
align-items: center;

packages/uikit-workshop/src/scripts/patternlab-viewer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ loadPolyfills.then(res => {
44
import(/* webpackMode: 'eager', webpackChunkName: 'pl-layout' */ './components/pl-layout/pl-layout').then(
55
() => {
66
// this ensures that the old-school way the styleguide JS binds to the page isn't thrown off by the <pl-layout> component rendering -- temp workaround till the logic in styleguide.js gets broken down and refactored.
7-
import(/* webpackMode: 'eager', webpackChunkName: 'pl-styleguide' */ './components/styleguide');
7+
import(/* webpackMode: 'lazy', webpackChunkName: 'pl-styleguide' */ './components/styleguide');
8+
import(/* webpackMode: 'lazy', webpackChunkName: 'pl-modal-viewer' */ './components/modal-viewer');
89
}
910
);
1011
import(/* webpackMode: 'eager', webpackChunkName: 'pl-toggle-theme' */ './components/pl-toggle-theme/pl-toggle-theme');
1112
import(/* webpackMode: 'eager', webpackChunkName: 'pl-toggle-layout' */ './components/pl-toggle-layout/pl-toggle-layout');
1213
});
1314

1415
import './components/typeahead';
15-
import './components/modal-viewer';
1616
import './components/panels';
1717
import './components/panels-viewer';
1818
import './components/pattern-finder';

0 commit comments

Comments
 (0)