Debian Codegraph @

pkg/shell/shell.scss

raw
1 /*
2 * Copyright (C) 2013 Red Hat, Inc.
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
6 /* ---------------------------------------------------------------------------------------------------- */
7
8 @use "page";
9 @use "table";
10 @use "nav";
11 @use "@patternfly/patternfly/components/Menu/menu.css";
12 @use "@patternfly/patternfly/utilities/Text/text.css";
13 @use "@patternfly/patternfly/components/Icon/icon.css";
14
15 :root {
16 --ct-color-host-accent: var(--pf-t--global--color--brand--default);
17 --ct-topnav-background: var(--pf-t--global--background--color--secondary--default);
18 }
19
20 #shell {
21 block-size: 100%;
22 }
23
24 /* Hacks on top for now */
25
26 html.index-page body {
27 overflow: hidden;
28 }
29
30 #machine-change-auth > p {
31 margin-block-end: 5px;
32 }
33
34 // Fix fingerprint layout
35 .add-host-fingerprint {
36 margin-block-start: var(--pf-t--global--spacer--md);
37
38 td {
39 padding: 0;
40 line-height: inherit;
41 block-size: auto;
42 vertical-align: middle !important;
43
44 &:first-child {
45 padding-inline-end: var(--pf-t--global--spacer--md);
46 }
47 }
48 }
49
50 .machine-key {
51 margin: 0;
52 white-space: pre-line;
53 padding-block: var(--pf-t--global--spacer--xs);
54 padding-inline: var(--pf-t--global--spacer--sm);
55 }
56
57 .login-setup-checkbox-wrapper {
58 // Use a flex layout to better vertically align the contents to the grid
59 display: flex;
60 }
61
62 #edit-machine-port {
63 inline-size: 100px;
64 }
65
66 #connecting {
67 block-size: 100%;
68 background-color: var(--ct-global--palette--black-250);
69 text-align: center;
70 padding-block-start: 120px;
71 }
72
73 /* System information */
74
75 #systime-date-input,
76 #systime-time-hours,
77 #systime-time-minutes {
78 display: inline;
79 }
80
81 /* index page */
82
83 .display-language-modal {
84 /* Do not let the language menu expand to the end of the page */
85 .pf-v6-c-menu__content {
86 max-block-size: 20rem;
87 overflow: auto;
88 }
89 }
90
91 iframe.container-frame {
92 border: none;
93 inline-size: 100%;
94 }
95
96 // Page layout
97
98 $phone: 767px;
99 $desktop: $phone + 1px;
100
101 .page {
102 --nav-width: 15rem;
103 display: grid;
104 inline-size: 100%;
105 block-size: 100%;
106
107 // Set masthead and toolbar to transparent, so the background shows through
108 // (including the accent line)
109
110 .pf-v6-c-masthead {
111 --pf-v6-c-masthead--BackgroundColor: transparent;
112 }
113
114 .pf-v6-c-toolbar {
115 --pf-v6-c-toolbar--BackgroundColor: transparent;
116 }
117
118 @media (max-width: $phone) {
119 grid-template-areas: "main main main" "sidebar switcher header";
120 grid-template-rows: 1fr 4rem;
121 grid-template-columns: 1fr auto auto;
122 overflow: hidden;
123
124 .area-ct-subnav {
125 grid-area: main;
126 }
127
128 .sidebar-toggle {
129 grid-area: sidebar;
130 display: flex;
131 }
132
133 > .header,
134 > .navbar,
135 > .sidebar-toggle {
136 // Line on bottom, Base color (with subtle glow)
137 background: linear-gradient(
138 to top,
139 var(--ct-color-host-accent),
140 var(--ct-color-host-accent) 3px,
141 transparent 3px
142 );
143 /* Toolbar needs visual separation between it and the content */
144 border-block-start: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--default);
145 }
146
147 // Remove excess padding from masthead in mobile
148 .pf-v6-c-masthead {
149 --pf-v6-c-masthead--inset: 0;
150 --pf-v6-c-masthead--PaddingBlock: 0;
151 --pf-v6-c-masthead--PaddingInline: 0;
152 block-size: 100%;
153 }
154 }
155
156 @media (min-width: $desktop) {
157 // Shadow to the left, Line on top, Base color (with subtle glow)
158 background: linear-gradient(
159 to bottom,
160 var(--ct-color-host-accent),
161 var(--ct-color-host-accent) 3px,
162 transparent 3px
163 );
164
165 grid-template-areas: "switcher switcher header" "sidebar main main";
166 grid-template-rows: max-content 1fr;
167 grid-template-columns: minmax(min-content, var(--nav-width)) auto 1fr;
168
169 > .navbar {
170 grid-area: switcher;
171 margin-inline-end: calc(-1 * var(--pf-t--global--spacer--sm));
172 }
173
174 .sidebar {
175 grid-area: sidebar;
176 }
177
178 .sidebar-toggle {
179 grid-area: none;
180 display: none;
181 }
182
183 .view-hosts .sidebar-hosts,
184 .nav-system-menu {
185 /* Top of the navbar should start when the curve of the content area ends. This means the search entry should be bumped down a bit. */
186 padding-block-start: var(--pf-t--global--spacer--md);
187 }
188 }
189
190 // Shrink nav for VMs @ 1024×768 (and below)
191 @media (max-width: 1024px) and (max-height: 768px) and (orientation: landscape) {
192 --nav-width: 14rem;
193 }
194
195 .area-ct-content {
196 grid-area: main;
197 }
198
199 .header {
200 grid-area: header;
201 }
202 }
203
204 .hostkey-type {
205 font-size: small;
206 }
207
208 .hostkey-verify-help {
209 margin-block-end: 1.5em;
210 }
211
212 /* Alert fixups */
213 .modal-content .pf-v6-c-alert {
214 text-align: start;
215 margin-block-end: 24px;
216 }
217
218 .early-failure {
219 block-size: 100%;
220 }
221
222 // Customize the about screen with the Cockpit logo
223 .pf-v6-c-about-modal-box {
224 // Gray is best as it works in both light and dark mode
225 // Ideally About modal should allow setting this through DOM instead of CSS
226 // so we can color it easier.
227 //
228 // Or we can see about modifying it inline in scss and changing color there somehow
229 --pf-v6-c-about-modal-box--BackgroundImage: url(../shell/images/cockpit-icon-gray.svg);
230 --pf-v6-c-about-modal-box--BackgroundPosition: max(25rem, 143%) 10rem;
231 --pf-v6-c-about-modal-box--BackgroundSize--min-width: 786px;
232
233 .pf-v6-c-content {
234 /* Don't wrap package names */
235 --pf-v6-c-content--dl--GridTemplateColumns--dt: auto;
236 /* Tidy up the vertical space usage between packages */
237 --pf-v6-c-content--dl--RowGap: var(--pf-t--global--spacer--sm);
238 }
239
240 [dir="rtl"] {
241 --pf-v6-c-about-modal-box--BackgroundPosition: calc(100% - 30rem) 10rem;
242 }
243 }