Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions css/components/link.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
.link-wrapper {
position: relative;
display: flex;
align-items: center;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the only content of .link-wrapper is .link-content, I think line 3 is superfluous, and line 4 belongs after line 8.

}

.link-content > a {
display: flex;
}

.link-content > a::after {
position: absolute;
inset: 0;
content: "";
}

.link-icon {
flex-shrink: 0;
margin-inline-end: var(--link-icon-margin);
Expand Down
10 changes: 5 additions & 5 deletions templates/paragraphs/paragraph--localgov-link.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@

{% if paragraph.localgov_url.value %}
<div class="link-wrapper">
{% include "@localgov_base/includes/icons/icon.html.twig" with {
icon_name: title_icon,
icon_classes: 'link-icon',
}
%}
<div class="link-content">
<a href="{{ content.localgov_url.0 }}">
{% include "@localgov_base/includes/icons/icon.html.twig" with {
icon_name: title_icon,
icon_classes: 'link-icon',
}
%}
{{ content.localgov_title.0 }}
</a>
</div>
Expand Down