Skip to content

Commit 0a043a0

Browse files
committed
fix: update following MR review
1 parent bc83eb4 commit 0a043a0

File tree

6 files changed

+35
-22
lines changed

6 files changed

+35
-22
lines changed

scss/_links.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
}
1616

1717
.link {
18+
// scss-docs-start link-css-vars
1819
--#{$prefix}link-icon-size: #{$ouds-link-size-icon-medium};
1920
--#{$prefix}link-icon-gap: #{$ouds-link-space-column-gap-icon-medium};
21+
// scss-docs-end link-css-vars
2022

2123
@extend a;
2224
@include get-font-size("label-large");

scss/_reboot.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ a {
393393
// causes specificity issues in many other styles that are too complex to fix.
394394
// See https://github.com/twbs/bootstrap/issues/19402
395395

396-
a:not([href]):not([class]) {
396+
a:not([href]):not([class]):not([aria-disabled="true"]) {
397397
&,
398398
&:hover {
399399
color: inherit;

scss/_variables.scss

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -487,30 +487,18 @@ $body-emphasis-color: $ouds-color-content-default-light !default; // OUDS
487487
//
488488
// Style anchor elements.
489489

490+
// scss-docs-start link-variables
490491
$link-color: $black !default; // OUDS mod
491492
$link-decoration: underline !default;
492493
$link-font-weight: $ouds-font-weight-strong !default;
493494
$link-shade-percentage: 20% !default;
494495
$link-hover-color: $primary !default; // OUDS mod
495-
$link-hover-decoration: $link-decoration !default;
496+
$link-hover-decoration: null !default;
497+
// scss-docs-end link-variables
496498

497499
$stretched-link-pseudo-element: after !default;
498500
$stretched-link-z-index: 1 !default;
499501

500-
// OUDS mod
501-
// $ouds-link-chevron-after-transform: rotate(.5turn) translateY(1px) !default;
502-
// End mod
503-
504-
// Icon links
505-
// $icon-link-gap: .3125rem !default; // OUDS mod: instead of `.375rem`
506-
// $icon-link-underline-offset: .25em !default;
507-
// $icon-link-icon-size: 1em !default;
508-
// scss-docs-start icon-link-variables
509-
// $icon-link-icon-transition: .2s ease-in-out transform !default;
510-
// $icon-link-icon-transform: translate3d(.25em, 0, 0) !default;
511-
// scss-docs-end icon-link-variables
512-
513-
514502
// Paragraphs
515503
//
516504
// Style p element.
@@ -2154,7 +2142,7 @@ $back-to-top-title-color: var(--#{$prefix}body-color) !default;
21542142
$back-to-top-title-bg-color: var(--#{$prefix}body-bg) !default;
21552143
$back-to-top-bg: var(--#{$prefix}highlight-color) !default;
21562144
$back-to-top-icon: var(--#{$prefix}chevron-icon) !default;
2157-
$back-to-top-icon-width: add(3rem, 1px) !default;
2145+
$back-to-top-icon-width: add(.5rem, 1px) !default;
21582146
$back-to-top-icon-height: subtract(1rem, 1px) !default;
21592147
// scss-docs-end back-to-top
21602148

site/assets/scss/_sidebar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
padding: .1875rem .5rem;
5252
margin-top: .125rem;
5353
margin-left: 1.375rem; // OUDS mod: changed value
54-
font-size: var(--#{$prefix}font-size-body-small); // OUDS mod: instead of `1rem`
54+
@include get-font-size("body-small");// OUDS mod: instead of `1rem`
5555
font-weight: 400; // OUDS mod: no 'bold' for the sidebar links
5656
// OUDS mod: no `color`
5757
text-decoration: if($link-decoration == none, null, none);

site/assets/scss/_toc.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
a {
2828
display: block;
2929
padding: $ouds-space-fixed-shortest 0 $ouds-space-fixed-shortest $ouds-space-fixed-medium; // OUDS mod
30-
font-size: var(--#{$prefix}font-size-body-small); // OUDS mod: instead of `1rem`
30+
@include get-font-size("body-small"); // OUDS mod: instead of `1rem`
3131
font-weight: 400; // OUDS mod: no 'bold' for the sidebar links
3232
color: inherit;
3333
text-decoration: none;

site/content/docs/0.1/components/links.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@ Visited links don't have a specific style by default. The `:visited` status can
2222
</div>
2323
{{< /example >}}
2424

25+
The `.link` class is intended to be used in conjunction with our link variants used to display chevron or icon, or to serve as a basis for your own custom styles.
26+
27+
## Variants on colored background
28+
29+
OUDS Web offers a few variations to use on [colored backgrounds]({{< docsref "/utilities/background#colored-background" >}}). Their accessibility (readability) is ensured by suitable semi-opaque backgrounds.
30+
31+
{{< callout warning >}}
32+
**Heads up!**
33+
- Background utilities used to make colored backgrounds, should always be used with the appropriate color theme (see an example below). Please refer to [backgrounds documentation]({{< docsref "/utilities/background/#data-bs-theme-attribute" >}})
34+
{{< /callout >}}
35+
2536
{{< example class="p-none">}}
2637
<div class="bg-brand-primary p-tall">
2738
<div data-bs-theme="light">
@@ -43,15 +54,13 @@ Visited links don't have a specific style by default. The `:visited` status can
4354
</div>
4455
{{< /example >}}
4556

46-
The `.link` class is intended to be used in conjunction with our link variants used to display chevron or icon, or to serve as a basis for your own custom styles.
47-
4857
## Link chevron
4958

5059
Add `.link-chevron` to enhance your link with a chevron on the right side. Use the additional `.back` class to display the chevron on the left side.
5160

5261
{{< example >}}
5362
<div><a class="link link-chevron" href="#">This is an example of a link with chevron</a></div>
54-
<div><a class="link link-chevron back" href="#">This is an example of a link with chevron</a></div>
63+
<div><a class="link link-chevron back" href="#">This is an example of a link with a back chevron</a></div>
5564
{{< /example >}}
5665

5766
## Icon link
@@ -88,6 +97,20 @@ Add `.icon-link-hover` to move the icon to the right on hover.
8897
{{< /example >}}
8998
{{< /bootstrap-compatibility >}}
9099

100+
## CSS
101+
102+
### Variables
103+
104+
As part of OUDS Web's evolving CSS variables approach, links use local CSS variables on `.link` for enhanced real-time customization. Values for the CSS variables are set via Sass, so Sass customization is still supported too.
105+
106+
{{< scss-docs name="link-css-vars" file="scss/_links.scss" >}}
107+
108+
Each `.link-*` modifier class updates the appropriate CSS variables to minimize additional CSS rules.
109+
110+
### Sass variables
111+
112+
{{< scss-docs name="link-variables" file="scss/_variables.scss" >}}
113+
91114
### Component tokens
92115

93116
{{< scss-docs name="ouds-component-link" file="scss/tokens/_component.scss" >}}

0 commit comments

Comments
 (0)