Upgraded to tailwind 4
This commit is contained in:
@@ -1,33 +1,86 @@
|
|||||||
@tailwind base;
|
@import 'tailwindcss';
|
||||||
@tailwind components;
|
|
||||||
@tailwind utilities;
|
|
||||||
|
|
||||||
@font-face {
|
@utility container {
|
||||||
font-family: "Inter";
|
margin-inline: auto;
|
||||||
src: url("/fonts/Inter.woff2") format("woff2 supports variations"),
|
@media (width >= --theme(--breakpoint-sm)) {
|
||||||
url("/fonts/Inter.woff2") format("woff2-variations");
|
max-width: none;
|
||||||
font-weight: 400 700;
|
}
|
||||||
font-style: normal;
|
@media (width >= 640px) {
|
||||||
font-display: swap;
|
max-width: 640px;
|
||||||
|
}
|
||||||
|
@media (width >= 640px) {
|
||||||
|
max-width: 640px;
|
||||||
|
}
|
||||||
|
@media (width >= 760px) {
|
||||||
|
max-width: 760px;
|
||||||
|
}
|
||||||
|
@media (width >= 960px) {
|
||||||
|
max-width: 960px;
|
||||||
|
}
|
||||||
|
@media (width >= 1180px) {
|
||||||
|
max-width: 1180px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
/*
|
||||||
font-family: "Inter";
|
The default border color has changed to `currentcolor` in Tailwind CSS v4,
|
||||||
src: url("/fonts/Inter-Italic.woff2") format("woff2 supports variations"),
|
so we've added these compatibility styles to make sure everything still
|
||||||
url("/fonts/Inter-Italic.woff2") format("woff2-variations");
|
looks the same as it did with Tailwind CSS v3.
|
||||||
font-weight: 400 700;
|
|
||||||
font-style: italic;
|
If we ever want to remove these styles, we need to add an explicit border
|
||||||
font-display: swap;
|
color utility to any element that depends on these defaults.
|
||||||
|
*/
|
||||||
|
@layer base {
|
||||||
|
*,
|
||||||
|
::after,
|
||||||
|
::before,
|
||||||
|
::backdrop,
|
||||||
|
::file-selector-button {
|
||||||
|
border-color: var(--color-gray-200, currentcolor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
@utility flow {
|
||||||
font-family:
|
& > * + * {
|
||||||
"Inter", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
||||||
font-weight: 300;
|
|
||||||
}
|
|
||||||
|
|
||||||
@layer utilities {
|
|
||||||
.flow > * + * {
|
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@layer utilities {
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
src:
|
||||||
|
url('/fonts/Inter.woff2') format('woff2 supports variations'),
|
||||||
|
url('/fonts/Inter.woff2') format('woff2-variations');
|
||||||
|
font-weight: 400 700;
|
||||||
|
font-style: normal;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
src:
|
||||||
|
url('/fonts/Inter-Italic.woff2') format('woff2 supports variations'),
|
||||||
|
url('/fonts/Inter-Italic.woff2') format('woff2-variations');
|
||||||
|
font-weight: 400 700;
|
||||||
|
font-style: italic;
|
||||||
|
font-display: swap;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family:
|
||||||
|
'Inter',
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
'Segoe UI',
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
'Open Sans',
|
||||||
|
'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
import tailwind from "@astrojs/tailwind";
|
import tailwind from "@tailwindcss/vite";
|
||||||
|
|
||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from '@astrojs/sitemap';
|
||||||
|
|
||||||
@@ -12,8 +12,12 @@ export default defineConfig({
|
|||||||
prefetch: true,
|
prefetch: true,
|
||||||
site: "https://alexcreates.fr",
|
site: "https://alexcreates.fr",
|
||||||
integrations: [
|
integrations: [
|
||||||
tailwind({ applyBaseStyles: false }),
|
|
||||||
sitemap(),
|
sitemap(),
|
||||||
compressor(),
|
compressor(),
|
||||||
]
|
],
|
||||||
|
vite: {
|
||||||
|
plugins: [
|
||||||
|
tailwind()
|
||||||
|
]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -11,14 +11,13 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/sitemap": "^3.4.1",
|
"@astrojs/sitemap": "^3.4.1",
|
||||||
"@astrojs/tailwind": "^6.0.2",
|
|
||||||
"@astrojs/vue": "^5.1.0",
|
"@astrojs/vue": "^5.1.0",
|
||||||
|
"@tailwindcss/vite": "^4.1.8",
|
||||||
"@vueuse/core": "^13.3.0",
|
"@vueuse/core": "^13.3.0",
|
||||||
"astro": "^5.9.2",
|
"astro": "^5.9.2",
|
||||||
"astro-compressor": "^1.0.0",
|
"astro-compressor": "^1.0.0",
|
||||||
"scrambling-text": "^1.2.0",
|
|
||||||
"swiper": "^11.2.8",
|
"swiper": "^11.2.8",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^4.1.8",
|
||||||
"vue": "^3.5.16"
|
"vue": "^3.5.16"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
998
pnpm-lock.yaml
generated
998
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
2
pnpm-workspace.yaml
Normal file
2
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
onlyBuiltDependencies:
|
||||||
|
- '@tailwindcss/oxide'
|
||||||
@@ -10,7 +10,7 @@ const { variant = 'secondary', glow = false, href } = Astro.props;
|
|||||||
|
|
||||||
{href && (
|
{href && (
|
||||||
<a
|
<a
|
||||||
class="relative py-2 px-7 flex items-center gap-[0.5ch] rounded-[100vmax] text-[1em] transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4"
|
class="relative py-2 px-7 flex items-center gap-[0.5ch] rounded-[100vmax] text-[1em] transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-4"
|
||||||
href={href}
|
href={href}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class:list={
|
class:list={
|
||||||
@@ -28,7 +28,7 @@ const { variant = 'secondary', glow = false, href } = Astro.props;
|
|||||||
)}
|
)}
|
||||||
{!href && (
|
{!href && (
|
||||||
<button
|
<button
|
||||||
class="relative py-2 px-7 flex items-center gap-[0.5ch] rounded-[100vmax] text-[1em] transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4"
|
class="relative py-2 px-7 flex items-center gap-[0.5ch] rounded-[100vmax] text-[1em] transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-4"
|
||||||
class:list={
|
class:list={
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="p-3 text-slate-200 bg-slate-900 border-[1px] border-slate-800 rounded">
|
<div class="p-3 text-slate-200 bg-slate-900 border border-slate-800 rounded-sm">
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<slot name="icon" />
|
<slot name="icon" />
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import BgParticles from "./BgParticles.astro";
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="my-4 w-12 mx-auto border-none h-[.33rem] rounded-[100vmax] bg-gradient-to-b from-emerald-500 to-emerald-600" />
|
<hr class="my-4 w-12 mx-auto border-none h-[.33rem] rounded-[100vmax] bg-linear-to-b from-emerald-500 to-emerald-600" />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p class="md:text-xl">
|
<p class="md:text-xl">
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/** @type {import('tailwindcss').Config} */
|
|
||||||
module.exports = {
|
|
||||||
content: [
|
|
||||||
'./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'
|
|
||||||
],
|
|
||||||
theme: {
|
|
||||||
container: {
|
|
||||||
center: true,
|
|
||||||
screens: {
|
|
||||||
sm: '640px',
|
|
||||||
md: '640px',
|
|
||||||
lg: '760px',
|
|
||||||
xl: '960px',
|
|
||||||
'2xl': '1180px',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user