Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 16, 2025

This PR contains the following updates:

Package Change Age Confidence
@astrojs/starlight-tailwind (source) ^3.0.0 -> ^4.0.0 age confidence

Release Notes

withastro/starlight (@​astrojs/starlight-tailwind)

v4.0.1

Compare Source

Patch Changes

v4.0.0

Compare Source

Major Changes
  • #​2322 f14eb0c Thanks @​HiDeoo! - ⚠️ BREAKING CHANGE: The minimum supported version of Starlight is now 0.34.0

    Please use the @astrojs/upgrade command to upgrade your project:

    npx @​astrojs/upgrade
  • #​2322 f14eb0c Thanks @​HiDeoo! - Adds support for Tailwind v4, drops support for Tailwind v3.

    ⚠️ BREAKING CHANGE: Tailwind v3 is no longer supported. Tailwind v4 support in Astro is now provided using a Vite plugin and the Astro Tailwind integration is no longer required.

    1. Remove the Astro Tailwind integration. The Astro Tailwind integration is no longer required with Tailwind v4.

       // astro.config.mjs
       import { defineConfig } from "astro/config";
       import starlight from "@​astrojs/starlight";
      -import tailwind from "@​astrojs/tailwind";
      
       export default defineConfig({
         integrations: [
           starlight({
             title: "Docs with Tailwind",
             customCss: ["./src/tailwind.css"],
           }),
      -    tailwind({ applyBaseStyles: false }),
         ],
       });
    2. Install Tailwind v4. Install the latest version of the tailwindcss and @tailwindcss/vite packages.

      Use the astro add tailwind command to install and configure both packages:

      npx astro add tailwind
    3. Update Tailwind base styles. Tailwind CSS base styles needs to be updated for Tailwind v4 and also to use Starlight Tailwind CSS.

      /* src/tailwind.css */
      -@​tailwind base;
      -@​tailwind components;
      -@​tailwind utilities;
      +@​layer base, starlight, theme, components, utilities;
      +
      +@​import '@​astrojs/starlight-tailwind';
      +@​import 'tailwindcss/theme.css' layer(theme);
      +@​import 'tailwindcss/utilities.css' layer(utilities);
      +
      +@​theme {
      +	/*
      +	Configure your Tailwind theme that will be used by Starlight.
      +	https://starlight.astro.build/guides/css-and-tailwind/#styling-starlight-with-tailwind
      +	*/
      +}
      +
      +/*
      +Add additional Tailwind styles to this file:
      +https://tailwindcss.com/docs/adding-custom-styles#using-custom-css
      +*/
    4. Update Tailwind customizations. If you previously customized your Tailwind theme configuration in the tailwind.config.mjs file, such customizations are now defined through CSS using the @theme block in your Tailwind base styles.

      1. Locate existing customizations in your tailwind.config.mjs file. The following example defines customizations for the accent colors, gray scale, and font families used by Starlight:

        // tailwind.config.mjs
        import starlightPlugin from '@​astrojs/starlight-tailwind';
        import colors from 'tailwindcss/colors';
        
        /** @​type {import('tailwindcss').Config} */
        export default {
          content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
          theme: {
            extend: {
              colors: {
                // Custom accent colors.
                accent: colors.fuchsia,
                // Custom gray scale.
                gray: colors.slate,
              },
              fontFamily: {
                // Custom text font.
                sans: ['"Atkinson Hyperlegible"'],
                // Custom code font.
                mono: ['"IBM Plex Mono"'],
              },
            },
          },
          plugins: [starlightPlugin()],
        };
      2. The above customizations can be migrated to the new @theme block in the file containing your Tailwind base styles as follows:

        /* src/tailwind.css */
        @​layer base, starlight, theme, components, utilities;
        
        @​import '@​astrojs/starlight-tailwind';
        @​import 'tailwindcss/theme.css' layer(theme);
        @​import 'tailwindcss/utilities.css' layer(utilities);
        
        @​theme {
          /* Custom accent colors. */
          --color-accent-50: var(--color-fuchsia-50);
          --color-accent-100: var(--color-fuchsia-100);
          --color-accent-200: var(--color-fuchsia-200);
          --color-accent-300: var(--color-fuchsia-300);
          --color-accent-400: var(--color-fuchsia-400);
          --color-accent-500: var(--color-fuchsia-500);
          --color-accent-600: var(--color-fuchsia-600);
          --color-accent-700: var(--color-fuchsia-700);
          --color-accent-800: var(--color-fuchsia-800);
          --color-accent-900: var(--color-fuchsia-900);
          --color-accent-950: var(--color-fuchsia-950);
          /* Custom gray scale. */
          --color-gray-50: var(--color-slate-50);
          --color-gray-100: var(--color-slate-100);
          --color-gray-200: var(--color-slate-200);
          --color-gray-300: var(--color-slate-300);
          --color-gray-400: var(--color-slate-400);
          --color-gray-500: var(--color-slate-500);
          --color-gray-600: var(--color-slate-600);
          --color-gray-700: var(--color-slate-700);
          --color-gray-800: var(--color-slate-800);
          --color-gray-900: var(--color-slate-900);
          --color-gray-950: var(--color-slate-950);
          /* Custom text font. */
          --font-sans: 'Atkinson Hyperlegible';
          /* Custom code font. */
          --font-mono: 'IBM Plex Mono';
        }

    We recommend checking your site’s appearance when upgrading to make sure there are no style regressions caused by this change.

    For full details about upgrading from Tailwind v3 to v4, see the official upgrade guide.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from Darkflame72 as a code owner April 16, 2025 10:38
Copy link

cloudflare-workers-and-pages bot commented Apr 16, 2025

Deploying wiki with  Cloudflare Pages  Cloudflare Pages

Latest commit: 38eeab2
Status:🚫  Build failed.

View logs

@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 5 times, most recently from 9c8737c to 212b00b Compare April 22, 2025 04:39
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 9 times, most recently from 32f16b4 to 106aebf Compare April 29, 2025 15:06
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 7 times, most recently from 4db46b6 to d3d50bf Compare May 6, 2025 23:43
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 7 times, most recently from 64c0a65 to 8501660 Compare May 14, 2025 06:32
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 3 times, most recently from 6e779ca to ec637bf Compare July 9, 2025 01:18
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 5 times, most recently from 0c3dfed to 068ec66 Compare July 17, 2025 17:03
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 4 times, most recently from 424bc54 to 82e0342 Compare July 23, 2025 23:50
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 7 times, most recently from f08685d to 7205798 Compare August 1, 2025 15:32
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 6 times, most recently from 99bb1ae to 4909c80 Compare August 15, 2025 13:42
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch 2 times, most recently from 777301e to 3bcc1e4 Compare August 19, 2025 12:47
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch from 3bcc1e4 to e297571 Compare August 24, 2025 03:51
@renovate renovate bot force-pushed the renovate/astrojs-starlight-tailwind-4.x branch from e297571 to 38eeab2 Compare August 31, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants