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

sassy-inputs

v1.0.6

Published

Minimal CSS3 cross-browser form input styles

Downloads

1,851

Readme

sassy-inputs

Minimal CSS3 cross-browser form input styles.

Sassy Inputs is a Sass mixin library designed to bring simple, uniform, unobtrusive styles to form input fields.

It aims to smooth out the differences in native form styling across browsers, by customizing input fields as much as is currently possible with pure CSS.

Sassy Inputs are customizable, fully keyboard operable, and include a disabled state.

Running the project locally

In the project directory, run:

npm install
gulp

Then go to http://localhost:3000/ in a browser.

Getting started

Using npm

npm install sassy-inputs --save

At the top of your Sass file, before you use any of the mixins:

@import "node_modules/sassy-inputs/sass/main";

Using Bower

bower install sassy-inputs --save

At the top of your Sass file, before you use any of the mixins:

@import "bower_components/sassy-inputs/sass/main";

Mixins

  • sassy-text
  • sassy-textarea
  • sassy-search
  • sassy-select
  • sassy-select-multiple
  • sassy-radio
  • sassy-checkbox
  • sassy-button

Usage

Text fields

You can use the sassy-text mixin for most HTML5 plain single-line text fields, including text, email, password, number and URL.

input[type=text],
input[type=url],
input[type=email],
input[type=password],
input[type=number] {
  @include sassy-text;
}

Text area

textarea {
  @include sassy-textarea;
}

Search

textarea {
  @include sassy-search;
}

Dropdowns

Select

For select dropdowns, you will need to put your <select> element in a wrapper, and apply the mixin to the wrapper instead:

<div class="select-wrap">
  <select>
    <option value="option">Option 1</option>
    <option value="option">Option 2</option>
    <option value="option">Option 3</option>
  </select>
</div>
.select-wrap {
  @include sassy-select;
}

Multiple select

select[multiple] {
  @include sassy-select-multiple;
}

Radio buttons

Make sure your <input type="radio"> elements are written in this format, with the label after the input:

<input type="radio" id="radio1" name="groupname" value="thisvalue">
<label for="radio1">Radio button 1</label>
input[type=radio] {
  @include sassy-radio;
}

Checkboxes

Make sure your <input type="checkbox"> elements are written in this format, with the label after the input:

<input type="checkbox" id="check1" name="groupname" value="thisvalue">
<label for="check1">Checkbox 1</label>
input[type=checkbox] {
  @include sassy-checkbox;
}

Buttons

input[type=submit],
input[type=button],
button {
  @include sassy-button;
}

Customization

Sassy Inputs use the following default variables:

$sassy-base-color: #777 !default;
$sassy-accent-color: coral !default;
$sassy-disabled-color: #eee !default;

To change a color, simply assign the variable before importing Sassy Inputs:

$sassy-accent-color: rgb(233, 206, 51);
@import "node_modules/sassy-inputs/sass/main";