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

@primate-inc/mono

v1.0.0

Published

``` ___ ___ ___ ___ /__/\ / /\ /__/\ / /\ | |::\ / /::\ \ \:\ / /::\ | |:|:\ / /:/\:\ \ \:\ / /:/\:\ __|__|:|\:\ / /:/

Downloads

15

Readme

      ___           ___           ___           ___     
     /__/\         /  /\         /__/\         /  /\    
    |  |::\       /  /::\        \  \:\       /  /::\   
    |  |:|:\     /  /:/\:\        \  \:\     /  /:/\:\  
  __|__|:|\:\   /  /:/  \:\   _____\__\:\   /  /:/  \:\ 
 /__/::::| \:\ /__/:/ \__\:\ /__/::::::::\ /__/:/ \__\:\
 \  \:\~~ \_\/ \  \:\ /  /:/ \  \:\~~\~~\/ \  \:\ /  /:/
  \  \:\        \  \:\  /:/   \  \:\        \  \:\  /:/ 
   \  \:\        \  \:\/:/     \  \:\        \  \:\/:/  
    \  \:\        \  \::/       \  \:\        \  \::/   
     \__\/         \__\/         \__\/         \__\/    

Welcome to MONO

MONO is a framework agnostic utility library for SASS. It helps to manage your styles between Figma and your code.

MONO is not generating any CSS code, insteead it provides you access to Figma Variables and set of useful tools to help you reflect the designs easier in your code.

Installation

For now entirely manual.

Future Installation

Requirements

  • npm package installer (npm, yarn, pnpm, etc)
  • Dart Sass compiler
pnpm add -D @primate-inc/mono

pnpm mono init -p ./styles

This will install MONO and copy files into the styles/mono. Replace example tokens.json file with your DesignTokens exported from Figma. Next you can update all the other files to match your preferences and new tokens file.

pnpm mono tokens -p ./styles

Next you can import mono at the beginig of your stylesheet @import 'styles/mono'; and compile you scss files using preffered tool.

Usage

MONO contains a set of helpful functions and mixins to use your tokens data more efficiently.

Typography mixin:

This converts typography token into responsive css styles.

@include typography(header)

Screen mixin:

This serves as a media query generator. Simply provide it with a breakpoint from tokens and properties.

@include screen(desktop) {
      margin-left: 2rem;
}

Token function:

Mostly used to assign tokens to more functional slots, but can also be used to assign a value to css property.

$slots: (
    page: (
        background: token(color, blue, 500);
    )
);

or

div {
    background: token('color', 'white');
}

Slot function:

Slots are like a catalog for your styles. Their names are more meaningful and functional comparing to tokens.

body {
    background: slot(page, background);
}

or

:root {
    --text-color: slot(page, text);
}

Responsive Slot mixin:

You can use your slot as responsive using breakpoints names as keys in a map instead of the value in $slots map.

$tokens: (
    breakpoints: (
        desktop: ...,
        tablet: ...,
        ...etc
    )
);

Note: default and any custom breakpoints can be added in $slots map.

$slots: (
    grid: (
        wide: (
            default: '1 / -1',
            tablet: '3 / -3',
            desktop: '3 / 8,
        )
    )
);
div {
      @include responsive-slot('grid-column', grid, wide);
}

License

This project is licensed under the MIT License.