Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: Replacing bottom border styles with text decoration underline.",
"packageName": "@fluentui/react-link",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,14 @@ export const linkClassNames: SlotClassNames<LinkSlots> = {

const useStyles = makeStyles({
focusIndicator: createCustomFocusIndicatorStyle({
borderBottomColor: 'transparent',
textDecorationColor: tokens.colorStrokeFocus2,
textDecorationLine: 'underline',
textDecorationStyle: 'double',
}),
// Common styles.
root: {
backgroundColor: 'transparent',
borderTopStyle: 'none',
borderLeftStyle: 'none',
borderRightStyle: 'none',
borderBottomColor: 'transparent',
borderBottomStyle: 'solid',
borderBottomWidth: tokens.strokeWidthThin,
...shorthands.borderStyle('none'),
boxSizing: 'border-box',
color: tokens.colorBrandForegroundLink,
cursor: 'pointer',
Expand All @@ -35,17 +29,19 @@ const useStyles = makeStyles({
...shorthands.padding(0),
...shorthands.overflow('inherit'),
textAlign: 'left',
textDecorationLine: 'none',
textDecorationColor: 'transparent',
textDecorationLine: 'underline',
textDecorationThickness: tokens.strokeWidthThin,
textOverflow: 'inherit',
userSelect: 'text',

':hover': {
borderBottomColor: tokens.colorBrandForegroundLinkHover,
textDecorationColor: tokens.colorBrandForegroundLinkHover,
color: tokens.colorBrandForegroundLinkHover,
},

':active': {
borderBottomColor: tokens.colorBrandForegroundLinkPressed,
textDecorationColor: tokens.colorBrandForegroundLinkPressed,
color: tokens.colorBrandForegroundLinkPressed,
},
},
Expand All @@ -58,36 +54,36 @@ const useStyles = makeStyles({
color: tokens.colorNeutralForeground2,

':hover': {
borderBottomColor: tokens.colorNeutralForeground2Hover,
textDecorationColor: tokens.colorNeutralForeground2Hover,
color: tokens.colorNeutralForeground2Hover,
},

':active': {
borderBottomColor: tokens.colorNeutralForeground2Pressed,
textDecorationColor: tokens.colorNeutralForeground2Pressed,
color: tokens.colorNeutralForeground2Pressed,
},
},
// Overrides when the Link is rendered inline within text.
inline: {
borderBottomColor: tokens.colorBrandForegroundLink,
textDecorationColor: tokens.colorBrandForegroundLink,
},
// Overrides when the Link is rendered inline within text and appears subtle.
inlineSubtle: {
borderBottomColor: tokens.colorNeutralForeground2,
},
// Overrides when the Link is disabled.
disabled: {
borderBottomColor: 'transparent',
textDecorationColor: 'transparent',
color: tokens.colorNeutralForegroundDisabled,
cursor: 'not-allowed',

':hover': {
borderBottomColor: 'transparent',
textDecorationColor: 'transparent',
color: tokens.colorNeutralForegroundDisabled,
},

':active': {
borderBottomColor: 'transparent',
textDecorationColor: 'transparent',
color: tokens.colorNeutralForegroundDisabled,
},
},
Expand Down