#tailwind #css #compiler

railwind

Tailwind compiler for utility classes written in Rust

5 releases

Uses new Rust 2021

new 0.0.5 Nov 23, 2022
0.0.4 Nov 20, 2022
0.0.3 Oct 15, 2022
0.0.2 Oct 13, 2022
0.0.1 Oct 13, 2022

#928 in Development tools

Download history 23/week @ 2022-10-07 56/week @ 2022-10-14 13/week @ 2022-10-21 7/week @ 2022-10-28 8/week @ 2022-11-04 7/week @ 2022-11-11 66/week @ 2022-11-18

91 downloads per month
Used in railwind_cli

MIT license

100KB
3K SLoC

Rust 2.5K SLoC // 0.0% comments Rusty Object Notation 607 SLoC

Railwind

Tailwind compiler rewritten in Rust

Description

The main goal, is to decouple the original Tailwind project from Node and NPM and add warning messages with some recovery in specific situations with the side goal of possibly making it even faster and smaller (Tailwind already has a standalone version, but the binary size is a whooping 35 mb).

Getting started

Installation

To install with cargo, run cargo install railwind_cli to install the CLI.

Using railwind_cli

Run railwind_cli -i index.html to generate a railwind.css file. You can optionally specify a different output file with the -o flag.

Features

Warning messages

The CLI can write helpfull warning messages if you didn't pass the right value to a class or if you passed not enough or too many arguments.

Currently, not all Tailwind features are supported. At the moment, the following features are working:

Layout

  • Aspect Ratio
  • Container
  • Columns
  • Break After
  • Break Before
  • Break Inside
  • Box Decoration Break
  • Box Sizing
  • Display
  • Floats
  • Clear
  • Isolation
  • Object Fit
  • Object Position
  • Overflow
  • Overscroll Behavior
  • Position
  • Top / Right / Bottom / Left
  • Z-Index

Spacing

  • Padding
  • Margin
  • Space Between

Flexbox & Grid

  • Flex Basis
  • Flex Direction
  • Flex Wrap
  • Flex
  • Flex Grow
  • Flex Shrink
  • Order

Background

  • Attachment
  • Clip
  • Color
  • Origin
  • Position
  • Repeat
  • Size
  • Image
  • Gradient Color Stops

Border

  • Border Radius
  • Border Width
  • Border Color
  • Border Style
  • Divide Width
  • Divide Color
  • Divide Style
  • Outline Width
  • Outline Color
  • Outline Style
  • Outline Offset
  • Ring Width
  • Ring Color
  • Ring Offset Width
  • Ring Offset Color

Other

  • Pseudo-Classes
  • Pseudo-Elements
  • Media Queries

Authors

Contributors names and contact info

@pintariching

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

Inspiration, code snippets, etc.

Dependencies

~2–3MB
~77K SLoC