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

@ilo-org/styles

v1.3.1

Published

Styles for products using ILO's Design System

Downloads

99

Readme

ILO Design System - Styles

The Styles package provides the stylesheets which are used to style the components in other packages. It includes both the styles for the individual components as well as bundled stylesheets for the entire design system. Both scss and compiled css files are exported from the package.

The styles are written in SCSS, so you can also import the SCSS files and include them in your own SASS workflow.

[!TIP] This styles in this package are also shipped directly from @ilo-org/twig or @ilo-org/react packages. If you are using those libraries, you do not have to install this. See documentation for each on instructions on how to import styles.

Installation

npm i @ilo-org/styles

Usage

Include the bundled stylesheet

If you're going to use all or most of the components in the Design System, the easiest thing to do is to include the bundled stylesheet, which includes all of the styles for all of the components.

To do this, you can copy the file @ilo-org/styles/css/index.css to a place where you're hosting static files via build command and include it from there.

You can also import compiled CSS files for the individual components, which can be fetched or included from @ilo-org/styles/css/components directory.

Here's an example which uses Webpack to output CSS files together with components from the Design System's React package.

import React from "react";
import { Accordion } from "@ilo-org/react";
import "@ilo-org/styles/css/components/accordion";

const MyAccordion = (props) => {
  return <Accordion {...props}>
}

Use the source files directly

If you're already using SASS, then you can also import the SCSS files directly into your project and include them into your own SASS bundle.

Note that if you're doing this, you will also need to import the @ilo-org/themes package to ensure the SASS files have access to the style tokens they need.

@import "@ilo-org/themes/build/scss/tokens";
@import "@ilo-org/styles/scss";

As above, if you don't need styles for the whole design system, you can also import SCSS files from individual components.

@import "@ilo-org/styles/scss/components/accordion";

Remember to include global styles

If you're importing CSS for individual components, remember to include the global styles as well. These are styles which are not scoped to any particular component, but which are needed for the components to work properly.

You can import the global styles from @ilo-org/styles/scss/global or from @ilo-org/styles/css/global.