Skip to content

Commit 48233d1

Browse files
authored
Merge pull request #413 from NullVoxPopuli/eliminate-utilities-from-es-note
Use CSS instead of utility classes from ESNote - to allow HTML to be backwards compatible
2 parents f1debf6 + 8e29e8b commit 48233d1

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

addon/components/es-note.hbs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
<div class="cta-note" ...attributes>
2-
<div class="cta-note-content">
3-
<div class="cta-note-body p-2">
4-
<div class="text-lg mb-1 hide-in-percy" data-test-es-note-heading>{{this.mascot.name}} says...</div>
5-
<div class="cta-note-message">
6-
{{yield}}
7-
</div>
1+
<div class="cta" ...attributes>
2+
<div class="cta-note">
3+
<div class="cta-note-body">
4+
<div class="cta-note-heading" data-test-es-note-heading>{{this.mascot.name}} says...</div>
5+
<div class="cta-note-message">{{yield}}</div>
86
</div>
9-
<img src={{this.mascot.image}} role="presentation" alt="" class="hide-in-percy cta-mascot m-2">
7+
<img src={{this.mascot.image}} role="presentation" alt="">
108
</div>
119
</div>

addon/styles/components/es-note.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,36 @@
1-
.cta-note {
1+
.cta {
22
background-color: var(--color-gray-200);
33
border: 2px solid var(--color-gray-600);
44
border-radius: var(--radius-lg);
55
margin: auto;
66
max-width: 90%;
77
}
88

9-
.cta-note .cta-note-content {
9+
.cta .cta-note {
1010
display: flex;
1111
justify-content: space-between;
1212
}
1313

14-
.cta-note .cta-mascot {
14+
.cta-note .cta-note-body {
15+
padding: var(--spacing-2);
16+
}
17+
18+
.cta-note .cta-note-heading {
19+
font-size: var(--font-size-lg);
20+
font-weight: var(--font-weight-3);
21+
line-height: var(--line-height-lg);
22+
margin-bottom: var(--spacing-1);
23+
}
24+
25+
.cta-note img {
26+
margin: var(--spacing-2);
1527
transform: rotate(15deg);
1628
}
29+
30+
@media only percy {
31+
.cta-note .cta-note-heading,
32+
.cta-note img {
33+
visibility: hidden;
34+
}
35+
}
36+

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)