Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

css-stylez

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-stylez

A tiny helper to use css modules with ease.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

css-stylez

A tiny js module to make it easier to use css modules.

Installation

npm install css-stylez

How to use

First, import the package and a transformer function (or you can create one for yourself, camelToKebab function is basically some match regex and replace)

import cssStylez, {camelToKebab} from 'css-stylez'

Let's say we import our css module styles like

import styles from './MyComponent.module.scss'

We need to initialize cssStylez as,

const stylez = cssStylez(styles,camelToKebab)

Finally,we can start using it. I created this package because I love css modules but hated using it with bulma. You basically end up with classnames hell, ugly af.

<div className={stylez.isFlexTabletOnly}>
stuff here
</div>

<div className={stylez.hasTextGreyDarker}>
stuff here
</div>

FAQs

Package last updated on 02 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc