Skip to content

Commit 2caa7da

Browse files
committed
style(page-status): desassify page-status
1 parent fbeef85 commit 2caa7da

File tree

2 files changed

+48
-40
lines changed

2 files changed

+48
-40
lines changed

.changeset/moody-games-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@patternfly/pfe-page-status": patch
3+
---
4+
5+
desassify pfe-page-status
Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
@use "@patternfly/pfe-sass" as *;
22

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-
133
:host {
14-
background-color: pfe-local(BackgroundColor);
4+
background-color: var(--pfe-status--BackgroundColor, var(--pfe-theme--color--feedback--default, #4f5255));
155
position: fixed;
16-
right: pfe-local(Right);
6+
right: var(--pfe-status--Right, 0);
177
top: 0;
188
height: 100vh;
199
display: flex;
@@ -29,40 +19,53 @@
2919

3020
#flag {
3121
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-
}
4522
}
4623

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);
5244
}
5345

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);
5849
}
5950

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);
6354
}
6455

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);
6860
}
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

Comments
 (0)