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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sass-parallax

v0.6.1

Published

Mixins for pure CSS parallax.

Downloads

3

Readme

sass-parallax

A small set of mixins for building pure CSS parallax websites. Based on Keith Clark's layout.

Basic Use

@use 'node_modules/sass-parallax' with ($perspective: 100px);

body {
    @include sass-parallax.body();
}

.parallax {
    @include sass-parallax.page();
}

.parallax__group {
    @include sass-parallax.group();
}

.parallax__bg--deep {
    @include sass-parallax.bg(-200px);
}

.parallax__bg--middle {
    @include sass-parallax.bg(-100px);
}

.parallax__bg--shallow {
    @include sass-parallax.bg(-50px);
}

Document should look something like this:

<body>
    <div class="parallax">
        <div class="parallax__group">
            <div class="parallax__bg--deep"></div>
            <div class="parallax__bg--middle"></div>
        </div>
        <div>
            Non-parallax content
        </div>
        <div class="parallax__group">
            <div class="parallax__bg--shallow"></div>
        </div>
    </div>
</body>

The mixins import also exposes the support mixin, which can be used to include some content only if the browser supports CSS parallax.

.element {
    // some default styles
    @include parallax.support {
        // some parallax-only styles
    }
}

Options

$perspective

You can configure the depth of field when importing the mixins by setting the perspective variable. The higher the value, the "further back" (more negative pixels) will be required to slow the movement of an element. By default it is 2000px; pretty shallow.

The $perspective can also be individually set as a parameter in the page and bg mixins, although this is not recommended, as any difference between them will throw off the parallax alignment.

$IE

In order for parallax layouts to display properly in Internet Explorer (as flat, non-parallax pages) every immediate child of a group element must have their position set to either relative or absolute. This is off by default, to avoid potential cascade issues, but can be applied by setting $IE to true when importing the mixins, or when using the group mixin.

@use 'node_modules/sass-parallax' with ($IE: true);

.parallax__group {
    @include sass-parallax.group($IE: true);
}

$css-properites

Setting this to true will use CSS properties where possible. Rather than letting Sass handle most of the math during build, the bg function will output calc statements for the browser to render. This allows live editing of an element's parallax depth using the --parallax-depth property. This property is a unitless number, and calculates depth relative to the --parallax-perspective property.

@use 'node_modules/sass-parallax' with ($css-properties: true);

.parallax {
    @include sass-parallax.page(100px, $css-properties: true);
    // --parallax-perspective: 100px;
    // sets the perspective on this element
    // and is inherited by its children
}

.parallax__bg--deep {
    @include sass-parallax.bg(-2, $css-properties: true);
    // --parallax-depth: -2;
    // controls depth of this background element
    // relative to --parallax-perspective
}

$disable

A boolean option, defaults to false. Setting this to true will omit any styles within the support mixin, mimicking the styles of an unsupported browser. Useful for testing.

Pure CSS

This package outputs a pure CSS file, dist/parallax.css, with .parallax, .parallax__group, and .parallax__bg classes that style parallax elements using the above CSS properties.