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

@invisionag/plexus-css

v0.11.2

Published

CSS library and living style guide for InVision products

Downloads

12

Readme

plexus-css

plexus-CSS was a CSS library and a visual styleguide for InVision and is now declared end of life.

End of Life

  • All stakeholders have agreed that no changes apart from critical bug fixes will be done on them ever again.
  • Do not use artifacts from this repository in new applications.
  • Maintenance: No javascript library updates any more, especially no major version changes or updates of css-loader, sass-loader or resolve-url-loader.

Conventions for writing CSS

plexus-css follows the BEM methodology and takes some advice from cssguidelin.es and ITCSS.

Writing classes

  • Use BEM to name your classes.

    • Block: .block
    • Element: .block__element – Nested inside a block
    • Modifier: .block--modifier or block__element--modifier
  • Avoid nesting.

CSS spacing

To avoid pixel counting we use a pragmatic rule for margin and padding.

  • Add margin and padding in five pixel steps
  • This is correct: padding: 20px 25px
  • This is wrong: padding: 18px 23px

Folder structure

plexus-css uses the folder structure advocated by ITCSS. You should use the same folder structure in your app if you are adding or extending modules.

  1. Settings: Global variables, config switches like color-variables
  2. Themes: Themes for our products
  3. Tools: Default Sass mixins and functions
  4. Base: HTML elements like h1 - h6 and inputs
  5. Objects: Cosmetic-free design patterns like links or header
  6. Components: Highly reusable elements for the UI like buttons or forms
  7. Trumps: Helpers and overrides

Note that folders 4-7 are sorted by CSS specificity.

Development setup

Prerequisites

  • Install npm and Git and Ruby and the bundler gem (gem install bundler)
  • git clone <repository-url> this repository
  • change to new directory
  • bundle install
  • yarn install

Get up and running

  • yarn start

Open http://localhost:4000/styleguide in your web browser

Testing

  • yarn test

This uses the stylelint linter for SCSS with the stylelint-config-standard configuration, and also eslint with airbnb style.

Building

  • yarn build

Deployment

Bumping the version

Important: Do not use npm version patch/minor/major

This would bump the version and also tag the file, but we need to recreate the styleguide with the new version. If you do so, the tagged version will have an outdated styleguide version number.

Do it manually.