Debian Codegraph @

pkg/networkmanager/networking.scss

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @use "ct-card";
3 @use "page";
4 @use "global-variables" as *;
5
6 #firewall,
7 #network-page {
8 .pf-v6-c-card {
9 @extend .ct-card;
10 }
11 }
12
13 #networking, #network-interface {
14 .pf-v6-l-gallery {
15 --pf-v6-l-gallery--GridTemplateColumns: 1fr;
16 }
17 }
18
19 // General networking page overview
20 .network-page {
21 .cockpit-log-panel {
22 max-inline-size: 100vw;
23 }
24 }
25
26 #network-interface {
27 @at-root {
28 .network-interface-status > span {
29 overflow-wrap: anywhere;
30 }
31 }
32 }
33
34 .network-number-field {
35 inline-size: 4em;
36 }
37
38 .network-graph {
39 block-size: 180px;
40 }
41
42 .pf-v6-c-page__main-breadcrumb + .networking-graphs {
43 // Remove the top padding when following a breadcrumb
44 padding-block-start: 0;
45 }
46
47 // Constrain widths of networking headers (on both the main page and in network-interface-members)
48 th {
49 &.networking-speed {
50 inline-size: 20%;
51 }
52
53 &.networking-spacer {
54 inline-size: var(--pf-t--global--spacer--4xl);
55 }
56
57 &.networking-action {
58 inline-size: var(--pf-t--global--spacer--3xl);
59 }
60 }
61
62 .network-interface-details {
63 &-title {
64 display: grid;
65 grid-auto-flow: column;
66 gap: var(--pf-t--global--spacer--md);
67 }
68
69 &-delete {
70 margin-inline-end: var(--pf-t--global--spacer--lg);
71 }
72
73 // Seems to be used for the "general" checkbox
74 .networking-controls {
75 label {
76 font-weight: inherit;
77 }
78
79 input {
80 margin-inline-start: 0;
81 }
82 }
83 }
84
85 #networking-interfaces, #networking-unmanaged-interfaces {
86 th > .pf-m-link {
87 // Preserve the same baseline as other elements, so items align
88 display: inline;
89 // Expand the link to the container, for easier clickability
90 inline-size: 100%;
91 }
92 }
93
94 .network-interface-members {
95 .pf-v6-c-switch {
96 margin-inline-end: var(--pf-t--global--spacer--md);
97 }
98
99 .pf-v6-c-table tbody > tr > * {
100 vertical-align: middle;
101 }
102
103 .btn-group {
104 padding-block: 0.5rem;
105 }
106 }
107
108 // If the button is not the first item in the DescriptionListDescription add left spacing
109 .network-interface-settings dd button:not(:first-child) {
110 margin-inline-start: var(--pf-t--global--spacer--sm);
111 }
112
113 // The modal body, by default, overflows to accommodate extra content. This is
114 // normally good. However, it also can trim things that flow outside, such as
115 // the focus ring of the MTU custom input. Since we know the modal won't have
116 // much vertical content, we can disable the overflow to let the focus ring be
117 // fully visible. (Otherwise the bottommost pixels are removed.)
118 #network-mtu-settings-dialog .pf-v6-c-modal-box__body {
119 overflow: visible;
120 }
121
122 // Use a grid to lay out elements. This could've been a flex, but a grid lets
123 // us size elements from the parent element instead of having to specify
124 // individual elements
125 #network-mtu-settings-custom + .pf-v6-c-radio__label {
126 display: grid;
127 grid-template-columns: 1fr auto;
128 align-items: baseline;
129 gap: var(--pf-t--global--spacer--md);
130 }
131
132 // Set the width of the input element; with a little extra space
133 .mtu-label-input > input {
134 inline-size: 7ch;
135 font-variant: tabular-nums;
136 }
137
138 // Temporary curtain to hide the content as it loads
139 #testing-connection-curtain {
140 z-index: 2000;
141 }
142
143 .pf-v6-l-flex > .network-ip-settings-method {
144 inline-size: 12rem;
145 }
146
147 #network-ip-settings-body {
148 .pf-v6-c-form__label {
149 // Don't allow labels to wrap
150 white-space: nowrap;
151 }
152
153 .remove-button-group {
154 // Move 'Remove' button the the end of the row
155 grid-column: -1;
156 // Move 'Remove' button to the bottom of the line so as to align with the other form fields
157 display: flex;
158 flex-direction: row;
159 align-items: flex-end;
160
161 button {
162 margin: var(--pf-t--global--spacer--xs);
163 }
164 }
165 }
166
167 // use same spacing as spacing between card title and switch
168 #networking-firewall-summary .pf-v6-c-switch {
169 --pf-v6-c-switch--ColumnGap: var(--pf-t--global--spacer--md);
170 }
171
172 /********** Firewall section **********/
173
174 #add-services-dialog {
175 .service-list {
176 border: 1px solid var(--pf-v6-c-data-list--BorderBlockStartColor);
177 border-radius: var(--pf-t--global--border--radius--small);
178 block-size: 30rem;
179 // full height minus UI, for mobile and small desktops
180 max-block-size: calc(100vh - 20rem);
181 overflow-y: auto;
182 }
183
184 .service-list-item-heading {
185 font-size: 1.2em;
186 margin: 0;
187 }
188
189 .service-list-item-text {
190 display: flex;
191 flex-wrap: wrap;
192 }
193
194 .service-ports {
195 opacity: 0.75;
196
197 &:first-of-type {
198 margin-inline-end: 1em;
199 }
200 }
201
202 .add-services-dialog-type {
203 display: flex;
204 }
205
206 .has-error {
207 animation: 300ms error-slide-down ease-in-out;
208 color: #c00;
209 padding: 0;
210
211 &:empty {
212 display: none;
213 }
214 }
215 }
216
217 #firewall {
218 block-size: 100%;
219
220 .ct-table tbody tr:first-of-type td:nth-child(2) {
221 font-weight: var(--pf-t--global--font--weight--body--bold);
222 }
223 }
224
225 @media screen and (max-width: $pf-v6-global--breakpoint--md) {
226 .zone-section-heading.pf-v6-c-card__header {
227 padding-inline-start: var(--pf-v6-global--spacer--md);
228 }
229 }
230
231 #delete-confirmation-dialog {
232 .delete-confirmation-body {
233 display: flex;
234 }
235 }
236
237 #add-zone-dialog legend {
238 color: var(--ct-color-subtle-copy);
239 font-size: var(--pf-t--global--font--size--sm);
240 }
241
242 .add-zone-zones legend {
243 line-height: 3;
244 }
245
246 #add-zone-dialog .add-zone-zones .pf-v6-c-radio__label {
247 text-transform: capitalize;
248 }
249
250 /* Move firewalld zones higher in z-index (so lines can go behind) */
251 .add-zone-zones-firewalld {
252 input {
253 position: relative;
254 z-index: 2;
255 }
256
257 > label {
258 /* FIXME: Add lines behind the radio buttons */
259 &::after {
260 border-block-end: 1px solid #d1d1d1;
261 content: "";
262 }
263
264 /* Start line at the midpoint for the first radio */
265 &:first-of-type::after {
266 inset-inline-start: 50%;
267 }
268
269 /* End line at the midpoint for the last radio */
270 &:last-of-type::after {
271 inset-inline-end: 50%;
272 }
273 }
274 }
275
276 /* Display labels below buttons */
277 .add-zone-zones-firewalld, .add-zone-zones-custom {
278 > label.radio {
279 display: inline-flex;
280 }
281 }
282
283 #add-zone-description-readonly {
284 padding-block: 0.5rem 0;
285 padding-inline: 0;
286 color: var(--ct-color-subtle-copy);
287 }
288
289 #add-zone-services-readonly legend {
290 padding: 0;
291 line-height: 1;
292 }
293
294 // Animation for Firewall's add service dialog,
295 // as a sudden transition would be (otherwise) too jarring
296 @keyframes error-slide-down {
297 0% {
298 line-height: 0;
299 block-size: 0;
300 opacity: 0;
301 overflow: hidden;
302 }
303
304 100% {
305 line-height: inherit;
306 block-size: auto;
307 opacity: 1;
308 }
309 }
310
311 // Remove the default top padding from the toolbar
312 .filter-services-toolbar {
313 padding-block-start: 0;
314 }
315
316 // HACK: MenuToggle has inline-block by default which makes it not appear under
317 // the entry above
318 @media screen and (max-width: $pf-v6-global--breakpoint--sm) {
319 .pf-v6-c-table__td .pf-v6-c-menu-toggle.pf-m-plain {
320 display: inline-flex;
321 align-items: flex-start;
322 }
323 }
324
325 /* End Firewall specific CSS */