Skip to content
Helper function to transform class map objects from PostCSS to strings
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist
src
test
.babelrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
README.md
gulpfile.babel.js
package.json

README.md

PostCSS Classnames

Instead of combining classnames from PostCSS objects using typical object syntax, write classes like you normally would with this helper function.

Usage

npm i -S @oberd/postcss-classnames
import globalStyles from '../styles.css';
import moduleStyles from './button.css';
import classnames from '@oberd/postcss-classnames';

const css = classnames(globalStyles, moduleStyles);

css('button-class global-class');
// Will return class string for rendering
// 'Button__button-class__2 Global__global-class__1'
You can’t perform that action at this time.