Skip to content

Commit

Permalink
feat: Blend ghost SquareAppIcon with luminosity in normal theme
Browse files Browse the repository at this point in the history
When using normal theme, the `screen` blend mode would make the icon
too difficult to be seen (not enough contrast with white background)

To fix this we want to use `luminosity` blend mode with 50% opacity in
normal theme

The behaviour is unchanged on inverted theme
  • Loading branch information
Ldoppea committed May 12, 2023
1 parent 8c16952 commit 9374e9b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion react/SquareAppIcon/index.jsx
Expand Up @@ -161,7 +161,12 @@ export const SquareAppIcon = ({
{letter.toUpperCase()}
</Typography>
) : (
<div className={styles['SquareAppIcon-icon-container']}>
<div
className={cx(styles['SquareAppIcon-icon-container'], {
[styles['SquareAppIcon-icon-container-normal']]:
theme === 'normal'
})}
>
<div
className={cx(
styles['onEnd'],
Expand Down
4 changes: 4 additions & 0 deletions react/SquareAppIcon/styles.styl
Expand Up @@ -36,6 +36,10 @@ $color = constants['color'] // hard-coded color, because the component is curren
mix-blend-mode screen
svg, img
filter saturate(0%)
.SquareAppIcon-icon-container-normal
mix-blend-mode luminosity
svg, img
opacity .5

.SquareAppIcon-wrapper-maintenance
.SquareAppIcon-icon-container
Expand Down

0 comments on commit 9374e9b

Please sign in to comment.