Skip to content

Commit 9100500

Browse files
committed
Add focus-visible styles for libs-card and escape visible card text
1 parent 5e85fd1 commit 9100500

2 files changed

Lines changed: 16 additions & 3 deletions

File tree

assets/css/redesign.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,14 @@ ul {
13811381
background: var(--color-bg-warm);
13821382
}
13831383

1384+
.libs-card:focus-visible {
1385+
outline: 2px solid var(--color-red);
1386+
outline-offset: -2px;
1387+
background: var(--color-bg-warm);
1388+
z-index: 1;
1389+
position: relative;
1390+
}
1391+
13841392
.libs-card[hidden] {
13851393
display: none;
13861394
}
@@ -1466,6 +1474,11 @@ ul {
14661474
opacity: 0.75;
14671475
}
14681476

1477+
.libs-footer__link:focus-visible {
1478+
outline: 2px solid var(--color-red);
1479+
outline-offset: 2px;
1480+
}
1481+
14691482
/* ------------------------------------------------------------
14701483
Libraries — No Results
14711484
------------------------------------------------------------ */

libraries/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ <h1 class="page-header__heading">mrbgems</h1>
6464
data-description="{{ mgem.description | downcase | xml_escape }}"
6565
>
6666
<div class="libs-card__header">
67-
<span class="libs-card__name">{{ mgem.name }}</span>
68-
<span class="libs-card__author">{{ mgem_author }}</span>
67+
<span class="libs-card__name">{{ mgem.name | xml_escape }}</span>
68+
<span class="libs-card__author">{{ mgem_author | xml_escape }}</span>
6969
</div>
70-
<p class="libs-card__description">{{ mgem.description }}</p>
70+
<p class="libs-card__description">{{ mgem.description | xml_escape }}</p>
7171
</a>
7272
{% assign row_index = row_index | plus: 1 %}
7373
{% assign mod_end = row_index | modulo: row_size %}

0 commit comments

Comments
 (0)