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
+18
-10
@@ -4,7 +4,7 @@
|
||||
--color-prettylights-syntax-constant: #0550ae;
|
||||
--color-prettylights-syntax-entity: #8250df;
|
||||
--color-prettylights-syntax-storage-modifier-import: var(
|
||||
--foreground-secondary
|
||||
--color-foreground-secondary
|
||||
);
|
||||
--color-prettylights-syntax-entity-tag: #22863a;
|
||||
--color-prettylights-syntax-keyword: #cf222e;
|
||||
@@ -16,12 +16,20 @@
|
||||
--color-prettylights-syntax-markup-inserted-text: #116329;
|
||||
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
|
||||
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
|
||||
--color-fg-default: hsla(var(--foreground-secondary));
|
||||
--color-fg-muted: hsla(var(--foreground-tertiary));
|
||||
--color-canvas-default: hsla(var(--background-primary));
|
||||
--color-canvas-subtle: hsla(var(--background-secondary));
|
||||
--color-border-default: hsla(var(--foreground-secondary), 0.3);
|
||||
--color-border-muted: hsla(var(--foreground-secondary), 0.1);
|
||||
--color-fg-default: var(--color-foreground-secondary);
|
||||
--color-fg-muted: var(--color-foreground-tertiary);
|
||||
--color-canvas-default: var(--color-background-primary);
|
||||
--color-canvas-subtle: var(--color-background-secondary);
|
||||
--color-border-default: hsl(
|
||||
from
|
||||
var(--color-foreground-secondary)
|
||||
h
|
||||
s
|
||||
l
|
||||
/
|
||||
0.3
|
||||
);
|
||||
--color-border-muted: hsl(from var(--color-foreground-secondary) h s l / 0.1);
|
||||
--color-neutral-muted: rgba(175, 184, 193, 0.2);
|
||||
--color-accent-fg: #02aa6f;
|
||||
--color-accent-emphasis: #0969da;
|
||||
@@ -689,8 +697,8 @@ html[data-theme="dark"] .markdown-body .admonition.tip .admonition-header {
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .markdown-body .admonition.info {
|
||||
background-color: hsla(var(--info), 0.1);
|
||||
color: hsla(var(--foreground-primary));
|
||||
background-color: hsl(194 76% 41% / 0.1);
|
||||
color: var(--color-foreground-primary);
|
||||
}
|
||||
.markdown-body .admonition.warn .admonition-header {
|
||||
color: #dd6f04;
|
||||
@@ -794,7 +802,7 @@ ol.nested li:before {
|
||||
border-top-left-radius: 0.5rem;
|
||||
border-top-right-radius: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
background: hsla(var(--background-tertiary));
|
||||
background: var(--color-background-tertiary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
+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