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 🙏

© 2025 – Pkg Stats / Ryan Hefner

reactcss-extra

v1.2.6

Published

ReactCSS with a few extra features

Readme

reactcss-extra

NPM JavaScript Style Guide

ReactCSS with some extra features

Original ReactCSS

The original version of ReactCSS by casesandberg can be found here (github)

What's changed

  • The use of lodash has changed. Now only the necessary lodash sub-modules are imported instead of the entire lodash module.

  • Added a new function styleMerge which allows for combining multiple ReactCSS styles (can provide any number of styles):

const divColours = reactCSSExtra({
    "default": {
        div: {
            color: "red",
        },
    },
});

const divFontSize = reactCSSExtra({
    "default": {
        div: {
            fontSize: "48px",
        },
    },
});

const combined = styleMerge(false, divColours, divFontSize);
//---------------
/*
* {
*   div: {
*     color: "red",
*     fontSize: "48px"
*   }
* }
*/

const combinedWithoutDivKey = styleMerge(true, divColours, divFontSize);
//---------------
/*
* {
*   color: "red",
*   fontSize: "48px"
* }
*/
  • The type definition for reactCSS was changed to allow for keys to be left out of activating classes (and to allow for styles to be left out, too)
const styles = reactCSSExtra({
    "default": {
        div1: {
            fontWeight: "200",
            fontSize: "30px",
        },
        div2: {
            fontWeight: "400",
        }
    },
    "heavy": {
        div1: {
            fontWeight: "400",
            //fontSize doesn't need to be specified again, it will just inherit "30px" from above
        },
        //div2 doesn't need to be specified again, it will just inherit from above
    }
}, {
    "heavy": true,
});
//---------------
/*
* {
*   div1: {
*      fontWeight: "400"
*      fontSize: "30px",
*   },
*   div2: {
*      fontWeight: "400",
*   }
* }
*/
  • reactCSS became reactCSSExtra

Change log

Version 1.2.6

  • Fixed more issues that I don't find because I don't test properly

Version 1.2.5

  • Fixed issue to do with extra scopes

Version 1.2.4

  • Small issue that I fixed when changing the styleMerge typings (when destroyTopLevelKeys was true) I also fixed when destroyTopLevelKeys was false NOTE: For instance when D = styleMerge(false, X, Y), D will inherit keys from X, so just be careful!

Version 1.2.3

  • I always leave stuff out when doing tests and I never put it back, so I put that stuff back

Version 1.2.2

  • Improved the styleMerge typings. Made them more optimised and fixed? it even though I don't know whether it was actually broken.

Version 1.2.1

  • Corrected name

Version 1.2.0

  • Added proper typings for the styleMerge function. It no longer just returns object but actually the combined objects provided. It also removed the keys if you specify, but it's pretty unoptimised.

  • Fixed typings for reactCSSExtra. An attribute like position that used the type "absolute" | "relative" | ... rather than just string would error because string is not assignable to type "absolute" | "relative" | ....