Skip to content

Commit 03b8480

Browse files
committed
refactor arrow classes for valid BEM syntax
1 parent cea4ace commit 03b8480

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

tbx/project_styleguide/templates/patterns/molecules/listing/listing--avatar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<a class="listing-avatar__link listing__link" href="{{ link }}" aria-label="{{ aria_text|default:title }} by {{ name }}">
88
<h2 class="listing-avatar__title listing__title">
99
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
10-
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow" %}</span>
10+
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow icon--listing-arrow" %}</span>
1111
</h2>
1212
</a>
1313
<div class="listing-avatar__details listing__details">

tbx/project_styleguide/templates/patterns/molecules/listing/listing--event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<a class="listing-image__link listing__link" href="{{ link }}">
3232
<h2 class="listing-image__title listing__title">
3333
{# The title and icon need to be on the same line with no whitespace to prevent the icon being orphaned on a new line #}
34-
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing-image__arrow listing__arrow" %}</span>
34+
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow icon--listing-arrow" %}</span>
3535
</h2>
3636
</a>
3737
<div class="listing-event__details listing__details">

tbx/project_styleguide/templates/patterns/molecules/listing/listing--image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<a class="listing-image__link listing__link" href="{{ link }}">
2727
<h2 class="listing-image__title listing__title">
2828
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
29-
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing-image__arrow listing__arrow" %}</span>
29+
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow icon--listing-arrow" %}</span>
3030
</h2>
3131
</a>
3232
<div class="listing-image__details listing__details">

tbx/project_styleguide/templates/patterns/molecules/listing/listing--simple.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<a class="listing__link" href="{{ link }}" aria-label="{{ aria_text|default:title }} by {{ name }}">
33
<h2 class="listing__title">
44
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
5-
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow" %}</span>
5+
<span class="listing__title-text">{{ title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="listing__arrow icon--listing-arrow" %}</span>
66
</h2>
77
</a>
88
<div class="listing__details">

tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/event_block.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<a class="event-block__title" href="{{ value.get_button_link }}" aria-label="{{ value.title }}">
66
<h2>
77
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
8-
<span>{{ value.title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="event-block__arrow listing__arrow" %}</span>
8+
<span>{{ value.title }}</span><span class="listing__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="event-block__arrow icon--listing-arrow" %}</span>
99
</h2>
1010
</a>
1111
<div class="event-block__meta">

tbx/project_styleguide/templates/patterns/molecules/streamfield/blocks/featured_case_study.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<a href="{% pageurl link %}" class="featured-case-study__link">
1919
<h2 class="featured-case-study__title">
2020
{# The title and icon need to be on the same line with no whitespace to prevent the arrow being orphaned on a new line #}
21-
<span class="featured-case-study__link-text">{{ link.title }}</span><span class="featured-case-study__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="featured-case-study__arrow listing__arrow" %}</span>
21+
<span class="featured-case-study__link-text">{{ link.title }}</span><span class="featured-case-study__tail">&nbsp;{% include "patterns/atoms/icons/icon.html" with name="arrow-wide" classname="featured-case-study__arrow icon--listing-arrow" %}</span>
2222
</h2>
2323
</a>
2424

tbx/static_src/sass/components/_icon.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
width: 100%;
2525
}
2626

27+
&--listing-arrow {
28+
@include arrow-link-icon-styles();
29+
margin-left: $spacer-mini-plus;
30+
}
31+
2732
.template-404-page & {
2833
&--broken-matchstick {
2934
margin: 0 auto;

0 commit comments

Comments
 (0)