Skip to content
Open
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
13 changes: 13 additions & 0 deletions .changeset/old-bears-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@primer/brand-primitives': patch
'@primer/react-brand': patch
---

Remove the hover text-decoration transition in `InlineLink`, `Accordion`, `Timeline` and align `Prose` with the updated `InlineLink` styles
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @stamat.

On the off-chance that someone was relying on that downstream, let's provide a migration path:

- var(--brand-InlineLink-transition-timing)
+ var(--brand-animation-duration-fast)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Remove the hover text-decoration transition in `InlineLink`, `Accordion`, `Timeline` and align `Prose` with the updated `InlineLink` styles
Removed a redundant hover text-decoration transition in `InlineLink`, `Accordion`, `Timeline` and align `Prose`.
Also removed the following css variable: `--brand-InlineLink-transition-timing`. If you were using this variable, please use `--brand-animation-duration-fast` instead.


In case you were using `var(--brand-InlineLink-transition-timing)` variable please migrate to `var(--brand-animation-duration-fast)`

```diff
- var(--brand-InlineLink-transition-timing)
+ var(--brand-animation-duration-fast)
```

This file was deleted.

1 change: 0 additions & 1 deletion packages/react/src/Accordion/Accordion.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ details[open] > .Accordion__summary.Accordion__summary--default .Accordion__summ
text-decoration-color: var(--brand-InlineLink-color-rest);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stamat i think removing this has caused a visual regression. As you're trying to remove the transition, i'm guessing it's unintentional. Could we restore it please?

text-decoration-thickness: var(--brand-borderWidth-thin);
text-underline-position: under;
transition: var(--brand-InlineLink-transition-timing) text-decoration;
}

.Accordion__content a:hover {
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/InlineLink/InlineLink.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
text-decoration-color: var(--brand-InlineLink-color-rest);
text-decoration-thickness: var(--brand-borderWidth-thin);
text-underline-position: under;
transition: var(--brand-InlineLink-transition-timing) text-decoration;
}

.InlineLink:hover {
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/InlineLink/InlineLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {BaseProps} from '../component-helpers'
* Design tokens
*/
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/inline-link/colors-with-modes.css'
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/inline-link/base.css'

/**
* Main stylesheet (as a CSS Module)
Expand Down
28 changes: 7 additions & 21 deletions packages/react/src/Prose/Prose.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,33 +184,19 @@

.Prose a {
color: var(--brand-InlineLink-color-rest);
text-decoration: none;
position: relative;
text-decoration: underline;
text-decoration-color: var(--brand-InlineLink-color-rest);
text-decoration-thickness: var(--brand-borderWidth-thin);
text-underline-position: under;
}

.Prose a:hover {
text-decoration: none;
text-decoration-thickness: var(--brand-borderWidth-thick);
}

.Prose a::after {
content: '';
border-bottom: var(--brand-borderWidth-thin) solid var(--brand-InlineLink-color-rest);
height: 0;
transition: var(--brand-InlineLink-transition-timing) transform;
transform: scaleY(var(--brand-InlineLink-transition-scale-start));
transform-origin: 50% 100%;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
}

.Prose a:hover::after {
transform: scaleY(var(--brand-InlineLink-transition-scale-end));
}

.Prose a:active::after {
border-color: var(--brand-InlineLink-color-pressed);
.Prose a:active {
color: var(--brand-InlineLink-color-pressed);
}

.Prose code {
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/Prose/Prose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type {BaseProps} from '../component-helpers'
import styles from './Prose.module.css'
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/prose/base.css'
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/prose/colors-with-modes.css'
import '@primer/brand-primitives/lib/design-tokens/css/tokens/functional/components/inline-link/base.css'

export type ProseProps = {
/**
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/Timeline/Timeline.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
text-decoration-color: var(--brand-InlineLink-color-rest);
text-decoration-thickness: var(--brand-borderWidth-thin);
text-underline-position: under;
transition: var(--brand-InlineLink-transition-timing) text-decoration;
}

.Timeline__item a:hover {
Expand Down
Loading