xref: /webtrees/resources/css/_base.css (revision 7203856a81f8be495bda04aa46fc90f386066a40)
1e759aebbSGreg Roach/**
2e759aebbSGreg Roach * webtrees: online genealogy
3d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
4e759aebbSGreg Roach * This program is free software: you can redistribute it and/or modify
5e759aebbSGreg Roach * it under the terms of the GNU General Public License as published by
6e759aebbSGreg Roach * the Free Software Foundation, either version 3 of the License, or
7e759aebbSGreg Roach * (at your option) any later version.
8e759aebbSGreg Roach * This program is distributed in the hope that it will be useful,
9e759aebbSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
10e759aebbSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11e759aebbSGreg Roach * GNU General Public License for more details.
12e759aebbSGreg Roach * You should have received a copy of the GNU General Public License
13e759aebbSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
14e759aebbSGreg Roach */
15e759aebbSGreg Roach
16e759aebbSGreg Roach/*
1792044e0dSGreg Roach * Common formatting for all themes.
18e759aebbSGreg Roach */
19e759aebbSGreg Roach
200dac5065SGreg Roach@import "_blocks.css";
2192044e0dSGreg Roach@import "_charts.css";
2292044e0dSGreg Roach@import "_colorbox.css";
2392044e0dSGreg Roach@import "_lists.css";
241db5ed46SGreg Roach@import "_markdown.css";
2575f2a483SDavid Drury@import "_maps.css";
2692044e0dSGreg Roach@import "_mime-type-icons.css";
2792044e0dSGreg Roach@import "_on-screen-keyboard.css";
280dac5065SGreg Roach@import "_pages.css";
2992044e0dSGreg Roach@import "_sortable.css";
30dcafe132SGreg Roach@import "_tab-album.css";
3192044e0dSGreg Roach@import "_tab-relatives.css";
3292044e0dSGreg Roach
33d274c9ecSGreg Roach/* Some icons need to be reversed on right-to-left pages */
34acb814cdSGreg Roach/* rtl:ignore */
352f955fcfSGreg Roach[dir=rtl] .wt-icon-flip-rtl
3643e8a0e6SGreg Roach{
37d274c9ecSGreg Roach    transform: scale(-1, 1);
38d274c9ecSGreg Roach}
39d274c9ecSGreg Roach
40dbffae50SGreg Roach/* rtl:ignore */
41e72c24d6SGreg Roachtd.align-digits,
42e72c24d6SGreg Roachth.align-digits {
43dbffae50SGreg Roach    text-align: right;
44dbffae50SGreg Roach}
45dbffae50SGreg Roach
46e759aebbSGreg Roach/* Keep the page as tall as the window, so the footer can remain at the bottom. */
47e4070534SGreg Roachbody {
48e759aebbSGreg Roach    display: flex;
49e759aebbSGreg Roach    min-height: 100vh;
50e759aebbSGreg Roach    flex-direction: column;
51e759aebbSGreg Roach}
52e759aebbSGreg Roach
53e4070534SGreg Roachmain {
54e759aebbSGreg Roach    flex: 1;
55e759aebbSGreg Roach}
56e759aebbSGreg Roach
57315eb316SGreg Roach/* Bootstrap 5 underlines links by default */
58315eb316SGreg Roacha {
59315eb316SGreg Roach    text-decoration: none;
60315eb316SGreg Roach}
61315eb316SGreg Roach
62315eb316SGreg Roacha:hover {
63315eb316SGreg Roach    text-decoration: underline;
64315eb316SGreg Roach}
65315eb316SGreg Roach
66e759aebbSGreg Roach/* Scrollbars */
67e759aebbSGreg Roach.wt-global {
68e759aebbSGreg Roach    /* Prevent redraws when dynamic content requires a scrollbar. */
69e759aebbSGreg Roach    overflow-y: scroll;
70e759aebbSGreg Roach    /* Any wide content will have its own horizontal scrollbar */
71e759aebbSGreg Roach    overflow-x: hidden;
72e759aebbSGreg Roach}
73c652cdbdSGreg Roach
74c652cdbdSGreg Roach/* Browsers only understand US English */
75c652cdbdSGreg Roach[lang=en-AU] q,
76c652cdbdSGreg Roach[lang=en-GB] q {
77c652cdbdSGreg Roach    quotes: "‘" "’" "“" "”";
78c652cdbdSGreg Roach}
79c15fb5e7SGreg Roach
80c15fb5e7SGreg Roach/* Expand/collapse icons on accordions, etc. */
81315eb316SGreg Roach[data-bs-toggle=collapse][aria-expanded=true] > .wt-icon-expand {
82c15fb5e7SGreg Roach    display: none;
83315eb316SGreg Roach}[data-bs-toggle=collapse][aria-expanded=false] > .wt-icon-collapse {
84c15fb5e7SGreg Roach    display: none;
85c15fb5e7SGreg Roach}
867a821518SGreg Roach
87290bb197SJonathan Jaubart/* Accordions */
88290bb197SJonathan Jaubart.accordion-button,
89290bb197SJonathan Jaubart.accordion-button:not(.collapsed) {
90290bb197SJonathan Jaubart    background-color: rgba(0,0,0,.03);
91290bb197SJonathan Jaubart    color: currentcolor;
92290bb197SJonathan Jaubart}
93290bb197SJonathan Jaubart
94290bb197SJonathan Jaubart.accordion-button:after {
95290bb197SJonathan Jaubart    display: none;
96290bb197SJonathan Jaubart}
97290bb197SJonathan Jaubart
987a821518SGreg Roach/* Link styling */
997a821518SGreg Roacha, .btn-link, .nav-link {
1007a821518SGreg Roach    color: var(--link-color);
1017a821518SGreg Roach    text-decoration: var(--link-decoration);
1027a821518SGreg Roach}
1037a821518SGreg Roach
1047a821518SGreg Roacha:hover, .btn-link:hover, .nav-link:hover {
1057a821518SGreg Roach    color: var(--link-color-hover);
1067a821518SGreg Roach    text-decoration: var(--link-decoration-hover);
1077a821518SGreg Roach}
108efed5476SGreg Roach
109c1502d3dSGreg Roach/* Some menus (e.g. languages) can be longer than a page */
110c1502d3dSGreg Roach.dropdown-menu {
111c1502d3dSGreg Roach    max-height: 90vh;
112c1502d3dSGreg Roach    overflow-x: hidden;
113be40a005SGreg Roach    scrollbar-gutter: stable;
114c1502d3dSGreg Roach}
115c1502d3dSGreg Roach
116efed5476SGreg Roach/* User-generated text */
117efed5476SGreg Roach.ut {
118efed5476SGreg Roach    /* RTL text on LTR pages (or vice-versa) */
119efed5476SGreg Roach    unicode-bidi: isolate;
120efed5476SGreg Roach
121efed5476SGreg Roach    /* Long words without spaces can break the page layout */
122de736bf7SGreg Roach    overflow-wrap: break-word;
123efed5476SGreg Roach}
124561ec906SGreg Roach
125561ec906SGreg Roach.wt-nested-edit-fields {
126561ec906SGreg Roach    padding-left: 1rem;
127561ec906SGreg Roach    margin-left: 1rem;
128561ec906SGreg Roach    border-left: solid 4px grey;
129561ec906SGreg Roach}
1302de327daSGreg Roach
1312de327daSGreg Roach.wt-text-overflow-elipsis {
1322de327daSGreg Roach    white-space: nowrap;
1332de327daSGreg Roach    overflow: hidden;
1342de327daSGreg Roach    text-overflow: ellipsis;
1352de327daSGreg Roach}
13655ea0389SGreg Roach
13755ea0389SGreg Roach/* Enter/exit fullscreen mode */
13855ea0389SGreg Roach.wt-icon-exit-fullscreen {
13955ea0389SGreg Roach    display: none;
14055ea0389SGreg Roach}
14155ea0389SGreg Roach.wt-icon-enter-fullscreen {
14255ea0389SGreg Roach    display: inline;
14355ea0389SGreg Roach}
14455ea0389SGreg Roach:fullscreen .wt-icon-exit-fullscreen {
14555ea0389SGreg Roach    display: inline;
14655ea0389SGreg Roach}
14755ea0389SGreg Roach:fullscreen .wt-icon-enter-fullscreen {
14855ea0389SGreg Roach    display: none;
14955ea0389SGreg Roach}
150*7203856aSGreg Roach
151*7203856aSGreg Roach/* Leaflet sets this to 1000, which conflicts with bootstrap dropdowns */
152*7203856aSGreg Roach.leaflet-bottom, .leaflet-top {
153*7203856aSGreg Roach    z-index: 999;
154*7203856aSGreg Roach}
155