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

supple

v4.1.0

Published

In-browser (S)CSS framework; Fluid, Variable, supple if you will

Downloads

541

Readme

Supple (S)CSS framework

npm (scoped) npm changelog

Why use supple:

It is a small but powerfull (S)CSS framework designed specially with the latest browsers in mind. The framework is made with an eye on the future. It uses custom properties for configuration and utilises new CSS webstandards.

Supple provides little to no design wich means no undoing other peoples design decisions.

Use supple if:

  • You appreciate the value of Object Oriented code and the need for scalability and reuse.
  • You need a powerful library of defaults & objects.
  • You need a framework that is robust and evolves constantly.

Size

The core framework including all modules without fallbacks for custom-properties weighs about 2.15kB. You can reduce the payload by only including the modules you need, and configure those modules to your needs.

If you want the framework to include all fallbacks for custom-properties the framework comes in at 2.48kB.

Browser support

Supple supports all major browsers which can render CSS custom properties.

If you want to support older browsers (mostly IE11) you’ll need to include the _fractions.scss utility to support our _layout.scss grid system. Other modules also have some configuration to support older browsers, please refer to their own readme files.

Browserstack

Every feature in Supple is extensively tested in browserstack:

Installation

  • npm: npm install supple --save

Note: It is advised to add postcss-autoprefixer to automatically generate vendor prefixes.

Available modules

All supple submodules are created based on the ITCSS methodology.

ITCSS stands for Inverted Triangle CSS and it helps you organize your project's CSS files in such a way that you can better deal with CSS specifics like global namespace, the cascade and selector specificity.

Settings

This layer is the first layer and holds any global settings for your project. It should only house settings that need to be accessed from anywhere.

NOTE: Any variable that does not need to be accessed globally should belong in the module to which it relates.

Tools

The tools layer houses your globally available tooling, mixins and functions.

NOTE: Any mixin or function that does not need to be accessed globally should belong in the module template to which it relates.

Generic

It contains ground-zero styles like Normalize.css, global box-sizing rules, CSS resets and so on.

  • generic/_normalize.scss, to flatten cross browser inconsistencies.
    • Note: Although supple has a prepackaged version of normalize.css it is encouraged to include the latest version from normalize.css.
  • generic/_reset.scss, a thin layer on top of normalize.css that provides a starting point more suitable for web applications.

Elements

These are bare, unclassed HTML elements. The Elements layer binds onto HTML element (or 'type') selectors only.

Elements are most likely the last layer in which we'd find element-based selectors, and is very rarely added to or changed after initial setup. Once we have defined element-level styles, all additions and deviations should be implemented using classes.

Objects

This layer is concerned with styling non-cosmetic design patterns, or 'objects'. This can range from something as a .o-wrapper element to .o-layout systems.

All Objects should be prefixed with o-.

Components

This layer contains our recognisable components, chunks of UI.

All Components should be prefixed with c-.

NOTE: Because supple is a design-free framework this layer is completely empty. You can add your own components to your project.

Utilities

this layer contains some handy helpers & overrides. This is the most specific layer of the application which trumps everything defined before.

(*) This set of utilities is only needed if you want to support browsers without custom property support.

All Utilities should be prefixed with u-.

Getting started

Supple is a very design-free framework. This means that the style and design of your site is left entirely up to you. Because supple gives you lots of customisable foundations, you need to add the final layer: UI.

It is advised that you will use supple code throughout your own styles, a sample styles.scss file would look like this:

/* Settings */
@import "node_modules/supple/lib/settings/defaults";
@import "settings/vars";
@import "settings/colors";

/* Tools */
@import "node_modules/supple/lib/tools/functions";
@import "node_modules/supple/lib/tools/mixins";

/* Generic */
@import "normalize";
@import "node_modules/supple/lib/generic/reset";

/* Elements */
@import "node_modules/supple/lib/elements/headings";
@import "elements/links";

/* Objects */
@import "node_modules/supple/lib/objects/list-clean";
@import "node_modules/supple/lib/objects/layout";
@import "node_modules/supple/lib/objects/flexembed";
@import "objects/box";
@import "objects/media";

/* Components */
@import "components/buttons";
@import "components/masthead";
@import "components/navigation.main";

/* Utilities */
@import "node_modules/supple/lib/utilities/fractions";
@import "node_modules/supple/lib/utilities/module";
@import "node_modules/supple/lib/utilities/visually-hidden";
@import "node_modules/supple/lib/utilities/hidden";
@import "utilities/visibility";
@import "utilities/text";

The file index.scss is added as a reference file on how you could implement the smaller modules.

Credits

Supple is derived by the ideas of many other developers:

And probably more…