* Copyright (C) 2013 Red Hat, Inc.
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
@use "page";
@use "table";
@use "nav";
@use "@patternfly/patternfly/components/Menu/menu.css";
@use "@patternfly/patternfly/utilities/Text/text.css";
@use "@patternfly/patternfly/components/Icon/icon.css";
:root {
--ct-color-host-accent: var(--pf-t--global--color--brand--default);
--ct-topnav-background: var(--pf-t--global--background--color--secondary--default);
}
#shell {
block-size: 100%;
}
html.index-page body {
overflow: hidden;
}
#edit-machine-port {
inline-size: 100px;
}
#connecting {
block-size: 100%;
background-color: var(--ct-global--palette--black-250);
text-align: center;
padding-block-start: 120px;
}
.display-language-modal {
.pf-v6-c-menu__content {
max-block-size: 20rem;
overflow: auto;
}
}
iframe.container-frame {
border: none;
inline-size: 100%;
}
// Page layout
$phone: 767px;
$desktop: $phone + 1px;
.page {
--nav-width: 15rem;
display: grid;
inline-size: 100%;
block-size: 100%;
// Set masthead and toolbar to transparent, so the background shows through
// (including the accent line)
.pf-v6-c-masthead {
--pf-v6-c-masthead--BackgroundColor: transparent;
}
.pf-v6-c-toolbar {
--pf-v6-c-toolbar--BackgroundColor: transparent;
}
@media (max-width: $phone) {
grid-template-areas: "main main main" "sidebar switcher header";
grid-template-rows: 1fr 4rem;
grid-template-columns: 1fr auto auto;
overflow: hidden;
.area-ct-subnav {
grid-area: main;
}
.sidebar-toggle {
grid-area: sidebar;
display: flex;
}
> .header,
> .navbar,
> .sidebar-toggle {
// Line on bottom, Base color (with subtle glow)
background: linear-gradient(
to top,
var(--ct-color-host-accent),
var(--ct-color-host-accent) 3px,
transparent 3px
);
border-block-start: var(--pf-t--global--border--width--regular) solid var(--pf-t--global--border--color--default);
}
// Remove excess padding from masthead in mobile
.pf-v6-c-masthead {
--pf-v6-c-masthead--inset: 0;
--pf-v6-c-masthead--PaddingBlock: 0;
--pf-v6-c-masthead--PaddingInline: 0;
block-size: 100%;
}
}
@media (min-width: $desktop) {
// Shadow to the left, Line on top, Base color (with subtle glow)
background: linear-gradient(
to bottom,
var(--ct-color-host-accent),
var(--ct-color-host-accent) 3px,
transparent 3px
);
grid-template-areas: "switcher switcher header" "sidebar main main";
grid-template-rows: max-content 1fr;
grid-template-columns: minmax(min-content, var(--nav-width)) auto 1fr;
> .navbar {
grid-area: switcher;
margin-inline-end: calc(-1 * var(--pf-t--global--spacer--sm));
}
.sidebar {
grid-area: sidebar;
}
.sidebar-toggle {
grid-area: none;
display: none;
}
.view-hosts .sidebar-hosts,
.nav-system-menu {
padding-block-start: var(--pf-t--global--spacer--md);
}
}
// Shrink nav for VMs @ 1024×768 (and below)
@media (max-width: 1024px) and (max-height: 768px) and (orientation: landscape) {
--nav-width: 14rem;
}
.area-ct-content {
grid-area: main;
}
.header {
grid-area: header;
}
}
.hostkey-type {
font-size: small;
}
.hostkey-verify-help {
margin-block-end: 1.5em;
}
.early-failure {
block-size: 100%;
}
// Customize the about screen with the Cockpit logo
.pf-v6-c-about-modal-box {
// Gray is best as it works in both light and dark mode
// Ideally About modal should allow setting this through DOM instead of CSS
// so we can color it easier.
//
// Or we can see about modifying it inline in scss and changing color there somehow
--pf-v6-c-about-modal-box--BackgroundImage: url(../shell/images/cockpit-icon-gray.svg);
--pf-v6-c-about-modal-box--BackgroundPosition: max(25rem, 143%) 10rem;
--pf-v6-c-about-modal-box--BackgroundSize--min-width: 786px;
.pf-v6-c-content {
--pf-v6-c-content--dl--GridTemplateColumns--dt: auto;
--pf-v6-c-content--dl--RowGap: var(--pf-t--global--spacer--sm);
}
[dir="rtl"] {
--pf-v6-c-about-modal-box--BackgroundPosition: calc(100% - 30rem) 10rem;
}
}