Skip to content

Commit 808a522

Browse files
Cathy SillerRyan A. Johnson
authored andcommitted
fix(Toast): correct ShadyCSS styles
1 parent d501126 commit 808a522

File tree

3 files changed

+63
-63
lines changed

3 files changed

+63
-63
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<div id="wrapper">
2-
<div id="icon-wrapper">
3-
<hx-icon id="icon" type="info-circle"></hx-icon>
1+
<div id="hxToast">
2+
<div id="hxIconWrapper">
3+
<hx-icon id="hxIcon" type="info-circle"></hx-icon>
44
</div>
5-
<div id="content">
5+
<div id="hxContent">
66
<div>
77
<slot></slot>
88
</div>
9-
<button id="cta" type="button"></button>
9+
<button id="hxCta" type="button"></button>
1010
</div>
11-
<button id="dismiss" type="button">
11+
<button id="hxDismiss" type="button">
1212
<hx-icon type="times"></hx-icon>
1313
</button>
14-
</div>
14+
</div>

src/helix-ui/elements/HXToastElement.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ export class HXToastElement extends HXElement {
133133

134134
// PRIVATE GETTERS
135135
get _elIcon () {
136-
return this.shadowRoot.getElementById('icon');
136+
return this.shadowRoot.getElementById('hxIcon');
137137
}
138138

139139
get _btnCta () {
140-
return this.shadowRoot.getElementById('cta');
140+
return this.shadowRoot.getElementById('hxCta');
141141
}
142142

143143
get _btnDismiss () {
144-
return this.shadowRoot.getElementById('dismiss');
144+
return this.shadowRoot.getElementById('hxDismiss');
145145
}
146146
}

src/helix-ui/elements/HXToastElement.less

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@import (reference) 'components/box';
44
@import (reference) 'components/buttons';
55

6-
#wrapper {
6+
#hxToast {
77
&:extend(.hxBox-sm);
88
background-color: @gray-0;
99
box-shadow: 0px 3px 3px 0 @shadow-color;
@@ -32,89 +32,89 @@
3232
&::after {
3333
border-left: 8px solid currentColor;
3434
}
35-
}
36-
37-
#icon-wrapper {
38-
align-items: center;
39-
display: flex;
40-
margin: 0 0.75rem 0 0.5rem;
4135

42-
hx-icon {
43-
font-size: 2rem;
36+
#hxIconWrapper {
37+
align-items: center;
38+
display: flex;
39+
margin: 0 0.75rem 0 0.5rem;
40+
41+
hx-icon {
42+
font-size: 2rem;
43+
}
4444
}
45-
}
46-
47-
#content {
48-
flex-grow: 1;
49-
margin-right: 1.5rem;
50-
text-align: right;
51-
word-wrap: break-word;
52-
53-
div {
54-
font-size: 0.875rem;
55-
text-align: left;
45+
46+
#hxContent {
47+
flex-grow: 1;
48+
margin-right: 1.5rem;
49+
text-align: right;
50+
word-wrap: break-word;
51+
52+
div {
53+
font-size: 0.875rem;
54+
text-align: left;
55+
}
5656
}
57-
}
58-
59-
#cta {
60-
&:extend(.hxBtn);
61-
&:extend(.hxBtn.hxLink);
62-
text-transform: uppercase;
63-
64-
&:empty {
65-
display: none;
57+
58+
#hxCta {
59+
&:extend(.hxBtn);
60+
&:extend(.hxBtn.hxLink);
61+
text-transform: uppercase;
62+
63+
&:empty {
64+
display: none;
65+
}
66+
}
67+
68+
#hxDismiss {
69+
background-color: transparent;
70+
border: 0;
71+
color: @gray-700;
72+
cursor: pointer;
73+
flex-shrink: 0;
74+
font-size: 0.75rem;
75+
height: 2.25rem;
76+
line-height: 0;
77+
margin: 0;
78+
padding: 0.75rem;
79+
position: absolute;
80+
right: 0;
81+
top: 0;
82+
width: 2.25rem;
6683
}
67-
}
68-
69-
#dismiss {
70-
background-color: transparent;
71-
border: 0;
72-
color: @gray-700;
73-
cursor: pointer;
74-
flex-shrink: 0;
75-
font-size: 0.75rem;
76-
height: 2.25rem;
77-
line-height: 0;
78-
margin: 0;
79-
padding: 0.75rem;
80-
position: absolute;
81-
right: 0;
82-
top: 0;
83-
width: 2.25rem;
8484
}
8585

8686
:host([type="info"]) {
87-
#wrapper {
87+
#hxToast {
8888
&::after {
8989
border-left-color: @purple-500;
9090
}
9191
}
9292

93-
#icon {
93+
#hxIcon {
9494
color: @purple-500;
9595
}
9696
}
9797

9898
:host([type="error"]) {
99-
#wrapper {
99+
#hxToast {
100100
&::after {
101101
border-left-color: @red-900;
102102
}
103103
}
104104

105-
#icon {
105+
#hxIcon {
106106
color: @red-900;
107107
}
108108
}
109109

110110
:host([type="success"]) {
111-
#wrapper {
111+
#hxToast {
112112
&::after {
113113
border-left-color: @green-500;
114114
}
115115
}
116116

117-
#icon {
117+
#hxIcon {
118118
color: @green-500;
119119
}
120-
}
120+
}

0 commit comments

Comments
 (0)