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-kit/supple-css

v5.7.1

Published

Reliable and testable Sass framework. Fluid, Variable, supple if you will

Downloads

197

Readme

Supple (S)CSS framework

npm (scoped) npm changelog

Introduction

Supple CSS is a reliable and testable Sass framework in its truest sense. It's based on the ITCSS methodology and is suited very well for component-based UI development. Supple CSS plays well with React, Angular, Vue, Svelte, and every other component-based approach to UI development.

Table of contents

Why use Supple

It is a small but powerful (S)CSS framework designed especially with modern browsers in mind. The framework is made with an eye on the future. It uses new CSS webstandards like custom properties, Grid layout, Flexbox, logical properties.

Supple provides little to no design. This means that the style and design of your site are left entirely up to you. Because Supple gives you lots of customizable foundations you only need to add the final layer: UI.

Features

A grasp of Supple's features:

  • Sensible, powerful CSS reset for web applications.
  • Suite of functions and mixins for speedy development.
  • CSS Grid & Flexbox objects for creating layouts.
  • Objects for reusable solutions to common features.
  • Variety of utility classes for the most common needs like visually hiding, spacing, and more.

Size

The framework including all modules weighs less than 1.6kB (GZIP-ed). With this small payload, you have the power to build an entire website without even writing a single line of CSS. You can reduce the payload even further by only including the modules you need, and configure those modules to your needs.

Browser support

Supple supports all major browsers which can render the following features:

Basically that comes down to:

  • Chromium-based browsers (Chrome, Edge, Brave, Opera)
  • WebKit-based browsers (Safari, iOS Safari)
  • Firefox (Gecko)

Note: Internet Explorer is not supported. Supple relies mostly on CSS Custom Properties, which are not supported and cannot be polyfilled.

Installation

Prerequisites

Supple is built with the latest version of Sass so your build-pipeline must be equipped with Dart Sass.

Install

  • npm: npm install @supple-kit/supple-css

Getting started

Supple is built using the Sass module system and it is advised to structure your application the same way.

Below are some examples of how to use and structure the framework:

With 1 manifest file, eg. styles.scss

// styles.scss
@use 'settings/your-own-vars';
@use 'node_modules/@supple-kit/supple-css/objects/mesh';
@use 'components/your-own-component';
@use 'node_modules/@supple-kit/supple-css/utilities/colspan';
// settings/_your-own-vars.scss
@use 'node_modules/@supple-kit/supple-css/settings/defaults' with (
  $font-size: 20px,
  $columns: 10,
  $breakpoints: (
    lap: 320px,
    desk: 960px,
  )
);

@use 'node_modules/@supple-kit/supple-css/objects/mesh/variables' with (
  $columns: 24
);
// components/_your-own-component.scss
@use 'node_modules/@supple-kit/supple-css/settings/defaults';
@use 'node_modules/@supple-kit/supple-css/tools/space';
@use 'settings/your-own-vars';

.your-own-component {
  margin-inline-start: space.get('base');
  transition-timing-function: your-own-vars.$animation-timing-function;
  font-size: defaults.$font-size;
}

In a component-based setup like React, Vue, Svelte, etc.

// settings/_your-own-vars.scss
@use 'node_modules/@supple-kit/supple-css/settings/defaults' with (
  $font-size: 20px,
  $columns: 10,
  $breakpoints: (
    lap: 320px,
    desk: 960px,
  )
);
// components/your-own-component/index.js
import './index.scss';

// rest of your javascript code
// components/your-own-component/index.scss
@use 'settings/your-own-vars';
@use 'node_modules/@supple-kit/supple-css/tools/space';

.your-own-component {
  margin-inline-start: space.get('base');
  transition-timing-function: your-own-vars.$animation-timing-function;
}

Available modules

All Supple's modules are created based on the ITCSS methodology. It is advised you to read ITCSS documentation to fully grasp the ideas about the methodology.

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 global box-sizing rules, CSS resets, and so on.

  • generic/reset, a reset of sensible defaults 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.

Note: Because Supple is a design-free framework this layer is empty.

Objects

This layer is concerned with styling non-cosmetic design patterns, or 'objects'.

All Objects are prefixed with o-.

Components

This layer contains our recognizable components, chunks of UI.

All Components are prefixed with c-.

Note: Because Supple is a design-free framework this layer is 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 overrides everything defined before.

All Utilities are prefixed with u-.

Browserstack

Every feature in Supple is extensively tested in Browserstack:

Credits

Supple is derived from the ideas of many other developers:

And probably more…