Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
- making all muted headings use same styles
- adjusting headling level for table of contents header
- overriding visited link colour (as these will be anchors)
  • Loading branch information
bartaz committed Oct 5, 2023
1 parent 0af4e86 commit 756236d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scss/_base_typography-definitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@
text-transform: uppercase;
}

// deprecated: %muted-text is deprecated, use %small-caps-text instead
%muted-heading {
@extend %small-caps-text;
@extend %bold;
}

%bold {
Expand Down
4 changes: 4 additions & 0 deletions scss/_patterns_table-of-contents.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
&.is-active {
font-weight: $font-weight-bold;
}

&:visited {
color: $color-link;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% block content %}
<aside class="p-table-of-contents">
<div class="p-table-of-contents__section">
<h4 class="p-table-of-contents__header">On this page:</h4>
<h2 class="p-table-of-contents__header">On this page</h2>
<nav class="p-table-of-contents__nav" aria-label="Table of contents">
<ul class="p-table-of-contents__list">
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#link1">Install from snap</a></li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% block content %}
<aside class="p-table-of-contents">
<div class="p-table-of-contents__section">
<h4 class="p-table-of-contents__header">On this page:</h4>
<h2 class="p-table-of-contents__header">On this page</h2>
<nav class="p-table-of-contents__nav" aria-label="Table of contents">
<ul class="p-table-of-contents__list">
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#link1">Install from snap</a></li>
Expand All @@ -22,7 +22,7 @@ <h4 class="p-table-of-contents__header">On this page:</h4>
</nav>
</div>
<div class="p-table-of-contents__section">
<h4 class="p-table-of-contents__header">Resources:</h4>
<h2 class="p-table-of-contents__header">Resources</h2>
<nav class="p-table-of-contents__nav" aria-label="Resources">
<ul class="p-table-of-contents__list">
<li class="p-table-of-contents__item"><a class="p-table-of-contents__link" href="#link1">Documentation</a></li>
Expand Down
2 changes: 1 addition & 1 deletion templates/docs/patterns/table-of-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ context:

A table of contents can be used to display supplementary links to a page.

<div class="embedded-example"><a href="/docs/examples/patterns/table-of-contents/" class="js-example">
<div class="embedded-example"><a href="/docs/examples/patterns/table-of-contents/default" class="js-example">
View example of the table of contents pattern
</a></div>

Expand Down

0 comments on commit 756236d

Please sign in to comment.