Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A pure CSS library written in Stylus for Astro and MDX projects, installable via pnpm with both compiled CSS and source Stylus exports.
@nanarino/stylus is a pure CSS library written in the Stylus preprocessor, published as an npm package and documented at nanarino.github.io/stylus, designed to style Astro and MDX projects.
@nanarino/stylus is a pure CSS library written in Stylus, maintained by the nanarino project and documented at nanarino.github.io/stylus. It takes Stylus source or precompiled CSS as input and produces a themeable stylesheet for Astro- and MDX-based sites, with the repository tagged as both an astro-theme and an mdx-theme. Version 0.x was published under the name nanarinostyl and remains compatible with 1.x.
import '@nanarino/stylus' or the original Stylus source through import '@nanarino/stylus/lib/index.styl' for deeper customization.pnpm i @nanarino/stylus) and build with pnpm 10.16.0 on Node.js v22.19.0; the development server runs with pnpm dev.pnpm build:docs compiles the documentation site while pnpm build:styl compiles the stylesheet itself, so palette and font changes can be rebuilt locally.*** instead of --- for MDX horizontal rules, keeping Astro templates free of TSX expressions, and using @import for CSS before @require for Stylus.is:inline and IIFE-wrapped inline client scripts keeping the integration clean.*** for horizontal rules and a ban on JS/TS comments inside MDX content.pnpm build:styl to regenerate the stylesheet.import '@nanarino/stylus') and get a full color palette and background system based on Arco Design and css-doodle.@nanarino/stylus/lib/index.styl into your own .styl file to extend variables and mixins before compiling.pnpm i, then pnpm build:styl after editing defaults like the color scheme or default fonts.Install the package with pnpm, then import it in one of three ways: in JSX via import '@nanarino/stylus', in CSS via @import url('@nanarino/stylus'), or in Stylus via import '@nanarino/stylus/lib/index.styl'. For local development, clone the repository, run pnpm i to install dependencies, and pnpm dev to start the development server.
The library targets modern evergreen browsers with a support matrix of Chrome 105+, Edge 105+, Firefox 121+, Opera 91+, Safari 18+, Chrome Android 105+, Firefox for Android 121+, Opera Android 72+, Safari on iOS 18+, and Samsung Internet 20.0.
