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

sass-base-lm

v0.0.5

Published

[![npm](https://img.shields.io/npm/v/sass-base-lm?color=%2343BD15)](https://www.npmjs.com/package/sass-base-lm)

Downloads

6

Readme

SASS Base by Luis Melo

npm

This code base is intended to be used as a basis for your project, using SASS.

Table of Contents

  1. Installation
  2. Import to your SASS project
  3. API
  4. Contributing
  5. License

Installation

npm install sass-base-lm --save-dev

or

yarn add sass-base-lm --dev

Import to your SASS project

In your SASS root file, just import the styles.scss:

//  Without Webpack
@import 'node_modules/sass-base-lm/assets/styles';

//  With Webpack
@import '~/node_modules/sass-base-lm/assets/styles';

API

Mixins

media(dimension: string)

Allows to create styles to be used in intervals of screen widths. The dimension argument can be:

  • screen: Only apply styles when using a computer screen, tablet, smart-phone, etc.
  • landscape: Only apply styles when using a screen and landscape orientation.
  • portrait: Only apply styles when using a screen and portrait orientation.
  • xsmall-up: Apply when width is greater than 0em.
  • xsmall-only: Apply when width is up to 48em.
  • small-up: Apply when width is greater than 48em.
  • small-down: Apply when width is up to 62em.
  • small-only: Apply when width is between 48em and 62em.
  • medium-up: Apply when width is greater than 62em.
  • medium-down: Apply when width is up to 75em.
  • medium-only: Apply when width is between 62em and 75em.
  • large-up: Apply when width is greater than 75em.

media-query(dimension: string)

Create a media query where the max-width will be equal to the dimension argument value.

media-query-min(dimension: string)

Create a media query where the min-width will be equal to the dimension argument value.

media-query-range(dimension1: string, dimension2: string)

Create a media query where the min-width will be equal to the dimension1 value, and max-width will be the dimension2 argument value.

font-size(size: string)

Converts a pixel based size to REM and returns both sizes (px and rem) in order to be backward compatible.

Classes

Padding and Margin

The padding and margin classes implement the BEM methodology.

For the block, you can specify the padding or margin as a prefix.

The element represents the side of the element that the style will be applied:

  • __top: Apply only to top
  • __bottom: Apply ony to bottom
  • __topbottom: Apply to top and bottom
  • __left: Apply only to left
  • __right: Apply only to right
  • __leftright: Apply to left and right

The modifier represents the amount of pixels that will be set for that side. The pixels can be applied using a step of 5px, and can be used on a range from 5px to 60px.

The end class will be something like margin__topbottom--45. This example will apply a margin of 45px to the top and bottom of an element.

Functions

calculateRem(size: string)

Convert a given size in pixels to REM units, having in mind that the default font size on html is 100%, equivalent to 16px.

Contributing

Want to contribute? We'd love that!

If you have a feature request or bug to report, please fill out a GitHub Issue to begin the conversation.

License

This project is open-sourced software licensed under the MIT license.