Skip to content

Bjorn-Strom/FSS

Repository files navigation

Fss

Build Status Tests GitHub license

Fss is a dependency free CSS library for dotnet that provides statically typed styling for your projects and aims to cover a huge part of the CSS spec.

It gives you CSS as a first class citizen in your projects and was made to be predictable and easy to use.

Fss gives you the option to generate styles at runtime or to ouptut into CSS files.

Examples 🤓

Quick Elmish example here, check the documentation for more information.

let buttonStyle =
    fss
        [
            BackgroundColor.hex "44c767"
            BorderRadius.value (px 30)
            BorderWidth.value (px 1)
            BorderStyle.solid
            BorderColor.hex "18ab29"
            Display.inlineBlock
            Cursor.pointer
            FontSize.value (px 17)
            Hover
                [
                    BackgroundColor.hex "5cbf2a"
                ]
        ]
button [ ClassName buttonStyle ] [ str "Click me" ]

You can also check out this sample repo: samples.

Installation 💾