xref: /webtrees/resources/css/_base.css (revision d4af4c00f9303b2272992f0660f29fb896e6792c)
1/**
2 * webtrees: online genealogy
3 * Copyright (C) 2020 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 * Common formatting for all themes.
18 */
19
20@import "_blocks.css";
21@import "_charts.css";
22@import "_colorbox.css";
23@import "_lists.css";
24@import "_markdown.css";
25@import "_mime-type-icons.css";
26@import "_on-screen-keyboard.css";
27@import "_pages.css";
28@import "_sortable.css";
29@import "_tab-relatives.css";
30
31/* Some icons need to be reversed on right-to-left pages */
32[dir=rtl] .wt-icon-flip-rtl,
33[dir=rtl] .wt-icon-flip-rtl svg
34{
35    transform: scale(-1, 1);
36}
37
38/* Bootstrap 4.5.1 toggle buttons don't work when labels have additional markup */
39[data-toggle=buttons] > label > .wt-icon-sex {
40    pointer-events: none;
41}
42
43/* Remove border-radius for left-to-right input groups on right-to-left pages */
44[dir=rtl] .input-group[dir=ltr] [dir=ltr] {
45    border-radius: 0;
46}
47
48/* rtl:ignore */
49td.align-digits,
50th.align-digits {
51    text-align: right;
52}
53
54/* Allows twitter typeahead to work with bootstrap input groups */
55.input-group > .twitter-typeahead {
56    flex: 1 1;
57}
58
59/* Allows select2 to work with bootstrap input groups */
60.input-group > .select2-container {
61    flex: 1 1;
62}
63
64/* Workaround for dropdown menu position on RTL with popper.js */
65/* See also https://github.com/FezVrasta/popper.js/issues/695 */
66[dir=rtl] .wt-genealogy-menu .dropdown-menu {
67    right: 0;
68    left: auto !important;
69}
70
71/*
72 * https://github.com/fisharebest/webtrees/issues/2291
73 * Chrome 72 has problems with all cards in the control panel.
74 * Chrome 73 has problems with the family-tree card in the control panel.
75 * Chrome 76 seems OK.
76 * https://github.com/fisharebest/webtrees/issues/2813
77 * Safari 13 has the same issue.
78 */
79.wt-control-panel .card {
80    display: block;
81}
82
83/*
84 * Flexbox fixes for IE11
85 */
86@media (-ms-high-contrast: active), (-ms-high-contrast: none) {
87    /* Move the body down below the mangled header */
88    div.wt-main-container {
89        padding-top: 4rem;
90    }
91}
92
93/* Keep the page as tall as the window, so the footer can remain at the bottom. */
94.wt-global {
95    display: flex;
96    min-height: 100vh;
97    flex-direction: column;
98}
99
100.wt-main-container {
101    flex: 1;
102}
103
104/* Scrollbars */
105.wt-global {
106    /* Prevent redraws when dynamic content requires a scrollbar. */
107    overflow-y: scroll;
108    /* Any wide content will have its own horizontal scrollbar */
109    overflow-x: hidden;
110}
111
112/* Browsers only understand US English */
113[lang=en-AU] q,
114[lang=en-GB] q {
115    quotes: "‘" "’" "“" "”";
116}
117
118/* Expand/collapse icons on accordions, etc. */
119[data-toggle=collapse][aria-expanded=true] > .wt-icon-expand {
120    display: none;
121}[data-toggle=collapse][aria-expanded=false] > .wt-icon-collapse {
122    display: none;
123}