Debian Codegraph @

pkg/systemd/overview.scss

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @use "./system-global.scss";
3 /* System Time Modal dialog needs table.css */
4 @use "../lib/table.css" as *;
5 @use "global-variables" as *;
6 @use "@patternfly/patternfly/components/Table/table.scss";
7
8 .ct-limited-access-alert {
9 --pf-v6-c-alert--GridTemplateAreas: "icon title action" ". description description";
10
11 // Deconstruct nicely on small screen sizes (especially mobile)
12 // This will not be needed in a future PF4 update
13 //
14 // References:
15 // - https://github.com/cockpit-project/cockpit/issues/14106
16 // - https://github.com/patternfly/patternfly/issues/3125
17 // - https://github.com/patternfly/patternfly/pull/2921
18 //
19 // When we have the upcoming version of PF4 in Cockpit, we should drop this code
20 // (and adjust things for the button to show up on the side of desktop mode instead)
21 @media (max-width: $pf-v6-global--breakpoint--md) {
22 --pf-v6-c-alert--GridTemplateAreas: "icon title" ". description" ". action";
23 --pf-v6-c-alert__action--MarginBlockStart: 0;
24 }
25
26 @media (max-width: 320px) {
27 // Allow the action button to have a bit more space on iPhone SE sized phones
28 --pf-v6-c-alert--GridTemplateAreas: "icon title" "description description" "action action";
29 --pf-v6-c-alert__action--MarginBlockStart: 0;
30 }
31 }
32
33 .ct-overview-header {
34 flex-direction: row;
35
36 &,
37 &-hostname {
38 flex-wrap: wrap;
39 }
40
41 &-actions,
42 &-hostname {
43 box-sizing: border-box;
44 display: flex;
45 }
46
47 &-hostname {
48 align-items: baseline;
49 flex: auto;
50
51 > h1 {
52 font-size: var(--pf-t--global--font--size--2xl) !important;
53 }
54 }
55
56 &-hostname > h1,
57 &-subheading {
58 padding-inline-end: 1rem;
59 }
60
61 &-actions {
62 align-items: center;
63 }
64
65 &-subheading {
66 font-size: var(--pf-t--global--font--size--md);
67 }
68 }
69
70 .pf-v6-l-gallery.ct-system-overview {
71 --cards: 2;
72 --pf-v6-l-gallery--GridTemplateColumns: repeat(var(--cards), 1fr);
73
74 // Small mobile: Reduce spacing
75 @media (max-width: 320px) {
76 --pf-v6-l-gallery--m-gutter--GridGap: 0.25rem;
77 }
78
79 // Mobile: reduce to 1 card wide and minimize spacing
80 @media (max-width: 680px) {
81 --pf-v6-l-gallery--m-gutter--GridGap: var(--pf-t--global--spacer--sm);
82 --cards: 1;
83 }
84
85 // Large desktop: Jump up to 4 cards wide
86 @media (min-width: 1400px) {
87 --cards: 4;
88 }
89
90 // Extra large desktop: Let cards align to the left at an optimal size
91 @media (min-width: 114rem) {
92 --pf-v6-l-gallery--GridTemplateColumns: repeat(auto-fill, minmax(min-content, 26rem));
93 }
94
95 // VMs @ 1024x768; add a little leeway For titlebars, start bar, etc.
96 @media (orientation: landscape) and (min-width: 684px) and (max-width: 832px) and (max-height: 703px) {
97 --pf-v6-l-gallery--m-gutter--GridGap: var(--pf-t--global--spacer--sm);
98
99 // Also skim off some vertical space for the cards
100 .pf-v6-c-card {
101 --pf-v6-c-card--first-child--PaddingTop: var(--pf-t--global--spacer--md);
102 --pf-v6-c-card--child--PaddingRight: var(--pf-t--global--spacer--md);
103 }
104 }
105
106 .motd-box {
107 grid-column: 1 / -1;
108 }
109
110 .pf-v6-c-card {
111 &__title-text {
112 font-size: var(--pf-t--global--font--size--xl);
113 font-weight: var(--pf-t--global--font--weight--body);
114 }
115
116 &__body {
117 &:last-child .pf-v6-c-table:last-child tr:last-child {
118 /* Remove the border of tables when it's the last item in a card and there isn't a card footer */
119 border-block-end: none;
120 }
121
122 p {
123 + p,
124 + button {
125 margin-block-start: calc(var(--pf-t--global--font--line-height--body) * 1rem);
126 }
127 }
128
129 td {
130 vertical-align: middle;
131 }
132
133 th {
134 font-size: var(--pf-t--global--font--size--sm);
135 }
136 }
137 }
138
139 .pf-v6-c-progress {
140 &__status {
141 display: flex;
142 align-items: baseline;
143
144 &-icon {
145 display: flex;
146 align-self: center;
147 }
148 }
149 }
150
151 .pf-m-compact {
152 th, td {
153 &:first-child {
154 :not([dir="rtl"]) & {
155 padding-inline-start: 0;
156 }
157
158 [dir="rtl"] & {
159 padding-inline-end: 0;
160 }
161 }
162
163 &:last-child {
164 :not([dir="rtl"]) & {
165 padding-inline-end: 0;
166 }
167
168 [dir="rtl"] & {
169 padding-inline-start: 0;
170 }
171 }
172 }
173 }
174 }
175
176 @media (max-width: 779px) {
177 /* Reduce gutter & padding on smaller widths, for desktop & mobile */
178
179 .pf-v6-l-gallery.ct-system-overview {
180 --pf-v6-l-gallery--m-gutter--GridGap: calc(var(--pf-t--global--spacer--md)/2);
181 }
182
183 .pf-v6-c-card {
184 --pf-v6-c-card--first-child--PaddingTop: var(--pf-t--global--spacer--md);
185 --pf-v6-c-card--child--PaddingRight: var(--pf-t--global--spacer--md);
186 --pf-v6-c-card--child--PaddingBottom: var(--pf-t--global--spacer--md);
187 --pf-v6-c-card--child--PaddingLeft: var(--pf-t--global--spacer--md);
188 --pf-v6-c-card__title--not-last-child--PaddingBottom: var(--pf-t--global--spacer--sm);
189 }
190 }
191
192 @media (min-width: 780px) {
193 /* Embiggen subheading & card headings when there's space */
194
195 .pf-v6-l-gallery.ct-system-overview .pf-v6-c-card__title-text {
196 font-size: var(--pf-t--global--font--size--2xl);
197 }
198 }