Skip to content

Commit

Permalink
feat: Make current pagination item not a link
Browse files Browse the repository at this point in the history
See discussion on
#815
  • Loading branch information
remydenton committed Jul 17, 2018
1 parent 2c27e74 commit c0e5690
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/components/bolt-pagination/pagination.scss
Expand Up @@ -77,6 +77,7 @@ bolt-pagination {
&.is-current {
color: $bolt-pagination-item-text-color-current-notheme;
background-color: $bolt-pagination-item-bg-color-current-notheme;
opacity: 1; // Current item is not a link so its styling shouldn't change based on state.
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/components/bolt-pagination/pagination.twig
Expand Up @@ -95,14 +95,14 @@
{% if key == current %}
{% set linkAttributes = linkAttributes.addClass("is-current") %}
{% set linkAttributes = linkAttributes.setAttribute("aria-current", "true") %}
<a {{ linkAttributes }}>
<span {{ linkAttributes|without("href") }}>
<span class="{{ "#{baseClass}__text" }}">
<span class="u-bolt-visuallyhidden">
You are currently on page
</span>
{{- key -}}
</span>
</a>
</span>
{% else %}
<a {{ linkAttributes }}>
<span class="{{ "#{baseClass}__text" }}">
Expand Down

0 comments on commit c0e5690

Please sign in to comment.