Files
sweet/www/static/styles.css
T
bb23643779 feat: support tailwindcss v4 (#3054)
update /www and tailwind-plugin to support tailwind v4.

Thanks to the merge of #3034, the work of integrating and advancing
#2903 is promoted.

related #3034 
related #2903 

close #3056
close #2819

--patch-1 
based on review,

1. del compiler and make it more clean and simple,
2.  fix init tailwind part,
3. fix test tailwind part

--patch-2

1. fix the docs 
2. fix the docs of plugin and version

--patch-3
1. Addressed various maintenance tasks (chores)
2. Updated the Tailwind CSS plugin to align with this release. Generated
a fresh project using the updated init configuration and
3. deployed it via Deno Deploy EA. Deployment is functioning correctly.

--patch-4
Move postcss imports to Tailwind section in init script

--patch-5
Refactored Tailwind plugin type definitions by copying PluginOptions
properties from @tailwindcss/postcss and adding Fresh-specific exclude
option, while exporting types from package entrypoint for better
accessibility.

Test Project: https://fresh.fresh-press.deno.net/
Test Project Repository:
https://github.com/SisyphusZheng/fresh-tailwindv4
Test Plugin: https://jsr.io/@freshpress/fresh-plugin-tailwind@1.0.0

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2025-07-21 16:13:34 +02:00

100 lines
2.5 KiB
CSS

@import "tailwindcss";
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
@theme {
--color-fresh: hsl(50 100% 56%);
--color-fresh-green: hsl(142 71% 29%);
--color-background-primary: hsl(215deg 100% 100%);
--color-background-secondary: hsl(210 29% 97%);
--color-background-tertiary: hsl(207 33% 95%);
--color-foreground-primary: hsl(0 0% 9%);
--color-foreground-secondary: hsl(0 0% 23%);
--color-foreground-tertiary: hsl(0 0% 32%);
--color-foreground-quaternary: hsl(0 0% 42%);
}
@variant dark {
--color-fresh: hsl(50 100% 56%);
--color-fresh-green: hsl(142 71% 29%);
--color-background-primary: hsl(220deg 11% 11%);
--color-background-secondary: hsl(216deg 19% 18%);
--color-background-tertiary: hsl(216deg 27.7% 22%);
--color-foreground-primary: hsl(215deg 17% 99%);
--color-foreground-secondary: hsl(215deg 17% 83%);
--color-foreground-tertiary: hsl(215deg 17% 20%);
--color-foreground-quaternary: hsl(215deg 17% 10%);
--color-info: hsl(194 76% 41%);
}
html[data-theme="dark"]:root {
color: var(--color-foreground-primary);
background-color: var(--color-background-primary);
}
/* Scrollbar colors that look good on light and dark theme */
* {
scrollbar-color: hsl(0deg 0% 50% / 0.5) hsl(0 0% 50% / 0.1) !important;
}
@font-face {
font-family: Fixel;
font-style: normal;
src: url("/fonts/FixelVariable.woff2") format("woff2");
font-weight: 100 900;
font-display: swap;
}
@font-face {
font-family: Fixel;
font-style: italic;
src: url("/fonts/FixelVariableItalic.woff2") format("woff2");
font-weight: 100 900;
font-display: swap;
}
body {
font-family:
Fixel, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-weight: 450;
font-size: 1.125rem;
line-height: 1.5;
color: #333;
}
h1,
h2,
h3,
h4,
h5,
h6 {
scroll-margin-top: 6rem;
}
hr {
border-color: hsl(from var(--color-foreground-secondary) h s l / 0.1);
}
.dark-mode-toggle-button img {
fill: var(--color-foreground-primary);
}
::selection {
background-color: #b1d5ff;
}
html[data-theme="dark"] ::selection {
background-color: #064c9c;
}
.form-select-bg {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3e%3cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%239fa6b2' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
background-position: right 0.5rem center;
background-size: 1.5em 1.5em;
background-repeat: no-repeat;
}