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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@braunstetter/rock

v1.0.0

Published

Assets for the rock.systems ecosystem. Reuse it everywhere.

Downloads

4

Readme

Assets for the rock.systems ecosystem

Make sure every bundle uses consistent assets.

Installation

yarn add braunstetter/rock

CSS

We are using the postcss-mixins library.

Mixins

To use our mixins you have to enable it first.


// example configuration of postcss.config.js
const path = require("path");

module.exports = {
    plugins: [
        require('autoprefixer'),
        require('postcss-mixins')({
            mixinsFiles: path.join(__dirname, '/node_modules/@braunstetter/rock/js/mixins', '**/*.js')
        }),
        require('postcss-simple-vars'),
        require('postcss-import'),
        require('postcss-nested'),
        require('cssnano')({
            preset: 'default',
        }),
    ]
}

Afterward you will be able to use the mixins:

@mixin btn md;

Utilities

svg

Svg images are used quite often in modern UI components. So this utility mixin focuses on standardizing svg images.

svg {
    @mixin svg md;
}

Available sizes:

md
height: 1.25rem
width: 1.25rem

contains-svg

This utility mixin mirrors the svg mixin - but you don't have to put it inside a svg css-selector.

.my-container {
    @mixin contains-svg md;
}
space

This utility is controlling the space between child elements.

You can use all spacing variables:

/* 3 means it uses the $_3 variable */
@mixin space x, 3;

be aware - additionally, variables have to be imported before you can use them.

Components

Button
/* parameter: size, color */
@mixin btn md, primary;

Available sizes: md

Available colors: primary

If you are using this component without the color parameter, no styling will be applied except for the padding and spacing of the size parameter:

@mixin btn md;

Variables

We are using the postcss-simple-vars plugin.

Import variables

Before you can use the variables, you have to import them first into your css document:

/* all variables available */
@import "@braunstetter/rock/css/variables.css";

/* just a subset */
@import "@braunstetter/rock/css/variables/color.css";