|
1 | 1 | @use "@patternfly/pfe-sass" as *; |
2 | 2 |
|
3 | | -@include configure( |
4 | | - $name: 'status', |
5 | | - $variables: ( |
6 | | - Color: pfe-var(text--on-dark), |
7 | | - BackgroundColor: pfe-var(feedback--default), |
8 | | - TextTransform: uppercase, |
9 | | - Right: 0 |
10 | | - ), |
11 | | -); |
12 | | - |
13 | 3 | :host { |
14 | | - background-color: pfe-local(BackgroundColor); |
| 4 | + background-color: var(--pfe-status--BackgroundColor, var(--pfe-theme--color--feedback--default, #4f5255)); |
15 | 5 | position: fixed; |
16 | | - right: pfe-local(Right); |
| 6 | + right: var(--pfe-status--Right, 0); |
17 | 7 | top: 0; |
18 | 8 | height: 100vh; |
19 | 9 | display: flex; |
|
29 | 19 |
|
30 | 20 | #flag { |
31 | 21 | transform: rotateZ(90deg); |
32 | | - > span { |
33 | | - color: pfe-local(Color); |
34 | | - display: inline-block; |
35 | | - text-transform: pfe-local(TextTransform); |
36 | | - font-size: 0.875rem; |
37 | | - font-family: pfe-var(font-family); |
38 | | - font-size: pfe-var(font-size); |
39 | | - font-weight: bold; |
40 | | - line-height: 1em; |
41 | | - white-space: nowrap; |
42 | | - // writing-mode: vertical-rl; |
43 | | - // text-orientation: mixed; |
44 | | - } |
45 | 22 | } |
46 | 23 |
|
47 | | -@each $state in (important, critical, success, info) { |
48 | | - :host([status="#{$state}"]) { |
49 | | - --pfe-status--BackgroundColor: #{pfe-var(feedback--#{$state})}; |
50 | | - --pfe-status--Color: #{pfe-var(text--on-dark)}; |
51 | | - } |
| 24 | +#flag > span { |
| 25 | + color: var(--pfe-status--Color, var(--pfe-theme--color--text--on-dark, #fff)); |
| 26 | + display: inline-block; |
| 27 | + text-transform: var(--pfe-status--TextTransform, uppercase); |
| 28 | + font-size: 0.875rem; |
| 29 | + font-family: var(--pfe-theme--font-family, "Red Hat Text", "RedHatText", "Overpass", Overpass, Arial, sans-serif); |
| 30 | + font-size: var(--pfe-theme--font-size, 1rem); |
| 31 | + font-weight: bold; |
| 32 | + line-height: 1em; |
| 33 | + white-space: nowrap; |
| 34 | +} |
| 35 | + |
| 36 | +:host([status=important]) { |
| 37 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--feedback--important, #c9190b); |
| 38 | + --pfe-status--Color: var(--pfe-theme--color--text--on-dark, #fff); |
| 39 | +} |
| 40 | + |
| 41 | +:host([status=critical]) { |
| 42 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--feedback--critical, #a30000); |
| 43 | + --pfe-status--Color: var(--pfe-theme--color--text--on-dark, #fff); |
52 | 44 | } |
53 | 45 |
|
54 | | -:host([status="moderate"]), |
55 | | -:host([status="warning"]) { |
56 | | - --pfe-status--BackgroundColor: #{pfe-var(feedback--moderate)}; |
57 | | - --pfe-status--Color: #{pfe-var(text)}; |
| 46 | +:host([status=success]) { |
| 47 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--feedback--success, #3e8635); |
| 48 | + --pfe-status--Color: var(--pfe-theme--color--text--on-dark, #fff); |
58 | 49 | } |
59 | 50 |
|
60 | | -:host([status="normal"]) { |
61 | | - --pfe-status--BackgroundColor: #{pfe-var(ui-accent)}; |
62 | | - --pfe-status--Color: #{pfe-var(ui-accent--text)}; |
| 51 | +:host([status=info]) { |
| 52 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--feedback--info, #06c); |
| 53 | + --pfe-status--Color: var(--pfe-theme--color--text--on-dark, #fff); |
63 | 54 | } |
64 | 55 |
|
65 | | -:host([status="accent"]) { |
66 | | - --pfe-status--BackgroundColor: #{pfe-var(ui-accent)}; |
67 | | - --pfe-status--Color: #{pfe-var(ui-accent--text)}; |
| 56 | +:host([status=moderate]), |
| 57 | +:host([status=warning]) { |
| 58 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--feedback--moderate, #f0ab00); |
| 59 | + --pfe-status--Color: var(--pfe-theme--color--text, #151515); |
68 | 60 | } |
| 61 | + |
| 62 | +:host([status=normal]) { |
| 63 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--ui-accent, #06c); |
| 64 | + --pfe-status--Color: var(--pfe-theme--color--ui-accent--text, #fff); |
| 65 | +} |
| 66 | + |
| 67 | +:host([status=accent]) { |
| 68 | + --pfe-status--BackgroundColor: var(--pfe-theme--color--ui-accent, #06c); |
| 69 | + --pfe-status--Color: var(--pfe-theme--color--ui-accent--text, #fff); |
| 70 | +} |
| 71 | + |
0 commit comments