Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 8206cfd

Browse files
feat: add drr to check contrast
1 parent dd442e4 commit 8206cfd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

studio/src/app/components/editor/app-slide-contrast/app-slide-contrast.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,9 @@ export class AppSlideContrast {
5757
}
5858

5959
const slots: NodeListOf<HTMLElement> = slide.querySelectorAll(
60-
'[slot="title"]:not(:empty),[slot="content"]:not(:empty),[slot="start"]:not(:empty),[slot="end"]:not(:empty),[slot="header"]:not(:empty),[slot="footer"]:not(:empty),[slot="author"]:not(:empty)'
60+
'[slot="title"]:not(:empty),[slot="content"]:not(:empty),[slot="start"]:not(:empty),[slot="end"]:not(:empty),[slot="header"]:not(:empty),[slot="footer"]:not(:empty),[slot="author"]:not(:empty),deckgo-drr > section:not(:empty)'
6161
);
6262

63-
// TODO drr
64-
// const slots: NodeListOf<HTMLElement> = slide.querySelectorAll('[slot="title"],[slot="content"],[slot="start"],[slot="end"],[slot="header"],[slot="footer"],deckgo-drr');
65-
6663
if (!slots || slots.length <= 0) {
6764
return false;
6865
}
@@ -103,6 +100,8 @@ export class AppSlideContrast {
103100
const bgColor = await NodeUtils.findColors(element, 'background', deck, slide);
104101
const color = await NodeUtils.findColors(element, 'color', deck, slide);
105102

103+
console.log('yo', bgColor, color);
104+
106105
return ContrastUtils.calculateContrastRatio(bgColor, color);
107106
}
108107

0 commit comments

Comments
 (0)