Reset
This commit is contained in:
@@ -38,14 +38,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
:root {
|
|
||||||
--scrollbar-offset: 0px;
|
|
||||||
--scrollbar-offset-negative: 0px;
|
|
||||||
}
|
|
||||||
html {
|
html {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
scrollbar-gutter: stable;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
html {
|
html {
|
||||||
@@ -84,6 +78,7 @@
|
|||||||
/* We need this style to prevent web dropdowns from shifting the display when opening */
|
/* We need this style to prevent web dropdowns from shifting the display when opening */
|
||||||
body {
|
body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -490,10 +490,6 @@ const styles = StyleSheet.create({
|
|||||||
{
|
{
|
||||||
translateX: '-100%',
|
translateX: '-100%',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
// @ts-ignore web only -esb
|
|
||||||
translateX: 'var(--scrollbar-offset-negative, 0px)',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
width: 240,
|
width: 240,
|
||||||
// @ts-ignore web only
|
// @ts-ignore web only
|
||||||
|
|||||||
@@ -127,10 +127,6 @@ const styles = StyleSheet.create({
|
|||||||
{
|
{
|
||||||
translateX: 300,
|
translateX: 300,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
// @ts-ignore web only -esb
|
|
||||||
translateX: 'var(--scrollbar-offset, 0px)',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
maxHeight: '100%',
|
maxHeight: '100%',
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
|
|||||||
+1
-21
@@ -43,14 +43,8 @@
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
:root {
|
|
||||||
--scrollbar-offset: 0px;
|
|
||||||
--scrollbar-offset-negative: 0px;
|
|
||||||
}
|
|
||||||
html {
|
html {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
scrollbar-gutter: stable;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
}
|
||||||
@media (prefers-color-scheme: dark) {
|
@media (prefers-color-scheme: dark) {
|
||||||
html {
|
html {
|
||||||
@@ -89,23 +83,9 @@
|
|||||||
/* We need this style to prevent web dropdowns from shifting the display when opening */
|
/* We need this style to prevent web dropdowns from shifting the display when opening */
|
||||||
body {
|
body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
|
||||||
try {
|
|
||||||
var windowWidth = window.innerWidth;
|
|
||||||
var html = document.documentElement;
|
|
||||||
var htmlWidth = html.getBoundingClientRect().width;
|
|
||||||
var scrollbarWidth = (windowWidth - htmlWidth) / 2;
|
|
||||||
var scrollbarOffset = scrollbarWidth / 2;
|
|
||||||
var isFF = /firefox/i.test(navigator.userAgent)
|
|
||||||
if (!isFF) {
|
|
||||||
html.style.setProperty('--scrollbar-offset', `${scrollbarOffset}px`);
|
|
||||||
html.style.setProperty('--scrollbar-offset-negative', `-${scrollbarOffset}px`);
|
|
||||||
}
|
|
||||||
} catch (error) {}
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user