Skip to content

Commit fb5b1d1

Browse files
authored
Merge pull request #155 from w3c/feature/review-tr-styles
Feature/review tr styles
2 parents 61b0d0f + 9ac6b20 commit fb5b1d1

File tree

7 files changed

+32
-29
lines changed

7 files changed

+32
-29
lines changed

assets-src/styles/sass/50-core-components/_family-series-list.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
\*------------------------------------*/
44

55
.family-grouping {
6-
padding-top: rem(40);
6+
padding-block-start: rem(28);
77
}
88

99
.family-grouping h2 + * {
10-
margin-top: 1rem;
10+
margin-block-start: 1rem;
1111
}

assets-src/styles/sass/80-templates/_technical-reports.scss

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
.hero {
1111
background-color: $white;
12-
margin-bottom: rem(20);
13-
padding-bottom: rem(40);
12+
margin-block-end: rem(20);
13+
padding-block-end: 0;
1414

1515
.l-box {
1616
background-color: #f3f3f6;
@@ -31,14 +31,20 @@
3131
background-color: $white;
3232
}
3333

34+
// Close visual gap between end of visible text and CSS-inserted colon caused by visuallyhidden <span>
35+
// Only works while there is a single visuallyhidden <span> as the last child in the <dt>
36+
.translation-list dt:has(span.visuallyhidden)::after {
37+
margin-inline-start: rem(-4);
38+
}
3439
}
3540

3641
.tr-list {
3742
.tr-list__item {
3843
@include stack(0.5em);
3944
@include txt-pluto;
40-
padding-bottom: rem(24);
41-
padding-top: rem(24);
45+
border-block-end: 1px solid $twiki-gray;
46+
padding-block-end: rem(8);
47+
padding-block-start: rem(20);
4248

4349
> * {
4450
max-width: rem(820);
@@ -49,21 +55,17 @@
4955
@include txt-mars;
5056
}
5157

52-
.tr-list__item + .tr-list__item {
53-
border-top: 1px solid $twiki-gray;
54-
}
55-
5658
.tr-list__item__header {
5759
@include stack;
5860
align-items: flex-start;
5961

6062
h3 {
61-
margin-bottom: 0;
62-
margin-top: rem(5);
63+
margin-block-end: 0;
64+
margin-block-start: rem(5);
6365
}
6466

6567
h3 + * {
66-
margin-top: 0;
68+
margin-block-start: 0;
6769
order: -1;
6870
}
6971
}

design-system-templates/components/tr-search-results-family.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<dd>Michael Cooper</dd>
5656
</div>
5757
<div class="translation-list">
58-
<dt>2 translations for Accessible Rich Internet Applications (WAI-ARIA) 1.0</dt>
58+
<dt>Translations <span class="visuallyhidden">for Accessible Rich Internet Applications (WAI-ARIA) 1.0</span></dt>
5959
<dd><a hreflang="ja" href="path/to/page"><span lang="ja">日本語</span></a></dd>
6060
<dd><a hreflang="hu-HU" href="path/to/page"><span lang="hu-HU">Magyar</span></a></dd>
6161
</div>

design-system-templates/components/tr-search-results-item-standard.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<dd>Michael Cooper</dd>
1919
</div>
2020
<div class="translation-list">
21-
<dt>2 translations for Accessible Rich Internet Applications (WAI-ARIA) 1.0</dt>
21+
<dt>Translations <span class="visuallyhidden">for Accessible Rich Internet Applications (WAI-ARIA) 1.0</span></dt>
2222
<dd><a hreflang="ja" href="path/to/page"><span lang="ja">日本語</span></a></dd>
2323
<dd><a hreflang="hu-HU" href="path/to/page"><span lang="hu-HU">Magyar</span></a></dd>
2424
</div>

public/dist/assets/styles/core.css

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4089,11 +4089,11 @@ input[type=search] {
40894089
#Family/Series list
40904090
\*------------------------------------*/
40914091
.family-grouping {
4092-
padding-top: 2.5rem;
4092+
padding-block-start: 1.75rem;
40934093
}
40944094

40954095
.family-grouping h2 + * {
4096-
margin-top: 1rem;
4096+
margin-block-start: 1rem;
40974097
}
40984098

40994099
/*------------------------------------*\
@@ -5004,8 +5004,8 @@ input[type=search] {
50045004
}
50055005
.technical-reports .hero {
50065006
background-color: #fff;
5007-
margin-bottom: 1.25rem;
5008-
padding-bottom: 2.5rem;
5007+
margin-block-end: 1.25rem;
5008+
padding-block-end: 0;
50095009
}
50105010
.technical-reports .hero .l-box {
50115011
background-color: #f3f3f6;
@@ -5021,15 +5021,19 @@ input[type=search] {
50215021
.technical-reports .radio-item label::before {
50225022
background-color: #fff;
50235023
}
5024+
.technical-reports .translation-list dt:has(span.visuallyhidden, span.skip-link)::after {
5025+
margin-inline-start: -0.25rem;
5026+
}
50245027

50255028
.tr-list .tr-list__item {
50265029
display: flex;
50275030
flex-direction: column;
50285031
justify-content: flex-start;
50295032
font-size: 0.9375rem;
50305033
line-height: 1.5;
5031-
padding-bottom: 1.5rem;
5032-
padding-top: 1.5rem;
5034+
border-block-end: 1px solid #bdbdbd;
5035+
padding-block-end: 0.5rem;
5036+
padding-block-start: 1.25rem;
50335037
}
50345038
.tr-list .tr-list__item > * + * {
50355039
margin-top: 0.5em;
@@ -5041,9 +5045,6 @@ input[type=search] {
50415045
font-size: 1.5rem;
50425046
line-height: 1.4;
50435047
}
5044-
.tr-list .tr-list__item + .tr-list__item {
5045-
border-top: 1px solid #bdbdbd;
5046-
}
50475048
.tr-list .tr-list__item__header {
50485049
display: flex;
50495050
flex-direction: column;
@@ -5054,11 +5055,11 @@ input[type=search] {
50545055
margin-top: 1em;
50555056
}
50565057
.tr-list .tr-list__item__header h3 {
5057-
margin-bottom: 0;
5058-
margin-top: 0.3125rem;
5058+
margin-block-end: 0;
5059+
margin-block-start: 0.3125rem;
50595060
}
50605061
.tr-list .tr-list__item__header h3 + * {
5061-
margin-top: 0;
5062+
margin-block-start: 0;
50625063
order: -1;
50635064
}
50645065

public/dist/assets/styles/core.min.css

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

templates/components/listings/publications/tr_card.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
{% block translations %}
3131
{% if spec.translations and spec.translations.translations|length > 0 %}
3232
<div class="translation-list">
33-
<dt>{{ spec.translations.translations|length }} translation{% if spec.translations.translations|length > 1 %}s{% endif %} for {{ spec.title }}</dt>
33+
<dt>Translation{% if spec.translations.translations|length > 1 %}s{% endif %} <span class="visuallyhidden">for {{ spec.title }}</span></dt>
3434
{% for t in spec.translations.translations|sort((a,b) => a.language <=> b.language) -%}
3535
<dd><a hreflang="{{ t.language|locale_to_bcp47 }}" href="{{ t.uri }}"><span lang="{{ t.language|locale_to_bcp47 }}">{{ t.language|locale_name(t.language) }}</span></a></dd>
3636
{% endfor -%}

0 commit comments

Comments
 (0)