Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not force hsl and use tailwindcss theme colors whenever possible #185

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 41 additions & 38 deletions apps/www/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,70 @@

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;
--background: theme(colors.white);
--foreground: theme(colors.slate.900);

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--muted: theme(colors.slate.100);
--muted-foreground: theme(colors.slate.500);

--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--popover: theme(colors.white);
--popover-foreground: theme(colors.slate.900);

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--card: theme(colors.white);
--card-foreground: theme(colors.slate.900);

--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--border: theme(colors.slate.200);
--input: theme(colors.slate.200);

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--primary: theme(colors.slate.900);
--primary-foreground: theme(colors.slate.50);

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--secondary: theme(colors.slate.100);
--secondary-foreground: theme(colors.slate.900);

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--accent: theme(colors.slate.100);
--accent-foreground: theme(colors.slate.900);

--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--destructive: red;
--destructive-foreground: theme(colors.slate.50);

--ring: 215 20.2% 65.1%;
--ring: theme(colors.slate.400);

--radius: 0.5rem;
}

.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--background: theme(colors.gray.950);
/* Similar to theme(colors.gray.200) */
--foreground: hsl(213 31% 91%);

--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
/* Similar to theme(colors.slate.200) */
--muted: hsl(223 47% 11%);
--muted-foreground: hsl(215.4 16.3% 56.9%);

--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--popover: theme(colors.gray.950);
--popover-foreground: theme(colors.slate.400);

--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--card: theme(colors.white);
--card-foreground: theme(colors.slate.900);

--border: 216 34% 17%;
--input: 216 34% 17%;
--border: theme(colors.slate.800);
--input: theme(colors.slate.800);

--card: 224 71% 4%;
--card-foreground: 213 31% 91%;
--primary: theme(colors.slate.50);
/* Slightly off-black */
--primary-foreground: hsl(222.2 47.4% 1.2%);

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--secondary: theme(colors.slate.900);
--secondary-foreground: theme(colors.slate.50);

--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--accent: theme(colors.slate.800);
--accent-foreground: theme(colors.slate.50);

--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--destructive: hsl(0 63% 31%);
--destructive-foreground: theme(colors.slate.50);

--ring: 216 34% 17%;
--ring: theme(colors.slate.800);

--radius: 0.5rem;
}
Expand Down
79 changes: 41 additions & 38 deletions templates/next-template/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,70 @@

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 47.4% 11.2%;
--background: theme(colors.white);
--foreground: theme(colors.slate.900);

--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--muted: theme(colors.slate.100);
--muted-foreground: theme(colors.slate.500);

--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--popover: theme(colors.white);
--popover-foreground: theme(colors.slate.900);

--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--card: theme(colors.white);
--card-foreground: theme(colors.slate.900);

--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--border: theme(colors.slate.200);
--input: theme(colors.slate.200);

--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--primary: theme(colors.slate.900);
--primary-foreground: theme(colors.slate.50);

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--secondary: theme(colors.slate.100);
--secondary-foreground: theme(colors.slate.900);

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--accent: theme(colors.slate.100);
--accent-foreground: theme(colors.slate.900);

--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--destructive: red;
--destructive-foreground: theme(colors.slate.50);

--ring: 215 20.2% 65.1%;
--ring: theme(colors.slate.400);

--radius: 0.5rem;
}

.dark {
--background: 224 71% 4%;
--foreground: 213 31% 91%;
--background: theme(colors.gray.950);
/* Similar to theme(colors.gray.200) */
--foreground: hsl(213 31% 91%);

--muted: 223 47% 11%;
--muted-foreground: 215.4 16.3% 56.9%;
/* Similar to theme(colors.slate.200) */
--muted: hsl(223 47% 11%);
--muted-foreground: hsl(215.4 16.3% 56.9%);

--accent: 216 34% 17%;
--accent-foreground: 210 40% 98%;
--popover: theme(colors.gray.950);
--popover-foreground: theme(colors.slate.400);

--popover: 224 71% 4%;
--popover-foreground: 215 20.2% 65.1%;
--card: theme(colors.white);
--card-foreground: theme(colors.slate.900);

--border: 216 34% 17%;
--input: 216 34% 17%;
--border: theme(colors.slate.800);
--input: theme(colors.slate.800);

--card: 224 71% 4%;
--card-foreground: 213 31% 91%;
--primary: theme(colors.slate.50);
/* Slightly off-black */
--primary-foreground: hsl(222.2 47.4% 1.2%);

--primary: 210 40% 98%;
--primary-foreground: 222.2 47.4% 1.2%;
--secondary: theme(colors.slate.900);
--secondary-foreground: theme(colors.slate.50);

--secondary: 222.2 47.4% 11.2%;
--secondary-foreground: 210 40% 98%;
--accent: theme(colors.slate.800);
--accent-foreground: theme(colors.slate.50);

--destructive: 0 63% 31%;
--destructive-foreground: 210 40% 98%;
--destructive: hsl(0 63% 31%);
--destructive-foreground: theme(colors.slate.50);

--ring: 216 34% 17%;
--ring: theme(colors.slate.800);

--radius: 0.5rem;
}
Expand Down
38 changes: 19 additions & 19 deletions templates/next-template/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,38 @@ module.exports = {
},
extend: {
colors: {
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
border: "var(--border)",
input: "var(--input)",
ring: "var(--ring)",
background: "var(--background)",
foreground: "var(--foreground)",
primary: {
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
DEFAULT: "var(--primary)",
foreground: "var(--primary-foreground)",
},
secondary: {
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
DEFAULT: "var(--secondary)",
foreground: "var(--secondary-foreground)",
},
destructive: {
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
DEFAULT: "var(--destructive)",
foreground: "var(--destructive-foreground)",
},
muted: {
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
DEFAULT: "var(--muted)",
foreground: "var(--muted-foreground)",
},
accent: {
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
DEFAULT: "var(--accent)",
foreground: "var(--accent-foreground)",
},
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
DEFAULT: "var(--popover)",
foreground: "var(--popover-foreground)",
},
card: {
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
DEFAULT: "var(--card)",
foreground: "var(--card-foreground)",
},
},
borderRadius: {
Expand Down