Styler

Tool to generate CSS classes, a bit like tailwind but less strict and dependency-free.

Install

If you have Go installed, you can install styler with:

go install github.com/devOpifex/styler@latest

Otherwise, you can download the binary from the releases page.

Setup

Create a .styler file in your project root.

styler -create

Usage

First, edit .styler config file, then add a class attribute to your HTML elements.

ui <- fluidPage(
  div(
    class = "display-flex padding-2 margin-bottom-2 width-40",
    div(
      class = "flex-grow-1",
      h1("Hello, world!", class = "color-red-400 hover:color-cyan-500")
    ),
    div(
      class = "flex-shrink-1 md@display-none",
      h2("This is hidden on medium and larger screens", class = "color-blue hover:color-green")
    )
  )
)

Call styler to generate the CSS.

styler

Configuration

Styler can be customized through the .styler configuration file. You can create a default configuration with:

styler -create

The configuration allows you to customize:

Property Values

Documentation