Skip to content

Commit 023cf43

Browse files
committed
updating styles
1 parent 39a8041 commit 023cf43

3 files changed

Lines changed: 62 additions & 33 deletions

File tree

elements/rh-health-index/rh-health-index.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,26 @@ class RhHealthIndex extends RHElement {
3535
3636
.box-container {
3737
display: flex;
38-
border: 1px solid #ececec;
39-
margin-left: 8px; }
38+
border: 1px solid var(--rh-theme--color--surface--border, #dfdfdf);
39+
margin-left: var(--rh-theme--container-spacer--xs, 0.5rem); }
4040
.box-container .box {
41-
background: white;
41+
background: #fff;
4242
width: 10px;
4343
height: 20px;
44-
border-right: 1px solid #ececec; }
45-
.box-container .box.a.active {
44+
border-right: 1px solid var(--rh-theme--color--surface--border, #dfdfdf); }
45+
.box-container .box:last-child {
46+
border-right: 0; }
47+
.box-container .box.active.a {
4648
background-color: #3f9c35; }
47-
.box-container .box.b.active {
49+
.box-container .box.active.b {
4850
background-color: #92d400; }
49-
.box-container .box.c.active {
51+
.box-container .box.active.c {
5052
background-color: #efaa00; }
51-
.box-container .box.d.active {
53+
.box-container .box.active.d {
5254
background-color: #ec7a08; }
53-
.box-container .box.e.active {
55+
.box-container .box.active.e {
5456
background-color: #cc0000; }
55-
.box-container .box.f.active {
57+
.box-container .box.active.f {
5658
background-color: #a30000; }
5759
</style>
5860
<div id="healthIndex"></div>

elements/rh-health-index/rh-health-index.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
@import "../../rh-sass/rh-sass";
2+
3+
/// ===========================================================================
4+
/// Component Specific SASS Vars
5+
/// ===========================================================================
6+
7+
$rh-health--width: 10px;
8+
$rh-health--height: $rh-health--width * 2;
9+
10+
$rh-health--color-bg: #fff;
11+
12+
$rh-health--color-a: #3f9c35;
13+
$rh-health--color-b: #92d400;
14+
$rh-health--color-c: #efaa00;
15+
$rh-health--color-d: #ec7a08;
16+
$rh-health--color-e: #cc0000;
17+
$rh-health--color-f: #a30000;
18+
19+
/// ===========================================================================
20+
/// WHATEVER
21+
/// ===========================================================================
22+
223
:host {
324
display: inline-flex;
425
align-items: center;
@@ -10,37 +31,43 @@
1031

1132
.box-container {
1233
display: flex;
13-
border: 1px solid #ececec;
14-
margin-left: 8px;
34+
border: 1px solid #{rh-color(surface--border)};
35+
margin-left: #{rh-var(container-spacer--xs)};
1536

1637
.box {
17-
background: white;
18-
width: 10px;
19-
height: 20px;
20-
border-right: 1px solid #ececec;
38+
background: $rh-health--color-bg;
39+
width: $rh-health--width;
40+
height: $rh-health--height;
41+
border-right: 1px solid #{rh-color(surface--border)};
2142

22-
&.a.active {
23-
background-color: #3f9c35;
43+
&:last-child {
44+
border-right: 0;
2445
}
2546

26-
&.b.active {
27-
background-color: #92d400;
28-
}
47+
&.active {
48+
&.a {
49+
background-color: $rh-health--color-a;
50+
}
2951

30-
&.c.active {
31-
background-color: #efaa00;
32-
}
52+
&.b {
53+
background-color: $rh-health--color-b;
54+
}
3355

34-
&.d.active {
35-
background-color: #ec7a08;
36-
}
56+
&.c {
57+
background-color: $rh-health--color-c;
58+
}
3759

38-
&.e.active {
39-
background-color: #cc0000;
40-
}
60+
&.d {
61+
background-color: $rh-health--color-d;
62+
}
63+
64+
&.e {
65+
background-color: $rh-health--color-e;
66+
}
4167

42-
&.f.active {
43-
background-color: #a30000;
68+
&.f {
69+
background-color: $rh-health--color-f;
70+
}
4471
}
4572
}
4673
}

0 commit comments

Comments
 (0)