mirror of
https://github.com/mastodon/mastodon.git
synced 2026-02-04 04:51:52 +00:00
Deprecate need for revert-layer CSS (#37632)
This commit is contained in:
parent
9ea64fcb5a
commit
76ab866d93
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const RedesignAccountHeaderFields: FC<{ account: Account }> = ({ account }) => {
|
|||
id='verified'
|
||||
icon={IconVerified}
|
||||
className={classes.fieldIconVerified}
|
||||
noFill
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ export const AccountFieldsModal: FC<{
|
|||
id='verified'
|
||||
icon={IconVerified}
|
||||
className={classes.fieldIconVerified}
|
||||
noFill
|
||||
/>
|
||||
)}
|
||||
</dd>
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@
|
|||
height: 24px;
|
||||
aspect-ratio: 1;
|
||||
|
||||
path {
|
||||
&:not(.icon--no-fill) path {
|
||||
fill: currentColor;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user