mirror of
https://github.com/ant-design/ant-design.git
synced 2026-02-09 02:49:18 +08:00
fix(Typography): button with href wrapped by Typography showing incorrect color and flickering outline on hover (#56619)
* style: The typography component is showing styling issues, including with the button component * style: refactor link styles for Button consistency * style: modify mixins.ts file * fix: reset border styles for Typography links * fix: link style conflicts with ant-btn in typography component * fix: link styles to avoid conflicts with Button component --------- Co-authored-by: 遇见同学 <1875694521@qq.com>
This commit is contained in:
@@ -54,12 +54,14 @@ export const getTitleStyles: GenerateStyle<TypographyToken, CSSObject> = (token)
|
||||
};
|
||||
|
||||
export const getLinkStyles: GenerateStyle<TypographyToken, CSSObject> = (token) => {
|
||||
const { componentCls } = token;
|
||||
const { componentCls, antCls } = token;
|
||||
const btnCls = `${antCls}-btn`;
|
||||
|
||||
return {
|
||||
'a&, a': {
|
||||
// fix issue: https://github.com/ant-design/ant-design/issues/56606
|
||||
// exclude ant-btn to avoid style conflicts with Button component when it renders as <a></a> tag (variant='link' with href)
|
||||
[`a&:not(${btnCls}), a:not(${btnCls})`]: {
|
||||
...operationUnit(token),
|
||||
userSelect: 'text',
|
||||
|
||||
[`&[disabled], &${componentCls}-disabled`]: {
|
||||
color: token.colorTextDisabled,
|
||||
|
||||
Reference in New Issue
Block a user