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>
This commit is contained in:
co-authored by
李嘉图·M·路
Asher Gomez
Marvin Hagemeister
parent
2d308f6b9e
commit
bb23643779
+40
-45
@@ -1,43 +1,43 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss";
|
||||
|
||||
/* Light and dark theme variables */
|
||||
:root {
|
||||
--fresh: 50deg, 100%, 56%;
|
||||
--fresh-green: 142deg, 71%, 29%;
|
||||
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
||||
|
||||
--background-primary: 215deg, 100%, 100%;
|
||||
--background-secondary: 210deg, 29%, 97%;
|
||||
--background-tertiary: 207deg, 33%, 95%;
|
||||
--foreground-primary: 0deg, 0%, 9%;
|
||||
--foreground-secondary: 0deg, 0%, 23%;
|
||||
--foreground-tertiary: 0deg, 0%, 32%;
|
||||
--foreground-quaternary: 0deg, 0%, 42%;
|
||||
@theme {
|
||||
--color-fresh: hsl(50 100% 56%);
|
||||
--color-fresh-green: hsl(142 71% 29%);
|
||||
|
||||
--info: 194deg, 76%, 41%;
|
||||
--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 {
|
||||
--fresh: 50deg, 100%, 56%;
|
||||
--fresh-green: 142deg, 71%, 29%;
|
||||
|
||||
--background-primary: 220deg, 11%, 11%;
|
||||
--background-secondary: 216deg, 19%, 18%;
|
||||
--background-tertiary: 216deg, 27.7%, 22%;
|
||||
--foreground-primary: 215deg, 17%, 99%;
|
||||
--foreground-secondary: 215deg, 17%, 83%;
|
||||
--foreground-tertiary: 215deg, 17%, 20%;
|
||||
--foreground-quaternary: 215deg, 17%, 10%;
|
||||
|
||||
--info: 194deg, 76%, 41%;
|
||||
|
||||
color: var(--foreground-primary);
|
||||
background-color: var(--background-primary);
|
||||
color: var(--color-foreground-primary);
|
||||
background-color: var(--color-background-primary);
|
||||
}
|
||||
|
||||
/* Scrollbar colors that look good on light and dark theme */
|
||||
* {
|
||||
scrollbar-color: hsla(0deg, 0%, 50%, 0.5) hsla(0deg, 0%, 50%, 0.1) !important;
|
||||
scrollbar-color: hsl(0deg 0% 50% / 0.5) hsl(0 0% 50% / 0.1) !important;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
@@ -75,24 +75,12 @@ h6 {
|
||||
scroll-margin-top: 6rem;
|
||||
}
|
||||
|
||||
b,
|
||||
strong,
|
||||
.font-bold,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: 750;
|
||||
}
|
||||
|
||||
hr {
|
||||
@apply border-foreground-secondary/10;
|
||||
border-color: hsl(from var(--color-foreground-secondary) h s l / 0.1);
|
||||
}
|
||||
|
||||
.dark-mode-toggle-button img {
|
||||
@apply fill-foreground-primary;
|
||||
fill: var(--color-foreground-primary);
|
||||
}
|
||||
|
||||
::selection {
|
||||
@@ -102,3 +90,10 @@ hr {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user