Skip to content

Commit 85852eb

Browse files
fix: tw4 styles
1 parent 094cf8a commit 85852eb

File tree

8 files changed

+61
-66
lines changed

8 files changed

+61
-66
lines changed

www/components/SideBySide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function SideBySide(props: SideBySideProps) {
2727
return (
2828
<div
2929
class={`grid grid-cols-1 items-center gap-12 md:gap-16 xl:gap-32 ${
30-
props.reverseOnDesktop ? "md:first:[&>*]:order-1" : ""
30+
props.reverseOnDesktop ? "[&>*]:md:first:order-1" : ""
3131
} ${mdSplitClass} ${lgSplitClass} ${props.class ?? ""}`}
3232
>
3333
{props.children}

www/components/homepage/Hero.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function Hero(props: { origin: string }) {
99
<div class="bg-green-300 mt-0 pt-32 md:pt-48 !mb-0 bg-gradient-to-br from-blue-100 via-green-200 to-yellow-100">
1010
<div class="md:grid grid-cols-5 gap-8 md:gap-16 items-center w-full max-w-screen-xl mx-auto px-4 md:px-8 lg:px-16 2xl:px-0">
1111
<div class="flex-1 text-center md:text-left md:col-span-3 pb-8 md:pb-32">
12-
<h2 class="text-[calc(1rem+4vw)] leading-tight sm:text-5xl lg:text-6xl sm:tracking-tight sm:leading-none! font-extrabold">
12+
<h2 class="text-[calc(1rem+4vw)] leading-tight sm:text-5xl lg:text-6xl sm:tracking-tight sm:leading-none font-extrabold">
1313
The simple, approachable, productive web framework
1414
</h2>
1515
<div class="mt-12 flex flex-wrap justify-center items-stretch md:justify-start gap-4">

www/components/homepage/SectionHeading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function SectionHeading(
44
{ children }: { children: ComponentChildren },
55
) {
66
return (
7-
<h2 class="text-3xl lg:text-4xl xl:text-5xl text-gray-600 font-bold text-balance">
7+
<h2 class="text-3xl lg:text-4xl xl:text-5xl text-gray-600 font-[750] text-balance">
88
{children}
99
</h2>
1010
);

www/components/homepage/Simple.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function Simple() {
55
<PageSection class="!mb-12 !mt-20">
66
<div class="text-center max-w-max mx-auto flex flex-col gap-4">
77
<p class="italic text-gray-500 text-lg">Introducing Fresh:</p>
8-
<h2 class="text-4xl sm:text-5xl md:text-6xl lg:text-7xl sm:tracking-tight sm:leading-[1.1]! font-extrabold text-balance text-gray-600">
8+
<h2 class="text-4xl sm:text-5xl md:text-6xl lg:text-7xl sm:tracking-tight font-extrabold text-balance text-gray-600">
99
The framework so simple, you already know it.
1010
</h2>
1111
<p class="text-xl text-balance max-w-prose mx-auto">

www/components/homepage/SocialProof.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function SocialProof() {
66
return (
77
<PageSection>
88
<div class="text-center max-w-max mx-auto flex flex-col gap-4">
9-
<h2 class="text-gray-600 text-4xl sm:text-5xl md:text-6xl lg:text-7xl sm:tracking-tight sm:leading-[1.1]! font-extrabold text-balance">
9+
<h2 class="text-gray-600 text-4xl sm:text-5xl md:text-6xl lg:text-7xl sm:tracking-tight sm:leading-[1.1] font-extrabold text-balance">
1010
Built for the edge
1111
</h2>
1212
<p class="text-xl text-balance max-w-prose mx-auto">

www/islands/VersionSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default function VersionSelect(
3636
id="version"
3737
class={`rounded-md block border border-foreground-primary/20 appearance-none bg-background-primary form-select-bg font-semibold ${
3838
selectedIsLatest ? "pr-22" : "pr-10"
39-
} py-2 pl-3 w-full h-full leading-none sm:(text-sm leading-5) focus:(outline-hidden border-blue-300) hover:bg-background-secondary`}
39+
} py-2 pl-3 w-full h-full leading-none sm:text-sm sm:leading-5 focus:outline-hidden focus:border-blue-300 hover:bg-background-secondary`}
4040
value={selectedVersion}
4141
onChange={(e) => {
4242
if (e.currentTarget.value !== selectedVersion) {

www/static/markdown.css

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
--color-prettylights-syntax-constant: #0550ae;
55
--color-prettylights-syntax-entity: #8250df;
66
--color-prettylights-syntax-storage-modifier-import: var(
7-
--foreground-secondary
7+
--color-foreground-secondary
88
);
99
--color-prettylights-syntax-entity-tag: #22863a;
1010
--color-prettylights-syntax-keyword: #cf222e;
@@ -16,12 +16,14 @@
1616
--color-prettylights-syntax-markup-inserted-text: #116329;
1717
--color-prettylights-syntax-markup-inserted-bg: #dafbe1;
1818
--color-prettylights-syntax-constant-other-reference-link: #0a3069;
19-
--color-fg-default: hsla(var(--foreground-secondary));
20-
--color-fg-muted: hsla(var(--foreground-tertiary));
21-
--color-canvas-default: hsla(var(--background-primary));
22-
--color-canvas-subtle: hsla(var(--background-secondary));
23-
--color-border-default: hsla(var(--foreground-secondary), 0.3);
24-
--color-border-muted: hsla(var(--foreground-secondary), 0.1);
19+
--color-fg-default: var(--color-foreground-secondary);
20+
--color-fg-muted: var(--color-foreground-tertiary);
21+
--color-canvas-default: var(--color-background-primary);
22+
--color-canvas-subtle: var(--color-background-secondary);
23+
--color-border-default: hsl(
24+
from var(--color-foreground-secondary) h s l / 0.3
25+
);
26+
--color-border-muted: hsl(from var(--color-foreground-secondary) h s l / 0.1);
2527
--color-neutral-muted: rgba(175, 184, 193, 0.2);
2628
--color-accent-fg: #02aa6f;
2729
--color-accent-emphasis: #0969da;
@@ -689,8 +691,8 @@ html[data-theme="dark"] .markdown-body .admonition.tip .admonition-header {
689691
}
690692

691693
html[data-theme="dark"] .markdown-body .admonition.info {
692-
background-color: hsla(var(--info), 0.1);
693-
color: hsla(var(--foreground-primary));
694+
background-color: hsl(194 76% 41% / 0.1);
695+
color: var(--color-foreground-primary);
694696
}
695697
.markdown-body .admonition.warn .admonition-header {
696698
color: #dd6f04;
@@ -794,7 +796,7 @@ ol.nested li:before {
794796
border-top-left-radius: 0.5rem;
795797
border-top-right-radius: 0.5rem;
796798
padding: 0.5rem;
797-
background: hsla(var(--background-tertiary));
799+
background: var(--color-background-tertiary);
798800
display: flex;
799801
align-items: center;
800802
justify-content: space-between;
@@ -804,9 +806,8 @@ ol.nested li:before {
804806
border-top-right-radius: 0 !important;
805807
}
806808
.fenced-code-title {
807-
font-family:
808-
ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
809-
"Courier New", monospace;
809+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
810+
"Liberation Mono", "Courier New", monospace;
810811
font-size: 0.8125rem;
811812
line-height: 1;
812813
}

www/static/styles.css

Lines changed: 41 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
@import "tailwindcss";
22

3-
/* Light and dark theme variables */
4-
:root {
5-
--fresh: hsla(50, 100%, 56%, 1);
6-
--fresh-green: hsla(142, 71%, 29%, 1);
7-
8-
--background-primary: hsla(215deg, 100%, 100%, 1);
9-
--background-secondary: hsla(210, 29%, 97%, 1);
10-
--background-tertiary: hsla(207, 33%, 95%, 1);
11-
--foreground-primary: hsla(0, 0%, 9%, 1);
12-
--foreground-secondary: hsla(0, 0%, 23%, 1);
13-
--foreground-tertiary: hsla(0, 0%, 32%, 1);
14-
--foreground-quaternary: hsla(0, 0%, 42%, 1);
15-
16-
--info: hsla(194, 76%, 41%, 1);
3+
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
4+
5+
@theme {
6+
--color-fresh: hsl(50 100% 56%);
7+
--color-fresh-green: hsl(142 71% 29%);
8+
9+
--color-background-primary: hsl(215deg 100% 100%);
10+
--color-background-secondary: hsl(210 29% 97%);
11+
--color-background-tertiary: hsl(207 33% 95%);
12+
--color-foreground-primary: hsl(0 0% 9%);
13+
--color-foreground-secondary: hsl(0 0% 23%);
14+
--color-foreground-tertiary: hsl(0 0% 32%);
15+
--color-foreground-quaternary: hsl(0 0% 42%);
1716
}
18-
html[data-theme="dark"]:root {
19-
--fresh: hsla(50, 100%, 56%, 1);
20-
--fresh-green: hsla(142, 71%, 29%, 1);
2117

22-
--background-primary: hsla(220deg, 11%, 11%, 1);
23-
--background-secondary: hsla(216deg, 19%, 18%, 1);
24-
--background-tertiary: hsla(216deg, 27.7%, 22%, 1);
25-
--foreground-primary: hsla(215deg, 17%, 99%, 1);
26-
--foreground-secondary: hsla(215deg, 17%, 83%, 1);
27-
--foreground-tertiary: hsla(215deg, 17%, 20%, 1);
28-
--foreground-quaternary: hsla(215deg, 17%, 10%, 1);
18+
@variant dark {
19+
--color-fresh: hsl(50 100% 56%);
20+
--color-fresh-green: hsl(142 71% 29%);
21+
22+
--color-background-primary: hsl(220deg 11% 11%);
23+
--color-background-secondary: hsl(216deg 19% 18%);
24+
--color-background-tertiary: hsl(216deg 27.7% 22%);
25+
--color-foreground-primary: hsl(215deg 17% 99%);
26+
--color-foreground-secondary: hsl(215deg 17% 83%);
27+
--color-foreground-tertiary: hsl(215deg 17% 20%);
28+
--color-foreground-quaternary: hsl(215deg 17% 10%);
2929

30-
--info: hsla(194, 76%, 41%, 1);
30+
--color-info: hsl(194 76% 41%);
31+
}
3132

32-
color: var(--foreground-primary);
33-
background-color: var(--background-primary);
33+
html[data-theme="dark"]:root {
34+
color: var(--color-foreground-primary);
35+
background-color: var(--color-background-primary);
3436
}
3537

3638
/* Scrollbar colors that look good on light and dark theme */
3739
* {
38-
scrollbar-color: hsla(0deg, 0%, 50%, 0.5) hsla(0deg, 0%, 50%, 0.1) !important;
40+
scrollbar-color: hsl(0deg 0% 50% / 0.5) hsl(0 0% 50% / 0.1) !important;
3941
}
4042

4143
@font-face {
@@ -55,9 +57,8 @@ html[data-theme="dark"]:root {
5557
}
5658

5759
body {
58-
font-family:
59-
Fixel, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
60-
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
60+
font-family: Fixel, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
61+
Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
6162
font-weight: 450;
6263
font-size: 1.125rem;
6364
line-height: 1.5;
@@ -73,26 +74,12 @@ h6 {
7374
scroll-margin-top: 6rem;
7475
}
7576

76-
b,
77-
strong,
78-
.font-bold,
79-
h1,
80-
h2,
81-
h3,
82-
h4,
83-
h5,
84-
h6 {
85-
font-weight: 750;
86-
}
87-
8877
hr {
89-
/* @apply border-foreground-secondary/10; */
90-
border-color: hsla(var(--foreground-secondary), 0.1);
78+
border-color: hsl(from var(--color-foreground-secondary) h s l / 0.1);
9179
}
9280

9381
.dark-mode-toggle-button img {
94-
/* @apply fill-foreground-primary; */
95-
fill: var(--foreground-primary);
82+
fill: var(--color-foreground-primary);
9683
}
9784

9885
::selection {
@@ -102,3 +89,10 @@ hr {
10289
html[data-theme="dark"] ::selection {
10390
background-color: #064c9c;
10491
}
92+
93+
.form-select-bg {
94+
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");
95+
background-position: right 0.5rem center;
96+
background-size: 1.5em 1.5em;
97+
background-repeat: no-repeat;
98+
}

0 commit comments

Comments
 (0)