Skip to content

Commit f4c4c7e

Browse files
committed
fix(core): hide scrollbar where required in FireFix
fixes #4189
1 parent 84eaf76 commit f4c4c7e

File tree

6 files changed

+27
-33
lines changed

6 files changed

+27
-33
lines changed

src/core/components/app/app.less

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,7 @@ body {
3636
font-size: var(--f7-font-size);
3737
line-height: var(--f7-line-height);
3838
color: var(--f7-text-color);
39-
&::-webkit-scrollbar {
40-
width: 0px;
41-
background: transparent;
42-
position: relative;
43-
}
44-
&::-webkit-scrollbar-track {
45-
box-shadow: none;
46-
background: transparent;
47-
}
48-
&::-webkit-scrollbar-thumb {
49-
background-color: transparent;
50-
outline: none;
51-
border-radius: 9999px;
52-
position: relative;
53-
}
39+
.no-scrollbar();
5440
}
5541
.dark body,
5642
body.dark {

src/core/components/breadcrumbs/breadcrumbs.less

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,7 @@
99
overflow: auto;
1010
white-space: nowrap;
1111
padding: var(--f7-breadcrumbs-padding);
12-
&::-webkit-scrollbar {
13-
display: none;
14-
opacity: 0;
15-
}
12+
.no-scrollbar();
1613
}
1714
.breadcrumbs-separator,
1815
.breadcrumbs-item,

src/core/components/picker/picker.less

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,7 @@
104104
height: 100%;
105105
box-sizing: border-box;
106106
padding: var(--f7-picker-scroll-padding, 0px) 0px;
107-
&::-webkit-scrollbar {
108-
display: none;
109-
opacity: 0;
110-
}
107+
.no-scrollbar();
111108
}
112109
.picker-item {
113110
height: var(--f7-picker-item-height);

src/core/components/text-editor/text-editor.less

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,7 @@ button.text-editor-button {
115115
justify-content: flex-start !important;
116116
overflow: auto;
117117
-webkit-overflow-scrolling: touch;
118-
&::-webkit-scrollbar {
119-
display: none;
120-
}
118+
.no-scrollbar();
121119
.text-editor-button-divider {
122120
height: 100%;
123121
}

src/core/components/toolbar/toolbar.less

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,7 @@
193193
.toolbar-inner {
194194
justify-content: flex-start;
195195
.scrollable();
196-
&::-webkit-scrollbar {
197-
display: none !important;
198-
width: 0 !important;
199-
height: 0 !important;
200-
-webkit-appearance: none;
201-
opacity: 0 !important;
202-
}
196+
.no-scrollbar();
203197
}
204198
.tab-link,
205199
.link {

src/core/less/mixins.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,3 +257,25 @@
257257
}
258258
}
259259
}
260+
261+
.no-scrollbar() {
262+
scrollbar-width: none;
263+
scrollbar-color: transparent;
264+
&::-webkit-scrollbar {
265+
appearance: none;
266+
width: 0px;
267+
display: none;
268+
opacity: 0;
269+
background: transparent;
270+
}
271+
&::-webkit-scrollbar-track {
272+
box-shadow: none;
273+
background: transparent;
274+
}
275+
&::-webkit-scrollbar-thumb {
276+
background-color: transparent;
277+
outline: none;
278+
border-radius: 9999px;
279+
position: relative;
280+
}
281+
}

0 commit comments

Comments
 (0)