| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
@use "../global-variables" as *; |
| 4 |
|
| 5 |
/* |
| 6 |
* Mixins for Cockpit pages embedded in Anaconda (iframe). |
| 7 |
* Each page's *-anaconda.scss should @include these under its own root selector(s). |
| 8 |
*/ |
| 9 |
|
| 10 |
@mixin embedded-page-shell { |
| 11 |
.pf-v6-c-page__main-container { |
| 12 |
border-radius: 0; |
| 13 |
margin: 0; |
| 14 |
border: 0; |
| 15 |
max-block-size: 100%; |
| 16 |
} |
| 17 |
|
| 18 |
// ignore cockpit override for mobile layout |
| 19 |
@media screen and (max-width: $pf-v6-global--breakpoint--md) { |
| 20 |
.pf-v6-c-page__main > section.pf-v6-c-page__main-section:not(.pf-m-padding) { |
| 21 |
padding-inline: 0; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
.pf-v6-c-page__main { |
| 26 |
padding-inline: var(--pf-t--global--spacer--gap--group-to-group--vertical--default); |
| 27 |
} |
| 28 |
|
| 29 |
.pf-v6-c-page { |
| 30 |
--pf-v6-c-page--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 31 |
} |
| 32 |
|
| 33 |
.pf-v6-c-card { |
| 34 |
--pf-v6-c-card--BorderColor: transparent; |
| 35 |
} |
| 36 |
|
| 37 |
// Approximates PageSection padding={{ default: "noPadding" }} isFilled={false} (PF .pf-m-no-padding / .pf-m-no-fill) |
| 38 |
.pf-v6-c-page__main-section { |
| 39 |
flex-grow: 0; |
| 40 |
padding: 0; |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
// Emit at stylesheet root (once per bundle that needs it). |
| 45 |
@mixin anaconda-body-overflow-hack { |
| 46 |
/* |
| 47 |
* HACK - https://github.com/patternfly/patternfly-react/issues/11987 |
| 48 |
* Allow scrolling if a dropdown menu gets positioned outside the bounds of the window. |
| 49 |
* Easier to reproduce on 1080p or lower resolutions. |
| 50 |
* See https://bugzilla.redhat.com/show_bug.cgi?id=2388785 |
| 51 |
*/ |
| 52 |
body:has(.anaconda) { |
| 53 |
overflow-y: auto !important; |
| 54 |
// containers like pf-v6-c-page won't expand with the viewport when dropdown menus are created |
| 55 |
background: var(--pf-t--global--background--color--primary--default); |
| 56 |
} |
| 57 |
} |