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

@fishawack/lab-ui

v12.6.1

Published

Css framework

Downloads

1,093

Readme

Background

What

Fishawack stylesheet.

Why

Prevent code repetition.

Getting started

Install

npm install @fishawack/lab-ui

Create the following files

_Build/sass/general.scss
_Build/sass/vendor.scss
_Build/sass/_variables.scss
_Build/sass/_defaults.scss

general.scss

@import "_variables.scss";

@import "_defaults.scss";

// Local project imports

vendor.scss

@import "_variables.scss";

@import "_defaults.scss";

@import "normalize.css/normalize";

#svgSprite{
	position: absolute;
	width: 0;
	height: 0;
	z-index: -1;
}

// Vendor imports / Lab-ui imports

_variables.scss

@import "@fishawack/lab-ui/_variables.scss";

// Set global variables here, e.g $color6: red;

_defaults.scss

@use "_variables.scss";

@import "@fishawack/lab-ui/_defaults.scss";

// Dynamic variables
$colors: variables.dynamic('color', module-variables("variables"));

// Override lab-ui defaults here, e.g $button: $color6;

Aspect ratio

Lab Ui comes with a built in mixin for forcing the aspect ratio of the entire webpage. This will work out of the box with the boilerplate code by simply including the forceRatio mixin.

@include forceRatio();

Aswell as calling the mixin you will then need to update any sass variables that are currently pixel values to rem values. You can do this by using the get-ratio() function to convert pixel values directly to rem values.

$fontSize should not be set to a get-ratio value as this is the root value used for all calculations and will be converted to rem's automatically by the mixin.

$spacing: get-ratio(10px);
$radius: get-ratio(5px);
$iconSize: get-ratio(40px);

If your not using the boilerplate code then you simply need to wrap the root container of your site in the following tags

<body>
    <div class="forceRatio">
        <div class="forceRatio__inner">
            ...rest of the site goes here
        </div>
    </div>
</body>

By default @include forceRatio() will force a 16:9 aspect ratio with 1920x1080 as the base size. To change the ratio you just need to set the $screen variable in _variables.scss before calling the mixin or pass the values directly into the mixin.

$screen : (1024, 768);

@include forceRatio();

// OR

@include forceRatio(1024, 768);

Modern only

All code will work in all browsers by default and will automatically switch between the correct css to use. If you're certain that backwards compatibility isn't required and want to remove support for older browsers you can by turning legacy mode off in your _defaults.scss.

$legacy: false;

Migrating

12.0.0

normalize.scss was poorly maintained, so we've switched to the base normalize.css which requires a slightly different import.

// Old way
@import "normalize";
@include normalize();

// New way
@import "normalize.css/normalize";

11.0.0

The library is now bundled into a much smaller package where all the sass files are found directly at the root. Previously we set our sass to look inside the package up the directory tree to simplify the imports. Now the imports must be regular import/use paths to the file needed.

// Old way
@import "lab-ui/_mixins.scss";
@import "lab-ui/_grid.scss";

// New way
@import "@fishawack/lab-ui/_mixins.scss";
@import "@fishawack/lab-ui/_grid.scss";