xref: /webtrees/resources/css/_base.css (revision 9b152ff9230017d2c03aa1bf603a98b18250446d)
1/**
2 * webtrees: online genealogy
3 * Copyright (C) 2019 webtrees development team
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 */
15
16/*
17 * Base formatting, resets, workarounds, etc.
18 */
19
20/* Some icons need to be reversed on right-to-left pages */
21[dir=rtl] .wt-icon-flip-rtl {
22    transform: scale(-1, 1);
23}
24
25/* Remove border-radius for left-to-right input groups on right-to-left pages */
26[dir=rtl] .input-group[dir=ltr] [dir=ltr] {
27    border-radius: 0;
28}
29
30/* rtl:ignore */
31.align-digits {
32    text-align: right;
33}
34
35/* Allows twitter typeahead to work with bootstrap input groups */
36.input-group > .twitter-typeahead {
37    flex: 1 1;
38}
39
40/* Allows select2 to work with bootstrap input groups */
41.input-group > .select2-container {
42    flex: 1 1;
43}
44
45/* Workaround for dropdown menu position on RTL with popper.js */
46/* See also https://github.com/FezVrasta/popper.js/issues/695 */
47[dir=rtl] .wt-genealogy-menu .dropdown-menu {
48    right: 0;
49    left: auto !important;
50}
51
52/*
53 * https://github.com/fisharebest/webtrees/issues/2291
54 * Chrome 72 has problems with all cards in the control panel.
55 * Chrome 73 has problems with the family-tree card in the control panel.
56 * Chrome 76 seems OK.
57 * https://github.com/fisharebest/webtrees/issues/2813
58 * Safari 13 has the same issue.
59 */
60.wt-control-panel .card {
61    display: block;
62}
63
64/*
65 * Flexbox fixes for IE11
66 */
67@media (-ms-high-contrast: active), (-ms-high-contrast: none) {
68    /* Move the body down below the mangled header */
69    div.wt-main-container {
70        padding-top: 4rem;
71    }
72}
73
74/* Keep the page as tall as the window, so the footer can remain at the bottom. */
75.wt-global {
76    display: flex;
77    min-height: 100vh;
78    flex-direction: column;
79}
80
81.wt-main-container {
82    flex: 1;
83}
84
85/* Scrollbars */
86.wt-global {
87    /* Prevent redraws when dynamic content requires a scrollbar. */
88    overflow-y: scroll;
89    /* Any wide content will have its own horizontal scrollbar */
90    overflow-x: hidden;
91}
92