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

@team23/design-system

v0.2.3

Published

A set of (S)CSS Rules for basic styling that should be a common base for all projects in TEAM23 SE.

Downloads

186

Readme

Design System

A set of (S)CSS Rules for basic styling that should be a common base for all projects in TEAM23 SE.

Published using NPM.

How to use it in your projects

Install package as dependency

npm i @team23/design-system

Import styles

@import '@team23/design-system/theme'; only once in your main style file to have access to all global classes and placeholders.

@import '@team23/design-system/utilities'; in every file you want to use some helper mixins or functions

Customization

Every variable from the variables folder can be overridden for each app individually.

/* Import all variables and utilities */

$base-size: 1rem;
$spacing-xs: 4rem;

$color-mapping-for-utilities: (
    grey: #888,
);

$color-mapping-for-background: (
    primary: (
        heading: yellow,
    ),
);

@import '@team23/design-system/utilities';
@import '@team23/design-system/theme';

Note: you cannot import the utilities before overwriting the variables.

Structure

theme/
|
|- abstracts/
|   |- _color.scss              # mixins to work with colors
|   |- _spacing.scss            # mixins to work with spacing
|   |- _typography.scss         # mixins to work with typography
|
|- ui/
|   |- _base.scss               # global styling that might want to stay in the design system
|   |- _color.scss              # utility classes to work with color
|   |- _reset.scss              # base styling to reset browser defaults
|   |- _spacing.scss            # utility classes to work with spacing
|   |- _typography.scss         # utility classes to work with typography
|
|- variables/
|   |- _base.scss               # base css variables
|   |- _color.scss              # variables to define available colors (e.g. colors and mappings)
|   |- _spacing.scss            # variables to define available spacings (e.g. sizes and names)
|   |- _typography.scss         # variables to define typography (e.g. font-sizes and family)
|
|- vendors/
|   |- _primeflex.scss          # primeflex integration with some required variables
|   |- (_primeng.scss)            # all variables used for the prime frameworks (not ready yet, not part of the default import)
|
|- utilities                    # a collection of all utilities. can be imported seperately
|- index                        # all classes to import once in your app

What's inside?

Colors

A collection of classes and CSS Variables to style the color/background-color.

<div class="color-error"></div>

<div class="background-primary"></div>

Typography

A collection of classes and mixins to style the font-size/weight/style.

<div class="heading-large"></div>

<div class="text"></div>

Spacing

A collection of classes and one mixin to style spacings (margin/padding).

<div class="p-m"></div>

<div class="-mt-xxl"></div>

Utilities

To quickly create layouts we decided to use some utility classes. Therefor we do use parts of Primeflex:

  • grid
  • display
  • position
  • flexbox
  • gap

Custom CSS

There are different ways to use the different aspects of the design system in your custom component styles

Colors

Since colors are defined using css variables you can use them directly when needed:

.card {
    color: var(--color-text-on-secondary);
    background-color: var(--background-secondary);
}

Spacing

Since spacing classes are generated based on a config it is not possible to include them directly. There is one mixin for all spacings:

.card {
    @include set-spacing(pt-m);
    @include set-spacing(pl-m);
}

Typography

Since typography is defined explicitly it's not possible to use only one mixin. There is one mixin for every typography type

.card {
    @include text-small;
    @include text-bold;
}