@passlang/sass
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@passlang/sass

Sass support for next generation CSS preprocessor.",

SCSS SASS
scss().css`
nav {
  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }
  li {
    display: inline-block;
  }
  a {
    display: block;
    padding: 6px 12px;
    text-decoration: none;
  }
}
`
sass().css`
nav
  ul
    margin: 0
    padding: 0
    list-style: none
  li
    display: inline-block
  a
    display: block
    padding: 6px 12px
    text-decoration: none
`

Usage

  1. Install

    Make sure that you installed Node.JS and NPM(or another package manager for Node.JS).

    npm install @passlang/saas
  2. Import

    import css, { sass, scss } from '@passlang/sass'
  3. Use

    css`
    Styles...
    `

    Or

    sass().css`
    Styles...
    `

    Or

    scss().css`
    Styles...
    `

Contact me via discussions for help.

API

This is a wrapper around Sass JS api.

css(default)

(strings: TemplateStringsArray, ...args: any[]) => string;

Example

import css from '@passlang/sass';

css`
Your SCSS here...
`

scss

(options?: StringOptions<"sync"> | undefined) => (strings: TemplateStringsArray, ...args: any[]) => string;

Example

import { scss } from '@passlang/sass';

scss().css`
Your SCSS here...
`

sass

(options?: StringOptions<"sync">) => (strings: TemplateStringsArray, ...args: any[]) => string;

Example

import { sass } from '@passlang/sass';

sass().css`
Your SASS here...
`

You can pass options to sass and scss functions.

options = { style: "compressed" } // options
sass(options).css`
Your SASS here...
`

Read Here for more information about options.

Read Sass docs for complete documentation.

Package Sidebar

Install

npm i @passlang/sass

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

15.4 kB

Total Files

18

Last publish

Collaborators

  • ksengine