Skip to content

Commit

Permalink
feat(a11y/contrast): added different contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
egordidenko committed Aug 26, 2024
1 parent c91b6d8 commit 9038963
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
40 changes: 40 additions & 0 deletions blocks/themes/uc-basic/a11y.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
:where(.uc-a11y-large) {
--uc-font-size: 20px;
--uc-simple-btn-font-size: 20px;
}

:where(.uc-a11y-medium) {
--uc-font-size: 18px;
--uc-simple-btn-font-size: 18px;
}

:where(.uc-monochrome) {
--uc-background-light: oklch(100% 0 0);
--uc-background-dark: oklch(0% 0 0);
--uc-foreground-light: oklch(0% 0 0);
--uc-foreground-dark: oklch(100% 0 0);
--uc-primary-light: oklch(10% 0 0);
--uc-primary-dark: oklch(90% 0 0);
--uc-border-light: oklch(0% 0 0);
--uc-border-dark: oklch(100% 0 0);
}

:where(.uc-high-contrast-cinnamon-light) {
--uc-background-light: oklch(40% 0.1 30);
--uc-foreground-light: oklch(100% 0 0);
--uc-primary-light: oklch(59% 0.4 264);
--uc-primary-hover-light: oklch(59% 0.4 264 / 90%);
--uc-secondary-light: oklch(100% 0 0 / 0.1);
--uc-muted-light: oklch(90% 0 0);
--uc-border-light: oklch(100% 0 0);
}

:where(.uc-high-contrast-green-light) {
--uc-background-light: oklch(60% 0.25 130);
--uc-foreground-light: oklch(0% 0 0);
--uc-primary-light: oklch(59% 0.4 30);
--uc-primary-hover-light: oklch(59% 0.4 30 / 90%);
--uc-secondary-light: oklch(0% 0 0 / 0.05);
--uc-muted-light: oklch(95% 0 0);
--uc-border-light: oklch(0% 0 0);
}
3 changes: 3 additions & 0 deletions blocks/themes/uc-basic/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@

/* POST RESET */
@import url('post-reset.css');

/* A11Y */
@import url('a11y.css');
10 changes: 0 additions & 10 deletions blocks/themes/uc-basic/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,3 @@
--uc-primary-oklch-light: 10% 0 0;
--uc-primary-oklch-dark: 97% 0 0;
}

:where(.uc-a11y-large) {
--uc-font-size: 20px;
--uc-simple-btn-font-size: 20px;
}

:where(.uc-a11y-medium) {
--uc-font-size: 18px;
--uc-simple-btn-font-size: 18px;
}

0 comments on commit 9038963

Please sign in to comment.