Skip to content

Commit 9463d53

Browse files
authored
Merge pull request #267 from ember-learn/fix-dark-card-hover
Fix dark card hover
2 parents c701acf + beeb1bc commit 9463d53

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

addon/styles/components/es-card.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
background-color: var(--color-gray-200);
2828
}
2929

30+
.bg-dark .card[card-link]:focus-within,
31+
.bg-dark .card[card-link]:hover {
32+
background-color: var(--color-gray-800);
33+
}
34+
3035
.card__image {
3136
display: block;
3237
max-width: 64px;

docs/components/card.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ But if you would like the whole card to become interactive and act as a link you
109109
</ul>
110110
```
111111

112+
Here is what that looks like on a dark background
113+
114+
```html
115+
<div class="bg-dark">
116+
<ul class="list-unstyled layout">
117+
<EsCard class="lg:col-3" @image="/images/icons/mic-icon.svg" card-link>
118+
<h3>
119+
<a href="http://discuss.emberjs.com">Discussion Forum</a>
120+
</h3>
121+
<p>Post and search longer-form questions in our public forum.</p>
122+
</EsCard>
123+
</ul>
124+
</div>
125+
```
126+
112127
And here is a full card based page layout that might be useful when building sites using this component:
113128

114129
```html

0 commit comments

Comments
 (0)