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

literally.css

v0.3.0

Published

A CSS utility library that literally translates classes into styles.

Downloads

3

Readme

literally.css

A CSS utility library that literally translates classes into styles.

Features

Literal, one-to-one mapping from classes to styles

All classes in literally.css map exactly to the CSS property and value.

For example, the class display-none applies display: none, margin-0 applies margin: 0; and so on. See docs/classes.md for the full list of classes.

!important styles

Adding ! to the end of any class name adds !important to the style. For example, the class display-none! applies display: none !important;.

Trivial values only

By only including trivial values such as 0 and none. literally.css avoids making any assumptions about your design system.

You can extend literally.css by adding more specific utility classes in your project's stylesheet and following the same "literal" naming convention.

Usage

Install literally.css with npm:

npm install literally.css

Add dist/css/literally.css to the head tag or your page:

<link rel="stylesheet" href="node_modules/literally.css/dist/css/literally.css" />

FAQ

Why not just use inline styles?

literally.css can be used together with inline styles. However, inline styles have higher specificity than styles defined in an external stylesheet. literally.css provides a way to apply styles with low specificity (a single class selector). On the other hand, the !important variants have higher specificity than inline styles and allow you to override them.

Why not abbreviate class names?

Abbreviated classes like my-3 or d-inline are commonly seen in popular utility libraries such as Boostrap, Tachyons, Tailwind, etc. In comparison, the "literal" approach taken by literally.css is arguably more readble and easier to learn, even if it is not as compact.