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

scss-layout

v2.0.1

Published

SCSS file to make easy the apply some syles using css classes.

Downloads

182

Readme

SCSS LAYOUTS

A SCSS lib to make easy the apply some syles using css classes.

Demo

Check the CHANGELOG for the latest changes.

  • margin
  • padding
  • height
  • width
  • display flex
  • elevation (box-shadow)
  • material design color palette (background color and color)

Instalation

Download

Download file at dist/css/layout.min.css to get minify css file and add into html

Add npm module

  • install npm module
 npm install scss-layout --save
  • get the scss from node_modules
 @import 'node_modules/scss-layout/scss/core'

Usage Elevation

There are 4 levels (1 - 4) to have level 2 of elevation

  class="elevation-2"

Usage (Margin) in px

to margin-top

class="mt-4"

to margin-bottom

class="mb-4"

to both vertical margin

class="my-4"

to all margins

class="m-4"

Usage (Padding) in px

to padding-top

class="pt-4"

to padding-bottom

class="pb-4"

to both vertical padding

class="py-4"

to all paddings

class="p-4"

Usage (Height) in px

to height 100px or 100%

class="h-100"

Usage (Height) in %

to height 100%

class="h100"

Usage (Width) in px

to width 100px

class="w-100"

Usage (Width) in %

to width 100%

class="w100"

Usage (Width and Height) in px

to width and height 100px (0 to 500)

class="wh-100"

Usage (Width and Height) in %

to width and height 100% (0 to 100)

class="wh100"

Usage Display Flex

Flex Direction

class="fx-col"
class="fx-row"

Flex Gap

to space between elements 20px - 0 to 500

class="fx-gap-20"

Flex Width (%)

to height or width in % 0 to 100

class="fx-20"

Flex Align

class="fx-center-start"
class="fx-center-end"
class="fx-center-center"
class="fx-center-stretch"
class="fx-start-start"
class="fx-start-end"
class="fx-start-center"
class="fx-start-stretch"
class="fx-end-start"
class="fx-end-end"
class="fx-end-center"
class="fx-end-stretch"
class="fx-between-start"
class="fx-between-end"
class="fx-between-center"
class="fx-between-stretch"
class="fx-around-start"
class="fx-around-end"
class="fx-around-center"
class="fx-around-stretch"
class="fx-evenly-start"
class="fx-evenly-end"
class="fx-evenly-center"
class="fx-evenly-stretch"

Usage material design color palette

must import the scss file

  • create a material palette (example)
$palette: (
  50: #e4e9ee,
  100: #bbc9d4,
  200: #8ea5b8,
  300: #60809b,
  400: #3e6585,
  500: #1c4a70,
  600: #194368,
  700: #143a5d,
  800: #005079,
  900: #092241,
  A100: #79adff,
  A200: #468eff,
  A400: #136fff,
  A700: #0061f8,
  contrast: (
    50: #000000,
    100: #000000,
    200: #000000,
    300: #ffffff,
    400: #ffffff,
    500: #ffffff,
    600: #ffffff,
    700: #ffffff,
    800: #ffffff,
    900: #ffffff,
    A100: #ffffff,
    A200: #ffffff,
    A400: #ffffff,
    A700: #ffffff,
  ),
);
  • Include the @mixin material-palette (should pass true if the palette is from 50 to 900 only)
@include material-palette($palette, 'primary-example');
  • Get the color from palette
background-color: palette-color($palette);
background-color: palette-color($palette, 500);
  • Get the contrast color from palette
color: palette-color-contrast($palette);
color: palette-color-contrast($palette, 500);
  • Using color primary from $palette (.mat-color)
class="mat-color-primary-example"
class="mat-color-primary-example-A200"

Usage mixins

flex

@include flex('column') // to column
@include flex() // to row

flex-gap

@include flex-row-gap(20) // to row
@include flex-col-gap(20) // to column

flex-aligh

@include flex-align('center-center')

check options on Flex Align

Todos

  • Write MORE styles

Tools

  • IDE: Vs Code

Extensions:

| Name | Link | | --------- | ----- | | Live Sass Compiler | Badge for version for Visual Studio Code extension ritwickdey.live-sass | | Live Server | Badge for version for Visual Studio Code extension ritwickdey.live-sass |

License

MIT