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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@amateras/css

v0.1.0

Published

Downloads

601

Readme

amateras/css

Import

import 'amateras';
import 'amateras/css';

Define Style

const style = $.css({
    backgroundColor: 'black',
    margin: 0,

    'p': {
        color: 'blue'

        '@media (max-width: 800px)': {
            color: 'red'
        }
    }
})

$('div', { css: style }, $$ => {
    $('p', $$ => $`Change the size of window to see the color changes.`)
})

Define Style in Layout

There are two way to define CSS rule of proto.

$('div', $$ => {
    $$.css({
        padding: '1rem 2rem'
    })
    $('h1', { css: { color: 'red' } }, $$ => $`This is a title with red color!`)
})

Define Variables

Single Variable

const largeText = $.css.variable('1.2rem');

$.css({
    fontSize: largeText
})

Variable Group

import 'amateras/css/variable';

const text = $.css.variable({
    small: '0.8rem',
    medium: '1rem',
    large: '1.2rem'
})

$.css({
    fontSize: text.large
})

Define Keyframes

import 'amateras/css/keyframes';

const keyframes = $.css.keyframes({
    fadeIn: {
        '0%': { opacity: 0 },
        '100%': { opacity: 1 }
    },
    fadeOut: {
        from: { opacity: 1 },
        to: { opacity: 0 }
    }
})

$.css({
    animation: keyframes.fadeIn
})

Define CSS Rules with Selectors

$.CSS({
    'html': {
        fontSize: '18px',
        fontFamily: 'Noto Sans',

        'body': {
            margin: 0,

            '.title': {
                color: 'red'
            }
        }
    },

    '@media (max-width: 800px)': {
        'html': {
            fontSize: '1rem',

            '@media (orientation: landscape)': {
                fontSize: '1.2rem'
            },
        }
    },
})

CSS Colors Preset

You can import colors preset from amateras/color/COLOR_NAME or amateras/colors path. These colors are reference from Tailwind colors, read the documentation to know about the concepts.

// import black and white color preset
import 'amateras/color/blackwhite';
$.color.black; // '#000000'
$.color.white; // '#ffffff'

// import slate colors preset
import 'amateras/color/slate';
$.color.slate[100]; // '#f1f5f9'
$.color.slate[200]; // '#e2e8f0'

// import all colors preset
import 'amateras/colors';
$.color.red[600]; // '#dc2626'
$.color.zinc[500]; // '#71717a'