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

@visual-framework/vf-sass-config

v2.7.3

Published

vf-sass-config

Downloads

2,035

Readme

Sass Config and templates

npm version

About

Mixins, functions and variables to power all vf-core components. If you're using a Visual Framework component it's a near-certainty that you'll need this component.

Usage

Note: these utilise vf-design-tokens

Functions

set-color.scss

set-color($color-name)

map-deep-get.scss

map-deep-get($map, $keys)

set-layer.scss

set-layer($layer)

string-replace.scss

str-replace($name, $number)

Slice off the first amount($number) of characters from the $name value passed. Primarily used to replace the start of variables for the utility class generation.

vf-functions.scss

Rollup of all functions.


Mixins

blockquote.scss

Reusable styling for html blockquote elements.

@include blockquote;

button.scss

Reusable styling for button elements

@include vf-button;

divider.scss

Reusable styling for divider elements and styling

@include vf-divider;

figure.scss

Reusable styling for figures with optional caption styling

@include figure($has-caption: true);

helpers.scss

Nothing, yet.

links.scss

Styling for links.

@include inline-link( $vf-link--color: $vf-link--color, $vf-link--hover-color: $vf-link--hover-color, $vf-link--visited-color: $vf-link--visited-color, $vf-include-normalisations: $vf-include-normalisations);

@include button-link( $vf-link--color: $vf-link--color, $vf-link--hover-color: $vf-link--hover-color, $vf-link--visited-color: $vf-link--visited-color);

button-link--ghost( $vf-link--color: $vf-link--color, $vf-link--hover-color: $vf-link--hover-color, $vf-link--visited-color: $vf-link--visited-color);

lists.scss

Styling for list types

@include($classname: optional-classname-to-usm, $type: null, unordered, ordered or inline);

margin.scss

Margin, recommended to use with sizing maps

@include margin--block(bottom, map-get($vf-spacing-map, vf-spacing--500));

  • margin-block: specify one value for bottom and top, top or bottom
  • margin-all: specify one value for left or right, left or right
  • margin: specify all or a value for each

padding.scss

Padding, recommended to use with sizing maps

@include padding--block(bottom, map-get($vf-spacing-map, vf-spacing--500));

  • padding-block: specify one value for bottom and top, top or bottom
  • padding-all: specify one value for left or right, left or right
  • padding: specify all or a value for each

text-color.scss

Currently not used. Intelligently pick if white or black should be used as a contrasting colour

typography.scss

Generate correct font information when included into an element. Recommended to use with typography and sizing maps

@include set-type(text-body--3, $global-font-family, $custom-margin-bottom: vf-spacing--500, $color: secondary)

Color setting can be turned off by passing $color: ignore.

utility--color.scss

Generate lists of values in design token maps. Intended for use by the vf-utility-classes component

utility--slide.scss

A non-jitter causing way to slide elements up/down on hover.

@include vf-slide-on-hover($shift-distance, $direction:up);

utility--spacing.scss

Generate lists of values in design token maps. Intended for use by the vf-utility-classes component

utility--typography.scss

Generate lists of values in design token maps. Intended for use by the vf-utility-classes component

vf-mixins.scss

Rollup of all mixins.

vf-utility-mixins.scss

Rollup of all utility mixins.

vf-disabled.scss

For disable link elements, actions @include vf-disabled($vf-link--disabled-color);


Variables

vf-global-custom-properties.scss

Native CSS properties, currently limited to document spacing.

vf-global-variables.scss

Global Sass variable defaults for the high-level page look of typography, page width, deprecated component text, if normalisations should be included.

vf-variables.scss

Rollup of global Sass variables.

Install

This repository is distributed with npm. After installing npm, you can install vf-sass-config and its dependencies with this command.

$ yarn add --dev @visual-framework/vf-sass-config @visual-framework/vf-design-tokens

You might also find the the vf-sass-starter a useful starting point for setting up a customised Sass build.

Sass/CSS

The style files included are written in Sass. If you're using a VF-core project, you can import it like this:

@import 'vf-global-variables';
@import 'vf-variables';
@import 'vf-functions';
@import 'vf-mixins';

Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the vf-sass-starter

Help