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

@vitagroup/pds-css

v0.13.0

Published

Foundational CSS layer for further library and application integration

Downloads

13

Readme

PDS CSS

PDS CSS aims to provide a very flexible (s)css foundation that can be used to further extend and integrate on. While most use cases are satisfied with the prebuilt css files included within any package distribution, you'll probably find yourself in a situation where you need to customize or extend upon existing (PDS) specifications.

Installation

npm i @vitagroup/pds-css

CSS

There is a naively prebuilt css file for the signature color berry, that can be imported as easy as...

@import "~@vitagroup/pds-css/prebuilt/berry.css";

Sass

Before we can start using the Sass API it's recommended to include the base path to the root of the installed @vitagroup/pds-css/sass lib. This is usually done using the includePaths option of your Sass build configuration.

{
  "includePaths": [
    "node_modules/@vitagroup/pds-css/sass"
  ]
}

The core scss styling functionality can be found in the styleguide module. Additional utility features are also available inside the util module. Both aim to group, forward and simplify the usage of the extensive underlying module foundation consisting of various mixin, function and variable definitions.

@use "styleguide" as pds;
@use "util";

Core Sass API

Building a Styleguide

The core styleguide API basically consists of two mixins, core and html5. Additionally color-classes and typography-classes can be included for the output generation of a set of CSS utility classes.

@use "styleguide" as pds;

@include pds.core;
@include pds.html5;
@include pds.sheet;

@include pds.color-classes;
@include pds.typography-classes;

Customizing a Styleguide

Let's assume we want to change the primary color palette to some purple-ish colors. And we are also including only a subset of the available styleguide mixins.

@use "styleguide" as pds with (
  $color-primary-dark: #5c5c80,
  $color-primary: #9393cc,
  $color-primary-light: #b8b8ff
);

@include pds.core;
@include pds.html5;

Building a Theme

A common desire, especially by developers, is a dark theme. Luckily the PDS comes with its own pre-defined dark theme, pds.$dark-theme. The theme should basically take effect as soon as we apply the dark class somewhere.

@use "styleguide" as pds;

@at-root .dark {
  @include pds.theme(pds.$dark-theme);
}

We can also create a custom dark theme with just some gray overwrites.

@use "styleguide" as pds;

$dark-theme: pds.theme-define(
  (
    "foreground": #f2f2f2,
    "background": --gray-lightest,

    "gray-darkest": #d9d9d9,
    "gray-darker": #bfbfbf,
    "gray-dark": #6b6b6b,
    "gray": #383838,
    "gray-light": #212121,
    "gray-lighter": #1a1a1a,
    "gray-lightest": #141414
  )
);

@at-root .dark {
  @include pds.theme($dark-theme);
}