Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joshnuss/svelte-preprocess-tailwind

Preprocess tailwind expressions with Svelte
https://github.com/joshnuss/svelte-preprocess-tailwind

rollup svelte tailwindcss

Last synced: 25 days ago
JSON representation

Preprocess tailwind expressions with Svelte

Awesome Lists containing this project

README

        

# Tailwind Preprocess for Svelte.js

**This is a prototype**

A preprocessor that helps organize Tailwind styling.

# Setup

```javascript
import preprocessTailwind from 'svelte-preprocess-tailwind'

// add as a markup preprocessor in svelte plugin config
svelte({
preprocessor: {
markup: preprocessTailwind
}
....
})
```

# Examples

## Attributes

Instead of using classes, you can use attributes:

```html


```

## Groups

Multiple classes of the same modifier (`hover`, `focus`) or breakpoint (`sm`, `md`, `lg`, `xl`) can be grouped together using brackets:

```html


```

## Attribute conditions

Conditions can be added to any attribute:

```html


```

## Group conditions

Conditions can be added to an entire group of attributes in one shot:

```html






```

# License

MIT