Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make text links underlined by default #577 #580

Merged
merged 2 commits into from
Dec 6, 2024
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
9 changes: 3 additions & 6 deletions src/components/Alert/Alert.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
padding: theme.$padding;
}

.close,
.icon {
.icon,
.close {
height: settings.$min-height;
color: var(--rui-local-foreground-color);
}
Expand All @@ -46,11 +46,8 @@
line-height: settings.$line-height;
}

.message :is(a, strong) {
font-weight: theme.$emphasis-font-weight;
}

.message strong {
font-weight: theme.$emphasis-font-weight;
color: var(--rui-local-foreground-color);
}

Expand Down
16 changes: 8 additions & 8 deletions src/components/Alert/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ helps to improve its accessibility.

### Common Theming Options

| Custom Property | Description |
|------------------------------------------------------|--------------------------------------------------------------|
| `--rui-Alert__padding` | Padding between border and message |
| `--rui-Alert__font-weight` | Message font weight |
| `--rui-Alert__border-width` | Border width |
| `--rui-Alert__border-radius` | Corner radius |
| `--rui-Alert__emphasis__font-weight` | Font weight of text emphasised with `<strong>` |
| `--rui-Alert__stripe__width` | Width of the border at the start of the Alert |
| Custom Property | Description |
|--------------------------------------|------------------------------------------------|
| `--rui-Alert__padding` | Padding between border and message |
| `--rui-Alert__font-weight` | Message font weight |
| `--rui-Alert__border-width` | Border width |
| `--rui-Alert__border-radius` | Corner radius |
| `--rui-Alert__emphasis__font-weight` | Font weight of text emphasised with `<strong>` |
| `--rui-Alert__stripe__width` | Width of the border at the start of the Alert |

### Theming Variants

Expand Down
1 change: 1 addition & 0 deletions src/styles/elements/_links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

a {
text-decoration: links.$decoration;
text-underline-offset: links.$underline-offset;
color: links.$color;

&:hover {
Expand Down
1 change: 1 addition & 0 deletions src/styles/theme/_links.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
$color: var(--rui-local-link-color, var(--rui-color-text-link));
$decoration: var(--rui-text-decoration-link);
$underline-offset: var(--rui-underline-offset-link);
$hover-color: var(--rui-local-link-color-hover, var(--rui-color-text-link-hover));
$hover-decoration: var(--rui-text-decoration-link-hover);
$active-color: var(--rui-local-link-color-active, var(--rui-color-text-link-active));
Expand Down
3 changes: 2 additions & 1 deletion src/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
--rui-line-height-small: 1.25;

// Text decorations
--rui-text-decoration-link: none;
--rui-underline-offset-link: 0.1875em;
--rui-text-decoration-link: underline;
--rui-text-decoration-link-hover: underline;
--rui-text-decoration-link-active: underline;

Expand Down