-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Refactor Link component to use CSS modules using the feature flag `primer_react_css_modules` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.Link { | ||
color: var(--fgColor-accent); | ||
text-decoration: none; | ||
|
||
/* Reset for button tags */ | ||
&:is(button) { | ||
display: inline-block; | ||
padding: 0; | ||
font-size: inherit; | ||
white-space: nowrap; | ||
cursor: pointer; | ||
user-select: none; | ||
background-color: transparent; | ||
border: 0; | ||
appearance: none; | ||
} | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
/* Deprecated: but need to support backwards compatibility */ | ||
&[data-underline='true'], | ||
/* | ||
Inline links (inside a text block), however, should have underline based on accessibility setting set in data-attribute | ||
Note: setting underline={false} does not override this | ||
*/ | ||
[data-a11y-link-underlines='true'] &[data-inline='true'] { | ||
text-decoration: underline; | ||
} | ||
|
||
&[data-muted='true'] { | ||
color: var(--fgColor-muted); | ||
|
||
&:hover { | ||
color: var(--fgColor-accent); | ||
text-decoration: none; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters