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

@metabolism/framework

v1.3.4

Published

Scss/VueJS libraries

Downloads

75

Readme

Scss/VueJS libraries

In your main sass file, import the framework, order is important.

Use node-sass-glob-importer to allow **/* notation

/* CSS Framework */
@import "node_modules/@metabolism/framework/scss/reset";
@import "node_modules/@metabolism/framework/scss/function/**/*.scss";
@import "node_modules/@metabolism/framework/scss/variable/**/*.scss";
@import "node_modules/@metabolism/framework/scss/mixin/**/*.scss";
@import "node_modules/@metabolism/framework/scss/misc/**/*.scss";
@import "node_modules/@metabolism/framework/scss/class/**/*.scss";
@import "node_modules/@metabolism/framework/scss/data-attribute/**/*.scss";

/* VUEJS Specific */
@import "node_modules/@metabolism/framework/vuejs/**/*.scss";

Features

Media queries

Following Chrome devtools specification, there is several size predefined :

phone    : 425px
phone-m  : 375px
phone-s  : 320px
tablet   : 768px
small    : 1024px
large    : 1440px
4k       : 2560px

From

@media #{$from-phone}{ }

compile to

@media screen and (min-width: 425px){ }

To

@media #{$to-phone}{ }

compile to

@media screen and (max-width: 767px){ }

Only

@media #{$only-phone}{ }

compile to

@media screen and (min-width: 425px) and (max-width: 767px){ }

Vertical center

use the vcenter class, to use flex powered vertical center

Display

hide-on and show-on attributes

Works will standard media queries, defined in media-queries.scss 4k, large, medium, small, tablet, phone, phone-m, phone-s

Also works with js defined <html> class, mobile/desktop based on user agent

<div data-hide_on="phone">
    I'm on a tablet or desktop
</div>
<div data-show_on="phone">
    I'm on a phone
</div>

Animate on scroll

Import VueJS specific scss

@import "node_modules/rocket-framework/vuejs/**/*.scss";

Import lib

import VueAOS from '@metabolism/framework/vuejs/on-scroll'
Vue.use(VueAOS);

Add markup

<on-scroll animation="slide-up">Title</on-scroll>
<!-- disable on mobile -->
<on-scroll animation="slide-up" mobile="disabled">Title</on-scroll>
<!-- Generate markup using a span -->
<on-scroll animation="slide-up" tag="span">Title</on-scroll>
<!-- Change delay and duration -->
<on-scroll animation="parallax" delay="100" duration="500">Title</on-scroll>

<!-- use directive -->
<h2 class="title" v-on-scroll={animation:'fade-in'}>Title</h2>

Available animations :

  • fade-in
  • fade-out
  • slide-down
  • slide-up
  • slide-left
  • slide-right
  • zoom-out
  • zoom-in
  • unzoom-in
  • unzoom-out
  • rotate-x
  • rotate-y
  • pop
  • enlarge

Special animations :

  • increment
  • parallax

Parallax :

<!-- Parallax 200px -->
<on-scroll animation="parallax" strength="200px">Title</on-scroll>

<!-- Parallax 10% from center, inverted offset -->
<on-scroll animation="parallax" invert="true" center="true" strength="10%">Title</on-scroll>

Aspect ratio

Define size in css

<div class="Product">
  <img src="product.jpg"/>
</div>

.Product{
  @include aspect-ratio(1/2);
  img{ position:overlay(); object-fit:cover }
}

Background size

Add preconfigured settings

background : cover();
background : fit();
background : contain();
background : fit-height();
background : fit-width();

Position

Add new position behaviour

position : overlay();
position : overlay('fixed');

position : center();
position : center('x');
position : center('y');

Transition

Add optimized transition properties and shorthands

transition: allow( transform opacity );
transition: allow( transform opacity, 0.3s );
transition: allow( transform opacity, 0.3s, $ease-in-out-cubic );

Icon

Add an icon directly from the html

<a data-icon="facebook"></a>
<a data-icon-after="facebook"></a>

or in the scss file

@include icon('facebook');
@include icon('facebook', 'after');

Unsupported browsers

You can configure $unsupported-browsers variable to display a nice message on unsupported browser

Predefined variables

Animations

Duration, delay, offset ...

Easing

Cubic, Quart, In out...

Keyframes

Fade-in, Fade-out, Slide-up ...

Social colors

Colors for Facebook, Twitter, Pinterest ...

Misc

Change scrollbar style (size, background, thumb )

@include scrollbar(4px, #000, #fff);

Style placeholder

input{
    @include placeholder { color:#fff };
}