npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bhooai/nexus-postcss

v0.1.5

Published

Opinionated PostCSS preset for BhooAI Nexus apps — Tailwind, nesting, future CSS, autoprefixing, and minification in one curated pipeline.

Readme

@bhooai/nexus-postcss

Opinionated PostCSS preset for BhooAI Nexus apps — Tailwind, nesting, future CSS, autoprefixing, and minification in one curated pipeline.

Install

Already included when you scaffold a project with nexus init. To add manually:

npm install @bhooai/nexus-postcss

Usage

postcss.config.js (default)

import { createPreset } from '@bhooai/nexus-postcss';
export default createPreset();

With options

import { createPreset } from '@bhooai/nexus-postcss';
export default createPreset({
  extraContent: ['../../packages/nexus-admin/src/**/*.{ts,tsx}'],
  minify: true,
});

With Tailwind forms + typography plugins

import { createPreset } from '@bhooai/nexus-postcss';
import forms from '@tailwindcss/forms';
import typography from '@tailwindcss/typography';

export default createPreset({
  tailwindPlugins: [forms, typography],
});

Modern CSS nesting (spec-compliant)

import { createPreset } from '@bhooai/nexus-postcss';

export default createPreset({
  nestingMode: 'modern', // use postcss-nesting (real CSS Nesting spec) instead of postcss-nested
});

Lightning CSS engine (experimental, ~100x faster)

import { createPreset } from '@bhooai/nexus-postcss';

export default createPreset({
  engine: 'lightningcss', // replaces preset-env + autoprefixer + cssnano with one lightningcss pass
});

Note: lightningcss targets browsers directly (not CSS stages), so postcss-preset-env stage polyfills are not applied. Nesting, prefixing, and minification are all handled by lightningcss.

RTL/LTR direction-aware CSS

import { createPreset } from '@bhooai/nexus-postcss';

export default createPreset({
  logical: true, // polyfills margin-inline, padding-block, inset-inline, etc.
});

Plugin chain (in order)

Default (engine: 'postcss'):

  1. postcss-import — resolve @import statements
  2. postcss-nested (or postcss-nesting when nestingMode: 'modern') — CSS nesting
  3. tailwindcss — base/components/utilities + content scanning
  4. postcss-logical (when logical: true) — direction-aware properties
  5. postcss-preset-env (stage 2) — future CSS features today
  6. autoprefixer — vendor prefixes
  7. cssnano — minification (only when NODE_ENV=production or minify: true)

Lightning CSS (engine: 'lightningcss'):

  1. postcss-import — resolve @import statements
  2. postcss-nested (or postcss-nesting when nestingMode: 'modern') — CSS nesting
  3. tailwindcss — base/components/utilities + content scanning
  4. postcss-lightningcss — prefixing + minification + future CSS (replaces preset-env + autoprefixer + cssnano)

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | content | string[] | ['./index.html', './src/**/*.{ts,tsx}'] | Tailwind content scan paths | | extraContent | string[] | [] | Additional content paths to merge | | theme | object | {} | Tailwind theme extensions | | tailwindPlugins | array | [] | Tailwind plugins (e.g. @tailwindcss/forms, @tailwindcss/typography) | | import | boolean | true | Enable postcss-import | | nested | boolean | true | Enable CSS nesting | | nestingMode | 'classic' \| 'modern' | 'classic' | 'modern' uses postcss-nesting (real CSS Nesting spec); 'classic' uses postcss-nested | | logical | boolean \| object | false | Enable postcss-logical for RTL/LTR direction-aware CSS | | presetEnv | boolean \| 'stage2' \| 'stage3' \| 'stage4' | true (stage2) | Enable postcss-preset-env (ignored when engine: 'lightningcss') | | autoprefixer | boolean \| object | true | Enable autoprefixer (ignored when engine: 'lightningcss') | | minify | boolean | NODE_ENV === 'production' | Enable minification (cssnano or lightningcss) | | sourcemap | boolean | undefined | Explicit source map control: true = inline + annotation, false = disabled, undefined = let PostCSS/Vite decide | | engine | 'postcss' \| 'lightningcss' | 'postcss' | CSS processing backend. 'lightningcss' is experimental and ~100x faster | | plugins | Array<[string, any] \| string> | [] | Custom PostCSS plugins to append |

Theme tokens

Two token stylesheets ship with the preset:

Dark-only (default)

@import '@bhooai/nexus-postcss/theme.css';

22 CSS custom properties (--nexus-bg, --nexus-ink, --nexus-surface, --nexus-accent, etc.) on :root, plus 15 --admin-* aliases for backwards compatibility.

Light/dark dual theme

@import '@bhooai/nexus-postcss/theme-light-dark.css';

Uses the CSS light-dark() function so every token adapts to the user's prefers-color-scheme. Sets color-scheme: light dark on :root. postcss-preset-env (stage 2, in the default chain) polyfills light-dark() for browsers without native support.

Tailwind config

tailwind.config.js is kept in each app — the preset only injects content paths and the plugin chain. Theme extensions and Tailwind plugins stay in your tailwind.config.js.

Note: Tailwind v3.4+ enables container queries by default — the @container utility is available out of the box.

License

MIT