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

tailwindscss

v0.3.0

Published

SCSS version of Tailwind CSS for people who don't use modern module bundler

Downloads

3,173

Readme

Build Status License: MIT npm version

Tailwind SCSS

SCSS version of Tailwind CSS for people who don't use modern module bundler.

Why??

The original Tailwind CSS use PostCSS for its CSS preprocessor. Therefore, we have to use Node.js module bundler (Webpack, Rollup etc) in order to get fully control over Tailwind's customization. Unfortunately, there are many cases (mainly on legacy apps) where we couldn't use Node.js and I don't want this issue to prevent us from using Tailwind CSS.

By using SCSS format, I hope that more people especially who have non Node.js apps can start using Tailwind CSS and progressively improve their tech stack to use the original version eventually.

We try to keep this library as close as possible with future development of Tailwind CSS.

Installation

Using npm:

npm install tailwindscss --save

or yarn:

yarn add tailwindscss

Usage

To use it on your SCSS, you can import entire style like this:

@import "tailwindscss";

or you can choose to import one by one:

@import "tailwindscss/base";
@import "tailwindscss/utilities";

Configuration

By default, it will generate all styles which are equivalent to Tailwind CSS's default configuration. Below is what our configuration looks like.


@import 'tailwindscss/src/helper';

$prefix: ''; // Selector prefix;
$separator: '_'; // Separator for pseudo-class and media query modifier

$theme-colors: (
  transparent: transparent,
  black: #000,
); // Theme configuration

$variants-text-color: (responsive, hover, focus); // Variants configuration

$core-plugins-text-color: true; // Set false to disable utility

To customize utilities, you need to import your own configuration file at the top of your SCSS file.

@import "path-to/tailwind.config.scss";
@import "tailwindscss/base";
@import "tailwindscss/utilities";

For starting out, you can run npx tailwindscss init to get full configuration.

Documentation

Head to the original website for more guideline about utilities. Of course, some sections like installation are not applicable for this library.

Limitation

Because of SCSS limitation, below features cannot be provided in this library:

SCSS does not support several characters like colon (:) and backslash (/) because it will always be evaluated as language's keywords. For your safety, keep your prefix and separator with dashes (-) and underscore (_) characters.

TODO

  • [ ] important flag
  • [x] responsive
  • [x] pseudo-class (hover, focus, focus-within, active and group-hover)
  • [x] colors