File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
components/src/offerwall/components/install-required Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change 6161 border-radius : var (--Radius-Moderate-rounding );
6262
6363 background : var (--accent-color );
64+ /* contrast-color() is unreliable in Chrome shadow DOM; approximate with OKLCH:
65+ https://css-tricks.com/approximating-contrast-color-with-other-css-features/ */
6466 color : white;
65- color : contrast-color ( var (--accent-color ));
67+ color : oklch (from var (--accent-color ) round ( 1.21 - L) 0 0 );
6668}
6769
6870.step-icon {
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import iconWallet from '@c/assets/icon_wallet.svg?raw'
66import iconClose from '@c/assets/icon_x_close.svg?raw'
77import { PoweredByInterledger } from '@c/shared/powered-by-interledger'
88import { WebMonetizationHeader } from '@c/shared/web-monetization-header'
9- import { getContrastColor } from '@c/utils'
109import { getExtensionHref } from '@shared/utils/extension'
1110import styles from './install-required.css?raw'
1211import styleTokens from '../../vars.css?raw'
@@ -90,13 +89,6 @@ export class InstallRequired extends LitElement {
9089 `
9190 }
9291
93- firstUpdated ( ) : void {
94- if ( ! CSS . supports ( 'color: contrast-color(black)' ) ) {
95- const el = this . renderRoot . querySelector < HTMLAnchorElement > ( 'a.button' ) !
96- el . style . color = getContrastColor ( getComputedStyle ( el ) . backgroundColor )
97- }
98- }
99-
10092 get extensionUrl ( ) : string {
10193 return getExtensionHref ( 'offerwall' )
10294 }
You can’t perform that action at this time.
0 commit comments