kouto-swiss
raw JSON → 1.1.0 verified Sat May 09 auth: no javascript abandoned
A complete CSS framework for Stylus, inspired by nib, compass, and bourbon. Current stable version is 1.1.0 (released 2017-02-26), with no updates since then. It provides mixins, utilities, a grid system, responsive helpers, vendor prefixing, reset, and typography. Unlike nib which is more minimal, kouto-swiss aims to be a full-featured framework similar to Compass for Sass. It integrates with Stylus via the `use()` method in Node.js or `@import` in Stylus files. Note: the project appears unmaintained (last release 2017).
Common errors
error stylus: "kouto-swiss" is not a valid Stylus plugin ↓
cause Using .set('use', 'kouto-swiss') or incorrect require path.
fix
Use JavaScript: stylus(str).use(require('kouto-swiss')())
error Error: Cannot find module 'kouto-swiss' ↓
cause Package not installed or missing from node_modules.
fix
Run: npm install --save-dev kouto-swiss
error ReferenceError: col is not defined ↓
cause Forgetting to @import "kouto-swiss" in the Stylus file.
fix
Add @import "kouto-swiss" at the top of your .styl file.
error TypeError: koutoSwiss is not a function ↓
cause Calling require('kouto-swiss') without parentheses; it returns a function that returns a middleware.
fix
Use: stylus(str).use(require('kouto-swiss')())
Warnings
deprecated Project unmaintained: last release was 1.1.0 on 2017-02-26. ↓
fix Consider switching to nib or modern Stylus alternatives. For new projects, use a different framework.
gotcha koutoSwiss() must be called as a function when passed to stylus.use(). ↓
fix Use .use(koutoSwiss()) not .use(koutoSwiss).
gotcha Stylus peer dependency version mismatch may cause issues; ensure stylus v0.x is installed (compatible with kouto-swiss 1.x). ↓
fix Install stylus@0.x explicitly: npm install --save-dev stylus@0.54.7
gotcha No ESM or TypeScript support; the package is CommonJS-only. ↓
fix Use require() and avoid import statements.
gotcha Grid mixins may conflict with other frameworks if not namespaced. ↓
fix Use the provided utility functions and avoid overwriting kouto-swiss variables.
Install
npm install kouto-swiss yarn add kouto-swiss pnpm add kouto-swiss Imports
- koutoSwiss wrong
import koutoSwiss from 'kouto-swiss';correctconst koutoSwiss = require('kouto-swiss'); - stylus.use() with koutoSwiss wrong
stylus(str).set('use', koutoSwiss);correctstylus(str).use(koutoSwiss()); - @import "kouto-swiss" wrong
@import 'kouto-swiss' (works as well) OR @import "kouto-swiss/index"correct@import "kouto-swiss"
Quickstart
// Install: npm install --save-dev kouto-swiss stylus
// Node.js compilation with Stylus
const stylus = require('stylus');
const koutoSwiss = require('kouto-swiss');
const str = `
@import "kouto-swiss"
body
font-size: 16px
background-color: #f0f0f0
.my-class
col(6)
`;
stylus(str)
.use(koutoSwiss())
.set('filename', 'example.styl')
.render((err, css) => {
if (err) throw err;
console.log(css);
});