Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@slite/style

Package Overview
Dependencies
Maintainers
18
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@slite/style

Slite shared style

  • 4.0.8
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
18
Weekly downloads
 
Created
Source

Slite style

This module exposes the postcss sources and build versions of the Slite clients shared style.

Install

npm i -S @slite/style

Using build versions

If you don't want to mess with the postcss config and rely on pure CSS versions, you can simply import the files from the dist folder:

import 'style/dist/index.css' // will import everything
// or ... target specific subsets:
import 'style/dist/variables.css'

Using sources

It requires a bit more setup but it's possible to use the source version of the files. There are a few steps:

1 - install our postcss dependencies (if you don't use them already)

yarn add -D postcss-cssnext postcss-import

2 - make sure to use them by adding the following to your postcss.config.js:

module.exports = {
  plugins: [
    // add the two following plugins:
    require('postcss-import')({
      path: ['node-modules', 'node_modules/@slite/style/src'],
    }),
    require('precss')(),
    require('postcss-cssnext')(),
  ],
}

3 - import in your js or post css files:

import '@slite/style' // to import everything
import '@slite/style/src/variables.css' // ... or subsets

in post css:

@import 'variables'; /* you'd better only import subsets from here */

Contributing

Build

You can either run the build or dev commands. build will do a production build (only once + minified) while dev will not minify and also stay in watch mode.

Publishing

Please only use npm to publish, not yarn as it's too buggy.

npm version patch
npm publish
yarn upgrade-services

Keywords

FAQs

Package last updated on 08 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc