summaryrefslogtreecommitdiffstats
path: root/pkg/lib/page.scss
blob: 3da4f6173a5b25c7e63e33c57bb2477f8ea69c6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
@use "@patternfly/patternfly/base/patternfly-themes.scss";
@use "@patternfly/patternfly/patternfly-theme-dark.scss";
@use "./patternfly/patternfly-5-overrides.scss";
@import "global-variables";

/* Globally resize headings */
h1 {
  --ct-heading-font-size: var(--pf-v5-global--FontSize--4xl);
}

h2 {
  --ct-heading-font-size: var(--pf-v5-global--FontSize--3xl);
}

h3 {
  --ct-heading-font-size: var(--pf-v5-global--FontSize--2xl);
}

h4 {
  --ct-heading-font-size: var(--pf-v5-global--FontSize--lg);
}

// Only apply a custom font size when a heading does NOT have a PF4 class
h1, h2, h3, h4 {
  &:not([class*="pf-"]):not([data-pf-content="true"]) {
    font-size: var(--ct-heading-font-size);
  }
}

/* End of headings resize */

a {
  cursor: pointer;
}

.disabled {
  pointer-events: auto;
}

.btn {
  min-block-size: 26px;
  min-inline-size: 26px;
}

.btn.disabled, .pf-v5-c-button.disabled {
  pointer-events: auto;
}

.btn.disabled:hover, .pf-v5-c-button.disabled:hover {
  z-index: auto;
}

.btn-group {
  /* Fix button groups from wrapping in narrow widths */
  display: inline-flex;
}

a.disabled {
  cursor: not-allowed !important;
  text-decoration: none;
  pointer-events: none;
  color: #8b8d8f;
}

a.disabled:hover {
  text-decoration: none;
}

.highlight-ct {
  background-color: var(--ct-color-link-hover-bg);
}

.curtains-ct {
  inline-size: 100%;
}

/* Animation of new items */
.ct-new-item {
  animation: ctNewRow 4s ease-in;
}

:root {
  --ct-animation-new-background: #fdf4dd;
}

.pf-v5-theme-dark {
  --ct-animation-new-background: #353428;
}

/* Animation background is instantly yellow and fades out halfway through */
@keyframes ctNewRow {
  0% {
    background-color: var(--ct-animation-new-background);
  }

  50% {
    background-color: var(--ct-animation-new-background);
  }
}

/* Dialog patterns */

.dialog-wait-ct {
  /* Right align footer idle messages after the buttons */
  margin-inline-start: auto;
  display: flex;
  column-gap: var(--pf-v5-global--spacer--sm);
  align-items: center;
}

:root {
  /* Cockpit custom colors */
  --ct-color-light-red: #f8cccc;
  --ct-color-red-hat-red : #e00;

  // Blend between --pf-v5-global--palette--black-200 and 300
  --ct-global--palette--black-250: #e6e6e6;

  /* Semantic colors */
  --ct-color-fg: var(--pf-v5-global--color--100);
  --ct-color-bg: var(--pf-v5-global--BackgroundColor--100);
  --ct-color-text: var(--ct-color-fg);

  --ct-color-link        : var(--pf-v5-global--active-color--100);
  --ct-color-link-visited: var(--pf-v5-global--active-color--100);

  --ct-color-subtle-copy: var(--pf-v5-global--disabled-color--100);

  // General border color (semantic shortcut, instead of specifying the color directly)
  --ct-color-border: var(--pf-v5-global--BorderColor--100);

  // Used for highlighting link blocks (with a light background blue)
  --ct-color-link-hover-bg  : var(--pf-v5-global--palette--light-blue-100);

  /* Colors used for custom lists */
  // as seen in Journal, Listing, Table widgets and pages like Machines, Updates, Services
  --ct-color-list-text               : var(--ct-color-text);
  --ct-color-list-link               : var(--ct-color-link);
  --ct-color-list-bg                 : var(--ct-color-bg);
  --ct-color-list-border             : var(--ct-color-border);
  --ct-color-list-hover-text         : var(--ct-color-link);
  --ct-color-list-hover-bg           : var(--pf-v5-global--BackgroundColor--150);
  --ct-color-list-hover-border       : var(--pf-v5-global--BackgroundColor--150);
  --ct-color-list-hover-icon         : var(--pf-v5-global--palette--light-blue-400);
  --ct-color-list-selected-text      : var(--ct-color-link);
  --ct-color-list-selected-bg        : var(--pf-v5-global--BackgroundColor--150);
  --ct-color-list-selected-border    : var(--pf-v5-global--BackgroundColor--150);
  --ct-color-list-active-text        : var(--pf-v5-global--palette--blue-500);
  --ct-color-list-active-bg          : var(--ct-color-bg);
  --ct-color-list-active-border      : var(--ct-color-list-border);
  --ct-color-list-critical-bg        : var(--pf-v5-global--palette--red-50);
  --ct-color-list-critical-border    : #e6bcbc; // red-500 mixed with white @ 50%
  --ct-color-list-critical-alert-text: var(--pf-v5-global--palette--red-200);
}

.pf-v5-theme-dark {
  --ct-color-list-critical-bg        : #261213; // red-100 mixed with black-850 @ 20%
  --ct-color-list-critical-border    : var(--pf-v5-global--danger-color--200);
  --ct-color-list-critical-alert-text: var(--pf-v5-global--palette--red-8888);
}

[hidden] { display: none !important; }

// Let PF4 handle the scrolling through page component otherwise we might get double scrollbar
html:not(.index-page) body {
  overflow-block: hidden;

  // Ensure UI fills the entire page (and does not run over)
  .ct-page-fill {
    block-size: 100% !important;
  }
}

.ct-icon-info-circle {
  color: var(--pf-v5-global--info-color--100);
}

.ct-icon-exclamation-triangle {
  color: var(--pf-v5-global--warning-color--100);
}

.ct-icon-times-circle {
  color: var(--pf-v5-global--danger-color--100);
}

// Action buttons in headers add extra space. Offset that with a negative margin
// to compensate, so headings are always the same height regardless of action
// buttons or not.
.pf-v5-c-page__main-breadcrumb .pf-v5-c-button {
  --offset: calc(-1 * var(--pf-v5-global--spacer--sm));
  margin-block: var(--offset);
}

// To be used only from testlib.py for pixel-tests
main.pixel-test {
  overflow-y: clip;
}