Skip to content

Commit

Permalink
Upgrade tailwindcss from 3.4.17 to 4.0.8.
Browse files Browse the repository at this point in the history
As per the recommendations at https://tailwindcss.com/docs/upgrade-guide,
I used `npx @tailwindcss/upgrade` to perform the upgrade.
  • Loading branch information
myronmarston committed Feb 22, 2025
1 parent b21ab43 commit 68c1a19
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions config/site/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"devDependencies": {
"@tailwindcss/typography": "0.5.16",
"tailwindcss": "3.4.17"
"tailwindcss": "4.0.8"
},
"scripts": {
"build:css": "npx tailwindcss -i ./src/assets/css/tailwind.css -o ./src/assets/css/main.css --minify",
"build:css": "npx @tailwindcss/cli -i ./src/assets/css/tailwind.css -o ./src/assets/css/main.css --minify",
"format:md": "npx prettier --write \"src/**/*.md\""
}
}
2 changes: 1 addition & 1 deletion config/site/src/_includes/cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2 class="text-3xl font-bold text-white mb-6">
Get started by installing ElasticGraph with the following command:
</p>
<div
class="bg-gray-800 dark:bg-gray-900 text-white py-3 px-6 rounded inline-block mb-6">
class="bg-gray-800 dark:bg-gray-900 text-white py-3 px-6 rounded-sm inline-block mb-6">
<code class="font-mono inline-flex items-center">
gem install elasticgraph
<button onclick="navigator.clipboard.writeText('gem install elasticgraph');"
Expand Down
2 changes: 1 addition & 1 deletion config/site/src/_includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Navbar -->
<nav class="w-full py-4 bg-gray-200 dark:bg-gray-800 shadow">
<nav class="w-full py-4 bg-gray-200 dark:bg-gray-800 shadow-sm">
<div class="container mx-auto flex justify-between items-center px-4">
<div class="text-xl flex items-center space-x-4">
<a href="{{ '/' | relative_url }}" class="font-bold hover:underline">ElasticGraph</a>
Expand Down
6 changes: 3 additions & 3 deletions config/site/src/_includes/testimonials.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h2 class="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-8">
What People Are Saying
</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow">
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow-sm">
<p class="text-lg italic mb-4">
Just about everything has been thought of and you can go from prototype to fully
configured OpenSearch and GraphQL infra in a matter of days.
Expand All @@ -14,7 +14,7 @@ <h2 class="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-8">
- Nicole W, Software Engineer at Block
</div>
</div>
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow">
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow-sm">
<p class="text-lg italic mb-4">
ElasticGraph enabled me to build a complex GraphQL API for our Payouts data in
days. It would have taken me months without it!
Expand All @@ -23,7 +23,7 @@ <h2 class="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-8">
- Max N, Software Engineer at Block
</div>
</div>
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow">
<div class="bg-gray-100 dark:bg-gray-700 p-6 rounded-lg shadow-sm">
<p class="text-lg italic mb-4">
Use ElasticGraph and love it? We'd love to hear from you! Send us your feedback.
</p>
Expand Down
2 changes: 1 addition & 1 deletion config/site/src/_layouts/markdown.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<body class="{{ site.style.body }}">
{% include navbar.html %}

<main class="flex-grow">
<main class="grow">
<div class="container mx-auto px-4 py-8 lg:py-20">
<article class="prose dark:prose-invert lg:prose-xl">
<h2>{{ page.title }}</h2>
Expand Down
24 changes: 21 additions & 3 deletions config/site/src/assets/css/tailwind.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import 'tailwindcss';

@plugin '@tailwindcss/typography';

/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
If we ever want to remove these styles, we need to add an explicit border
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);
}
}
6 changes: 3 additions & 3 deletions config/site/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
---

<!-- Main Content -->
<div class="flex-grow flex items-center justify-center py-12">
<div class="grow flex items-center justify-center py-12">
<div class="text-center max-w-2xl">
<p class="text-4xl font-extrabold mb-8">
Schema-driven, scalable, cloud-native, batteries-included
Expand All @@ -17,12 +17,12 @@ <h1 class="text-xl opacity-90 mb-4">

<div class="mt-8 flex justify-center space-x-4">
<a href="{{ '/getting-started' | relative_url }}"
class="bg-blue-600 dark:bg-blue-500 text-white py-2 px-4 rounded hover:bg-blue-500 dark:hover:bg-blue-400 transition">
class="bg-blue-600 dark:bg-blue-500 text-white py-2 px-4 rounded-sm hover:bg-blue-500 dark:hover:bg-blue-400 transition">
Get Started
</a>

<a href="{{ '/docs/main' | relative_url }}"
class="bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 py-2 px-6 rounded hover:bg-gray-300 dark:hover:bg-gray-600 transition">
class="bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 py-2 px-6 rounded-sm hover:bg-gray-300 dark:hover:bg-gray-600 transition">
Documentation
</a>
</div>
Expand Down
9 changes: 0 additions & 9 deletions config/site/tailwind.config.js

This file was deleted.

0 comments on commit 68c1a19

Please sign in to comment.