1
|
/**
|
2
|
* This file is part of Haketilo.
|
3
|
*
|
4
|
* Function: Hacky fix for vertical scrollbar width being included in child's
|
5
|
* width.
|
6
|
*
|
7
|
* Copyright (C) 2021 Wojtek Kosior
|
8
|
* Redistribution terms are gathered in the `copyright' file.
|
9
|
*/
|
10
|
|
11
|
/*
|
12
|
* Under Mozilla browsers to avoid vertical scrollbar forcing horizontal
|
13
|
* scrollbar to appear in an element we add the `firefox_scrollbars_hacky_fix'
|
14
|
* class to an element for which width has to be reserved.
|
15
|
*
|
16
|
* This is a bit hacky and relies on some assumed width of Firefox scrollbar, I
|
17
|
* know. And must be excluded from Chromium builds.
|
18
|
*
|
19
|
* I came up with this hack when working on popup. Before that I had the
|
20
|
* scrollbar issue with tables in the options page and gave up there and made
|
21
|
* the scrollbal always visible. Now we could try applying this "fix" there,
|
22
|
* too!
|
23
|
*/
|
24
|
|
25
|
.firefox_scrollbars_hacky_fix {
|
26
|
font-size: 0;
|
27
|
}
|
28
|
|
29
|
.firefox_scrollbars_hacky_fix>div {
|
30
|
display: inline-block;
|
31
|
width: -moz-available;
|
32
|
}
|
33
|
|
34
|
.firefox_scrollbars_hacky_fix>*>* {
|
35
|
font-size: initial;
|
36
|
}
|
37
|
|
38
|
.firefox_scrollbars_hacky_fix::after {
|
39
|
content: "";
|
40
|
display: inline-block;
|
41
|
visibility: hidden;
|
42
|
font-size: initial;
|
43
|
width: 14px;
|
44
|
}
|
45
|
|
46
|
.firefox_scrollbars_hacky_fix.has_inline_content::after {
|
47
|
width: calc(14px - 0.3em);
|
48
|
}
|