Files
freeCodeCamp/tools/ui-components/src/colors.css
Maciek Sitkowski 58701d511b feat(tools): add Alert component (#43835)
* feat(alert): initialize component

* feat(alert): add children prop

* feat(alert): add className prop

* feat(alert): add variant prop

* feat(alert): add close button and handle onDismiss click

* feat(alert): place all alert related css in alert.css

* feat: define state color variables and use them instead of bootstrap ones

* chore: remove unused classes

* feat: replace base alert styles with tailwind classes

* feat: extract close button to separate component

* chore: remove unused css

* test: add close button tests

* refactor: use more tailwind-like approach for adding colors to theme

* refactor: use more expressive prop name for close button label

* refactor: use semantic color names

* feat: add stories with/without close button

* chore: add missing variants
2021-11-27 12:28:40 +03:00

68 lines
1.5 KiB
CSS

:root {
--gray00: #ffffff;
--gray05: #f5f6f7;
--gray10: #dfdfe2;
--gray15: #d0d0d5;
--gray45: #858591;
--gray75: #3b3b4f;
--gray80: #2a2a40;
--gray85: #1b1b32;
--gray90: #0a0a23;
--purple10: #dbb8ff;
--purple50: #9400d3;
--purple90: #5a01a7;
--yellow05: #fcf8e3;
--yellow10: #faebcc;
--yellow40: #ffc300;
--yellow45: #ffbf00;
--yellow50: #f1be32;
--yellow70: #8a6d3b;
--yellow90: #4d3800;
--blue05: #d9edf7;
--blue10: #bce8f1;
--blue30: #99c9ff;
--blue50: #198eee;
--blue70: #31708f;
--blue90: #002ead;
--green05: #dff0d8;
--green10: #d6e9c6;
--green40: #acd157;
--green70: #3c763d;
--green90: #00471b;
--red05: #f2dede;
--red10: #ebccd1;
--red15: #ffadad;
--red30: #f8577c;
--red70: #a94442;
--red80: #f82153;
--red90: #850000;
}
html,
div.light {
--default-foreground-primary: var(--gray90);
--default-foreground-secondary: var(--gray85);
--default-foreground-tertiary: var(--gray80);
--default-foreground-quaternary: var(--gray75);
--default-background-primary: var(--gray00);
--default-background-secondary: var(--gray05);
--default-background-tertiary: var(--gray10);
--default-background-quaternary: var(--gray15);
}
html.dark,
div.dark {
--default-foreground-primary: var(--gray00);
--default-foreground-secondary: var(--gray05);
--default-foreground-quaternary: var(--gray15);
--default-background-primary: var(--gray90);
--default-background-secondary: var(--gray85);
--default-background-tertiary: var(--gray80);
--default-background-quaternary: var(--gray75);
}