1.0.0 • Published 6 years ago

@lamansky/styles v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

styles

styles is a small library of CSS rules I find myself using in most web development projects. It is packaged as a Sass module.

Installation and Usage

If you have Node.js installed, you can add this module to your project using npm:

npm i @lamansky/styles

Assuming you’re using webpack for your project, include the module into your own Sass/SCSS stylesheet like so:

@use "~@lamansky/styles";

You can then add your own styles that make use of the mixins:

@use "~@lamansky/styles";

ul {
  @include styles.bare-list;
  padding: 1em;
}

nav .skip-link {
  @include styles.screen-reader-only;
  cursor: pointer;
}

This module includes two mixins:

  • bare-list, which is used to strip list-style, margin, and padding from a ul or ol and its child li elements.
  • screen-reader-only, which uses clip to hide text from a visual user agent but leave it accessible to screen reading software.

Related

  • mq: A library of media query mixins for Sass.