mirror of
https://github.com/glitch-soc/mastodon.git
synced 2026-03-29 03:00:33 +02:00
Deprecate need for revert-layer CSS (#37632)
This commit is contained in:
@@ -13,6 +13,7 @@ interface Props extends React.SVGProps<SVGSVGElement> {
|
|||||||
children?: never;
|
children?: never;
|
||||||
id: string;
|
id: string;
|
||||||
icon: IconProp;
|
icon: IconProp;
|
||||||
|
noFill?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Icon: React.FC<Props> = ({
|
export const Icon: React.FC<Props> = ({
|
||||||
@@ -20,6 +21,7 @@ export const Icon: React.FC<Props> = ({
|
|||||||
icon: IconComponent,
|
icon: IconComponent,
|
||||||
className,
|
className,
|
||||||
'aria-label': ariaLabel,
|
'aria-label': ariaLabel,
|
||||||
|
noFill = false,
|
||||||
...other
|
...other
|
||||||
}) => {
|
}) => {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
@@ -42,7 +44,12 @@ export const Icon: React.FC<Props> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<IconComponent
|
<IconComponent
|
||||||
className={classNames('icon', `icon-${id}`, className)}
|
className={classNames(
|
||||||
|
'icon',
|
||||||
|
`icon-${id}`,
|
||||||
|
noFill && 'icon--no-fill',
|
||||||
|
className,
|
||||||
|
)}
|
||||||
title={title}
|
title={title}
|
||||||
aria-hidden={ariaHidden}
|
aria-hidden={ariaHidden}
|
||||||
aria-label={ariaLabel}
|
aria-label={ariaLabel}
|
||||||
|
|||||||
@@ -37,7 +37,12 @@ export const AccountBadges: FC<{ accountId: string }> = ({ accountId }) => {
|
|||||||
let icon: ReactNode = undefined;
|
let icon: ReactNode = undefined;
|
||||||
if (isAdminBadge(role)) {
|
if (isAdminBadge(role)) {
|
||||||
icon = (
|
icon = (
|
||||||
<Icon icon={IconAdmin} id='badge-admin' className={classes.badgeIcon} />
|
<Icon
|
||||||
|
icon={IconAdmin}
|
||||||
|
id='badge-admin'
|
||||||
|
className={classes.badgeIcon}
|
||||||
|
noFill
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
badges.push(
|
badges.push(
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ const RedesignAccountHeaderFields: FC<{ account: Account }> = ({ account }) => {
|
|||||||
id='verified'
|
id='verified'
|
||||||
icon={IconVerified}
|
icon={IconVerified}
|
||||||
className={classes.fieldIconVerified}
|
className={classes.fieldIconVerified}
|
||||||
|
noFill
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ export const AccountFieldsModal: FC<{
|
|||||||
id='verified'
|
id='verified'
|
||||||
icon={IconVerified}
|
icon={IconVerified}
|
||||||
className={classes.fieldIconVerified}
|
className={classes.fieldIconVerified}
|
||||||
|
noFill
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -53,11 +53,6 @@ h1.name > small {
|
|||||||
|
|
||||||
svg.badgeIcon {
|
svg.badgeIcon {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
fill: revert-layer;
|
|
||||||
|
|
||||||
path {
|
|
||||||
fill: revert-layer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fieldList {
|
.fieldList {
|
||||||
@@ -90,11 +85,6 @@ svg.badgeIcon {
|
|||||||
.fieldIconVerified {
|
.fieldIconVerified {
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
|
|
||||||
// Need to override .icon path.
|
|
||||||
path {
|
|
||||||
fill: revert-layer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fieldNumbersWrapper {
|
.fieldNumbersWrapper {
|
||||||
|
|||||||
@@ -275,7 +275,7 @@
|
|||||||
height: 24px;
|
height: 24px;
|
||||||
aspect-ratio: 1;
|
aspect-ratio: 1;
|
||||||
|
|
||||||
path {
|
&:not(.icon--no-fill) path {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user