atomic-css-0.1.0: Type-safe, composable CSS utility functions. Inspired by Tailwindcss and Elm-UI
Safe HaskellNone
LanguageGHC2021

Web.Atomic.Attributes

Synopsis

Documentation

class Attributable h where Source #

Add Atts

Minimal complete definition

modAttributes

Methods

(@) :: h -> (Attributes h -> Attributes h) -> h infixl 5 Source #

Apply an attribute to some html

el @ att "id" "main-content" $ do
  tag "img" @ att "src" "logo.png"
  tag "input" @ placeholder "message" ~ border 1

modAttributes :: (Map Name AttValue -> Map Name AttValue) -> h -> h Source #

Instances

Instances details
Attributable (Html a) Source # 
Instance details

Defined in Web.Atomic.Html

Attributable (Attributes h) Source # 
Instance details

Defined in Web.Atomic.Types.Attributable

Attributable (Map Name AttValue) Source # 
Instance details

Defined in Web.Atomic.Types.Attributable

(Attributable a, Attributable b) => Attributable (a -> b) Source # 
Instance details

Defined in Web.Atomic.Types.Attributable

Methods

(@) :: (a -> b) -> (Attributes (a -> b) -> Attributes (a -> b)) -> a -> b Source #

modAttributes :: (Map Name AttValue -> Map Name AttValue) -> (a -> b) -> a -> b Source #

type Name = Text Source #