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

@scarab/core

v7.0.0-rc.7

Published

Sass library for rapid stylesheet development

Downloads

22

Readme

Design token management · Responsive mixins · Helper functions

npm-beta Build Status


💿 Installation · 📚 Documentation · ⭐️ Features · 🍃 Ecosystem 🎉 Motivation · ❤️ Contributing · 📃️ License


💿 Installation

  1. Install Scarab Core as a dev-dependency:
# With yarn
$ yarn add @scarab/core -D

# Or with npm
$ npm install @scarab/core --save-dev
  1. Add node_modules/ to your Sass includePaths.

  2. Import the Scarab Core library before all other stylesheets:

// Import the Scarab Library
@import '@scarab/core/_';

// Write your Sass here...

📚 Documentation

API documentation and guides: https://scarab.style/core

⭐️ Features

Design token management

Design systems consist of reusable “tokens”. Each token has a name and a value associated with it. Constructing digital interfaces using only the values of tokens that are defined in a design system ensures visual consistency. Scarab provides a simple interface for managing design tokens.

Helper functions

Provides additional syntactic sugar on top of the default Sass functions.

Responsive mixins

Simplifies working with breakpoints and media queries.

🍃 Ecosystem

In addition to the core library, the following packages are available in the Scarab ecosystem:

| Package name | Description | | :-- | :-- | | Carapace | CSS utility class generator | | Scarab CLI (WIP) | Command-line tools for the Scarab ecosystem | | Scarab snippets (WIP) | Scarab snippets for your favorite text editors and IDE's |

🎉 Motivation

Why another Sass library?

Scarab is the resulting by-product of years of web development work. It's designed and built as a library to manage design tokens and to provide additional syntactic sugar for writing stylesheets.

Why use Scarab?

  • Define design tokens in Sass (ideal since it's a styling language)
  • Use tokens in Sass with Scarab, and in HTML with Carapace
  • Ability to export design tokens from Sass to JSON
  • Written in Sass; No additional dependencies
  • Well tested with 100+ unit tests
  • Ecosystem of related packages

Why not just use Sass variables?

Using Sass variables to manage design tokens can be a viable solution for small projects. However, this approach has its limitations. For instance, in Sass, it's not possible to dynamically reference a variable by name. On the other hand, this becomes possible if tokens are stored in a Sass map instead of variables. This opens up many possibilities, and is the main impetus behind the Scarab library.

Alternative libraries

Other options are available, and you should pick one that caters to your project's requirements.

  • Tailwind — Generates CSS utility classes with short compile time. Requires PostCSS or Tailwind CLI.
  • Tachyons — Good for smaller sites that use native CSS variables (a.k.a. custom properties).
  • BassCSS — Alternative to Tachyons. Also uses CSS variables.
  • Vue DS — Full-featured design system framework for Vue.

❤️ Contributing

Issues and feature requests and PR's are welcome!

📃️ License

Licensed under BSD 3-Clause. Copyright © Kyle Oliveiro 2018.