Skip to content

Commit 40bec33

Browse files
committed
PR-341: Add a light link variant for dark backgrounds
1 parent 2c33829 commit 40bec33

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

packages/core/elements/_links.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ a {
2727
.ofh-link--no-visited-state {
2828
@include ofh-link-style-no-visited-state;
2929
}
30+
31+
.ofh-link--light {
32+
@include ofh-link-style-light;
33+
}

packages/core/settings/_colours.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ $ofh-link-active-color: #001F42;
156156
$ofh-link-light-color: #FFF;
157157
$ofh-link-light-hover-color: #F4F4F4;
158158
$ofh-link-light-visited-color: #D8B7DE;
159-
$ofh-link-light-active-color: #001F42;
159+
$ofh-link-light-active-color: #FFF;
160160

161161
// Breadcrumb links have their own colours
162162
$ofh-breadcrumb-link-color: $color_ofh-brand-dark-blue;

site/views/design-system/styles/typography/index.njk

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@
182182
htmlOnly: true
183183
}) }}
184184

185+
<p>Use the <code>ofh-link--light</code> modifier class where a dark background is used.</p>
186+
187+
{{ designExample({
188+
group: "styles",
189+
item: "typography",
190+
type: "links-light",
191+
htmlOnly: true
192+
}) }}
193+
185194
<h2 id="lists">Lists</h2>
186195
<p>Use lists to make blocks of text easier to read, and to break information into manageable chunks.</p>
187196

@@ -216,7 +225,7 @@
216225
<h2 id="section-break">Section break</h2>
217226
<p class="rich-text">You can use the <code>ofh-section-break</code> classes on an <code>&lt;hr&gt;</code> element to create a thematic break between sections of content. <code>ofh-section-break</code> has class-based modifiers for different size margins.</p>
218227
<p class="rich-text">By default <code>ofh-section-break</code> is only visible by its margin. You can add the <code>ofh-section-break--visible</code> class to make it visible with a separator line.</p>
219-
228+
220229
<h3 class="rich-text">Colour Variants</h3>
221230
<ul class="ofh-list">
222231
<li><code>ofh-section-break--black</code></li>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="#" class="ofh-link ofh-link--light">Link ofh-link--light</a>

0 commit comments

Comments
 (0)