Deprecate need for revert-layer CSS (#37632)

This commit is contained in:
Echo 2026-01-27 15:45:35 +01:00 committed by GitHub
parent 9ea64fcb5a
commit 76ab866d93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 17 additions and 13 deletions

View File

@ -13,6 +13,7 @@ interface Props extends React.SVGProps<SVGSVGElement> {
children?: never;
id: string;
icon: IconProp;
noFill?: boolean;
}
export const Icon: React.FC<Props> = ({
@ -20,6 +21,7 @@ export const Icon: React.FC<Props> = ({
icon: IconComponent,
className,
'aria-label': ariaLabel,
noFill = false,
...other
}) => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
@ -42,7 +44,12 @@ export const Icon: React.FC<Props> = ({
return (
<IconComponent
className={classNames('icon', `icon-${id}`, className)}
className={classNames(
'icon',
`icon-${id}`,
noFill && 'icon--no-fill',
className,
)}
title={title}
aria-hidden={ariaHidden}
aria-label={ariaLabel}

View File

@ -37,7 +37,12 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => {
let icon: ReactNode = undefined;
if (isAdminBadge(role)) {
icon = (
<Icon icon={IconAdmin} id='badge-admin' className={classes.badgeIcon} />
<Icon
icon={IconAdmin}
id='badge-admin'
className={classes.badgeIcon}
noFill
/>
);
}
badges.push(

View File

@ -76,6 +76,7 @@ const RedesignAccountHeaderFields: FC<{ account: Account }> = ({ account }) => {
id='verified'
icon={IconVerified}
className={classes.fieldIconVerified}
noFill
/>
)}
</>

View File

@ -81,6 +81,7 @@ export const AccountFieldsModal: FC<{
id='verified'
icon={IconVerified}
className={classes.fieldIconVerified}
noFill
/>
)}
</dd>

View File

@ -53,11 +53,6 @@ h1.name > small {
svg.badgeIcon {
opacity: 1;
fill: revert-layer;
path {
fill: revert-layer;
}
}
.fieldList {
@ -90,11 +85,6 @@ svg.badgeIcon {
.fieldIconVerified {
width: 1rem;
height: 1rem;
// Need to override .icon path.
path {
fill: revert-layer;
}
}
.fieldNumbersWrapper {

View File

@ -275,7 +275,7 @@
height: 24px;
aspect-ratio: 1;
path {
&:not(.icon--no-fill) path {
fill: currentColor;
}
}