= ({ hue }) => {
);
};
+const GradientSection: React.FC = () => {
+ return (
+
+
+
+
+ {
+ gradientsNames.map((gradient) => (
+
+ ))
+ }
+
+
+
+ )
+}
+
const ColorDocs: React.FC = () => {
return (
-
- {colors.map((hue) => (
-
- ))}
-
+ <>
+ Colors
+ Each hue has 20 shades, denoted by numbers from 1 (lightest) - 99 (darkest). The middle shade (55) is compliant for accessibile text and can be used with either black or white on foregrounds or backgrounds.
+
Usage: color: var(--mdhui-[hue]-[shade])
Example: color: var(--mdhui-blue-40)
+
+
+ {colors.map((hue) => (
+
+ ))}
+
+
+ >
);
};
From ee1776e4e47f2ba1a87d83dd9f277587aa4af5eb Mon Sep 17 00:00:00 2001
From: Dylan Box <487275+dylanbox@users.noreply.github.com>
Date: Wed, 18 Sep 2024 12:15:16 -0400
Subject: [PATCH 3/3] Update: Add both normal and dark gradients
---
src/helpers/globalCss.ts | 30 ++++++++++++++++++----------
src/stories/foundation/colorDocs.css | 1 +
src/stories/foundation/colorDocs.tsx | 25 ++++++++++++++++-------
3 files changed, 39 insertions(+), 17 deletions(-)
diff --git a/src/helpers/globalCss.ts b/src/helpers/globalCss.ts
index d4033d5db..54ec05648 100644
--- a/src/helpers/globalCss.ts
+++ b/src/helpers/globalCss.ts
@@ -523,16 +523,26 @@ export const core = css`
--mdhui-cyan-99: var(--mdhui-cyan-99-base);
/* Gradients */
- --mdhui-gradient-alpine-overlook: linear-gradient(180deg, rgba(12, 100, 235), rgba(76, 152, 207));
- --mdhui-gradient-tropical-mist: linear-gradient(180deg, rgba(76, 145, 248), rgba(35, 164, 130));
- --mdhui-gradient-summit-sunset: linear-gradient(180deg, rgba(207, 94, 255), rgba(230, 107, 111));
- --mdhui-gradient-cold-front: linear-gradient(180deg, rgba(143, 130, 246), rgba(230, 107, 111));
- --mdhui-gradient-summer-solstice: linear-gradient(180deg, rgba(255, 146, 41), rgba(143, 130, 246));
- --mdhui-gradient-high-noon: linear-gradient(180deg, rgba(236, 108, 5), rgba(206, 44, 50));
- --mdhui-gradient-midnight-moon: linear-gradient(180deg, rgba(207, 94, 255), rgba(102, 83, 240));
- --mdhui-gradient-open-horizon: linear-gradient(180deg, rgba(76, 145, 248), rgba(207, 94, 255));
- --mdhui-gradient-early-bird: linear-gradient(180deg, rgba(34, 159, 185), rgba(143, 130, 246));
- --mdhui-gradient-evergreen-petrichor: linear-gradient(180deg, rgba(34, 159, 185), rgba(0, 123, 108));
+ --mdhui-gradient-alpine-overlook-dark: linear-gradient(180deg, rgba(12, 100, 235), rgba(76, 152, 207));
+ --mdhui-gradient-alpine-overlook: linear-gradient(180deg, rgba(117, 180, 225), rgba(246, 250, 253));
+ --mdhui-gradient-cold-front-dark: linear-gradient(180deg, rgba(143, 130, 246), rgba(230, 107, 111));
+ --mdhui-gradient-cold-front: linear-gradient(180deg, rgba(244, 215, 255), rgba(252, 217, 218));
+ --mdhui-gradient-early-bird-dark: linear-gradient(180deg, rgba(34, 159, 185), rgba(143, 130, 246));
+ --mdhui-gradient-early-bird: linear-gradient(180deg, rgba(199, 196, 255), rgba(255, 245, 156));
+ --mdhui-gradient-evergreen-petrichor-dark: linear-gradient(180deg, rgba(34, 159, 185), rgba(0, 123, 108));
+ --mdhui-gradient-evergreen-petrichor: linear-gradient(180deg, rgba(137, 218, 183), rgba(255, 248, 184));
+ --mdhui-gradient-high-noon-dark: linear-gradient(180deg, rgba(236, 108, 5), rgba(206, 44, 50));
+ --mdhui-gradient-high-noon: linear-gradient(180deg, rgba(255, 242, 128), rgba(255, 146, 40));
+ --mdhui-gradient-midnight-moon-dark: linear-gradient(180deg, rgba(207, 94, 255), rgba(102, 83, 240));
+ --mdhui-gradient-midnight-moon: linear-gradient(180deg, rgba(169, 163, 254), rgba(222, 221, 255));
+ --mdhui-gradient-open-horizon-dark: linear-gradient(180deg, rgba(76, 145, 248), rgba(207, 94, 255));
+ --mdhui-gradient-open-horizon: linear-gradient(180deg, rgba(117, 180, 225), rgba(252, 217, 218));
+ --mdhui-gradient-summer-solstice-dark: linear-gradient(180deg, rgba(255, 146, 41), rgba(143, 130, 246));
+ --mdhui-gradient-summer-solstice: linear-gradient(180deg, rgba(255, 146, 40), rgba(199, 196, 255));
+ --mdhui-gradient-summit-sunset-dark: linear-gradient(180deg, rgba(207, 94, 255), rgba(230, 107, 111));
+ --mdhui-gradient-summit-sunset: linear-gradient(180deg, rgba(244, 215, 255), rgba(246, 145, 148));
+ --mdhui-gradient-tropical-mist-dark: linear-gradient(180deg, rgba(76, 145, 248), rgba(35, 164, 130));
+ --mdhui-gradient-tropical-mist: linear-gradient(180deg, rgba(117, 180, 225), rgba(137, 218, 183));
}`;
export const lightColorScheme = css`
diff --git a/src/stories/foundation/colorDocs.css b/src/stories/foundation/colorDocs.css
index a53056b44..07b98afd7 100644
--- a/src/stories/foundation/colorDocs.css
+++ b/src/stories/foundation/colorDocs.css
@@ -14,6 +14,7 @@
.colorCell .shade {
color: var(--mdhui-grey-99);
+ font-size: 12px;
}
.colorRow {
diff --git a/src/stories/foundation/colorDocs.tsx b/src/stories/foundation/colorDocs.tsx
index 6d21fb17a..eedf16970 100644
--- a/src/stories/foundation/colorDocs.tsx
+++ b/src/stories/foundation/colorDocs.tsx
@@ -19,15 +19,25 @@ const shades = [1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 55, 60, 70, 80, 90, 95, 96, 9
const gradientsNames: string[] = [
'alpine-overlook',
+ 'alpine-overlook-dark',
'tropical-mist',
+ 'tropical-mist-dark',
'summit-sunset',
+ 'summit-sunset-dark',
'cold-front',
+ 'cold-front-dark',
'summer-solstice',
+ 'summer-solstice-dark',
'high-noon',
+ 'high-noon-dark',
'midnight-moon',
+ 'midnight-moon-dark',
'open-horizon',
+ 'open-horizon-dark',
'early-bird',
- 'evergreen-petrichor ',
+ 'early-bird-dark',
+ 'evergreen-petrichor',
+ 'evergreen-petrichor-dark',
]
interface ColorCellProps {
@@ -71,13 +81,14 @@ const ColorRow: React.FC = ({ hue }) => {
const GradientSection: React.FC = () => {
return (
+
+ Gradients
+
+ There are both regular and dark version of the gradients. The regular version is designed for black text on top, while the dark version is designed for white text on top.
+ var(--mdhui-gradient-##)
+
+
-
{
gradientsNames.map((gradient) => (