Skip to content
Discussion options

You must be logged in to vote

It is possible! 🚀 That is amazing!

Install Vanilla Extract:

yarn add @vanilla-extract/css

Install Vanila Extract Vite integration:

yarn add -D @vanilla-extract/vite-plugin

Add Vanilla Extract Vite plugin to the Astro configuration:

import { defineConfig } from 'astro/config'
import { vanillaExtractPlugin } from '@vanilla-extract/vite-plugin'

// https://astro.build/config
export default defineConfig({
    vite: {
        plugins: [vanillaExtractPlugin()]
    }
})

Enjoy! 🥳

button.css.ts

import { style } from '@vanilla-extract/css'

export const button = style({
    padding: '0.5rem 1rem',
    border: 'none',
    borderRadius: '0.25rem',
    color: 'white',
    background: '#333'
})

But…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@mattcompiles
Comment options

@susickypavel
Comment options

@refactorized
Comment options

@susickypavel
Comment options

@Seanmclem
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by askoufis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants