Packages
@master/css.astro
Integrate Master CSS in Astro way
Installation
npm i @master/css.astro@rcimport { defineConfig } from 'astro/config'import masterCSS from '@master/css.astro' export default defineConfig({ integrations: [ masterCSS() ]})By default, masterCSS() uses progressive rendering. The integration registers Astro middleware to inject pre-rendered <style id="master"> into HTML responses and injects the runtime script for browser hydration.
Import the default stylesheet from a global Astro stylesheet:
<style is:global> @import '@master/css';</style>API Reference
options
The options object extends the VitePluginOptions and is passed to the @master/css.astro integration. It allows you to configure the behavior of the integration.
For pre-render and progressive modes, Astro owns the HTML rendering step through @master/css.astro/middleware, so you do not need to add @master/css-server manually.
import { defineConfig } from 'astro/config'import masterCSS from '@master/css.astro'export default defineConfig({ integrations: [ masterCSS({ mode: 'static' }) ]})import { type PluginOptions, options as defaultPluginOptions } from '@master/css.vite'const options: IntegrationOptions = { ...defaultPluginOptions, mode: 'progressive'}export default optionsexport declare type IntegrationOptions = PluginOptions