Skip to content

Commit

Permalink
chore(site): replace usages of --100vh hack with dvh units for mode…
Browse files Browse the repository at this point in the history
…rn browsers (#2211)
  • Loading branch information
fshovchko authored Feb 6, 2024
1 parent 279fe00 commit 7194504
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion site/src/localdev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import {ESLDemoAnchorLink} from './anchor/anchor-link';
import {ESLDemoBanner} from './banner/banner';
import {ESLDemoSwipeArea, ESLDemoWheelArea} from './esl-events-demo/esl-events-demo';

ESLVSizeCSSProxy.observe();
if (!CSS.supports('(height: 100dvh) or (width: 100dvw)')) ESLVSizeCSSProxy.observe();

// Register Demo components
ESLDemoAutofocus.register();
Expand Down
7 changes: 4 additions & 3 deletions site/src/navigation/sidebar/sidebar.less
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ esl-d-sidebar {
@media @md-xl {
position: relative;
top: 0;
/* stylelint-disable */
height: 100vh;
height: var(--100vh, 100vh);
/* stylelint-enable */
max-width: 72px;

@supports (height: 100dvh) {
height: 100dvh;
}
}

&.open {
Expand Down
7 changes: 4 additions & 3 deletions site/src/page/base-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

body {
width: 100%;
/* stylelint-disable */
height: 100vh;
height: var(--100vh, 100vh);
/* stylelint-enable */

@supports (height: 100dvh) {
height: 100dvh;
}
}
}

Expand Down

0 comments on commit 7194504

Please sign in to comment.