Skip to content

Commit f0e5389

Browse files
authored
Упрощает вычисление размера скроллбара (#394)
1 parent e8f5edc commit f0e5389

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

src/scripts/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ import './modules/menu.js';
22
import './modules/copy-link.js';
33
import './modules/video.js';
44
import './modules/podcast.js';
5-
import './modules/scrollbar-size.js';

src/scripts/modules/scrollbar-size.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/styles/blocks/page.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
}
77

88
.page {
9+
container-type: inline-size;
910
color: var(--token-color-text-primary);
1011
font-family: 'Dewi', sans-serif;
1112
background-color: var(--token-color-background-primary);
1213
scroll-behavior: smooth;
1314
}
1415

1516
.page__body {
17+
--scrollbar-size: calc(100vw - 100cqw);
1618
max-width: 1920px;
1719
margin: 0 auto;
1820
}

src/styles/blocks/podcast.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
}
9898

9999
.podcast__player::before {
100-
--_scrollbar-size: calc(var(--scrollbar-size, 0) * 1px);
100+
--_scrollbar-size: var(--scrollbar-size, 0);
101101
content: '';
102102
position: absolute;
103103
inset-block: -16px;

0 commit comments

Comments
 (0)