Module

Freedom.Markup.Prop

Package
purescript-freedom
Repository
purescript-freedom/purescript-freedom

#css Source

css :: forall state. String -> VNode state -> VNode state

Define styles with CSS string.

It generates a hash string as class name from CSS string, and the generated class name is used automatically.

justDiv :: forall state. VNode state
justDiv =
  H.div # H.css styles

styles :: String
styles =
  """
  .& {
    width: 100px;
    height: 100px;
  }
  .&:hover {
    width: 100px;
    height: 100px;
  }
  .&:hover .selected {
    color: blue;
  }
  """

& in the CSS string is replaced with the generated class name, and output it as stylesheet.

Like this:

.dz66dqm {
  width: 100px;
  height: 100px;
}
.dz66dqm:hover {
  width: 100px;
  height: 100px;
}
.dz66dqm:hover .selected {
  color: blue;
}

#style Source

style :: forall state. String -> VNode state -> VNode state

#className Source

className :: forall state. String -> VNode state -> VNode state

#classNames Source

classNames :: forall state. Array String -> VNode state -> VNode state

#id Source

id :: forall state. String -> VNode state -> VNode state

#title Source

title :: forall state. String -> VNode state -> VNode state

#hidden Source

hidden :: forall state. Boolean -> VNode state -> VNode state

#type_ Source

type_ :: forall state. String -> VNode state -> VNode state

#value Source

value :: forall state. String -> VNode state -> VNode state

#defaultValue Source

defaultValue :: forall state. String -> VNode state -> VNode state

#checked Source

checked :: forall state. Boolean -> VNode state -> VNode state

#placeholder Source

placeholder :: forall state. String -> VNode state -> VNode state

#selected Source

selected :: forall state. Boolean -> VNode state -> VNode state

#accept Source

accept :: forall state. String -> VNode state -> VNode state

#acceptCharset Source

acceptCharset :: forall state. String -> VNode state -> VNode state

#action Source

action :: forall state. String -> VNode state -> VNode state

#autocomplete Source

autocomplete :: forall state. String -> VNode state -> VNode state

#autofocus Source

autofocus :: forall state. Boolean -> VNode state -> VNode state

#disabled Source

disabled :: forall state. Boolean -> VNode state -> VNode state

#enctype Source

enctype :: forall state. String -> VNode state -> VNode state

#formAction Source

formAction :: forall state. String -> VNode state -> VNode state

#list Source

list :: forall state. String -> VNode state -> VNode state

#maxLength Source

maxLength :: forall state. Int -> VNode state -> VNode state

#minLength Source

minLength :: forall state. Int -> VNode state -> VNode state

#method Source

method :: forall state. String -> VNode state -> VNode state

#multiple Source

multiple :: forall state. Boolean -> VNode state -> VNode state

#name Source

name :: forall state. String -> VNode state -> VNode state

#noValidate Source

noValidate :: forall state. Boolean -> VNode state -> VNode state

#pattern Source

pattern :: forall state. String -> VNode state -> VNode state

#readOnly Source

readOnly :: forall state. Boolean -> VNode state -> VNode state

#required Source

required :: forall state. Boolean -> VNode state -> VNode state

#size Source

size :: forall state. Int -> VNode state -> VNode state

#htmlFor Source

htmlFor :: forall state. String -> VNode state -> VNode state

#form Source

form :: forall state. String -> VNode state -> VNode state

#max Source

max :: forall state. String -> VNode state -> VNode state

#min Source

min :: forall state. String -> VNode state -> VNode state

#step Source

step :: forall state. String -> VNode state -> VNode state

#cols Source

cols :: forall state. Int -> VNode state -> VNode state

#rows Source

rows :: forall state. Int -> VNode state -> VNode state

#wrap Source

wrap :: forall state. String -> VNode state -> VNode state

#href Source

href :: forall state. String -> VNode state -> VNode state

#target Source

target :: forall state. String -> VNode state -> VNode state

#download Source

download :: forall state. String -> VNode state -> VNode state

#hreflang Source

hreflang :: forall state. String -> VNode state -> VNode state

#media Source

media :: forall state. String -> VNode state -> VNode state

#ping Source

ping :: forall state. String -> VNode state -> VNode state

#rel Source

rel :: forall state. String -> VNode state -> VNode state

#isMap Source

isMap :: forall state. Boolean -> VNode state -> VNode state

#useMap Source

useMap :: forall state. String -> VNode state -> VNode state

#shape Source

shape :: forall state. String -> VNode state -> VNode state

#coords Source

coords :: forall state. String -> VNode state -> VNode state

#src Source

src :: forall state. String -> VNode state -> VNode state

#height Source

height :: forall state. Int -> VNode state -> VNode state

#width Source

width :: forall state. Int -> VNode state -> VNode state

#alt Source

alt :: forall state. String -> VNode state -> VNode state

#autoplay Source

autoplay :: forall state. Boolean -> VNode state -> VNode state

#controls Source

controls :: forall state. Boolean -> VNode state -> VNode state

#loop Source

loop :: forall state. Boolean -> VNode state -> VNode state

#preload Source

preload :: forall state. String -> VNode state -> VNode state

#poster Source

poster :: forall state. String -> VNode state -> VNode state

#default Source

default :: forall state. Boolean -> VNode state -> VNode state

#kind_ Source

kind_ :: forall state. String -> VNode state -> VNode state

#srclang Source

srclang :: forall state. String -> VNode state -> VNode state

#sandbox Source

sandbox :: forall state. String -> VNode state -> VNode state

#srcdoc Source

srcdoc :: forall state. String -> VNode state -> VNode state

#reversed Source

reversed :: forall state. Boolean -> VNode state -> VNode state

#start Source

start :: forall state. Int -> VNode state -> VNode state

#colSpan Source

colSpan :: forall state. Int -> VNode state -> VNode state

#rowSpan Source

rowSpan :: forall state. Int -> VNode state -> VNode state

#headers Source

headers :: forall state. String -> VNode state -> VNode state

#scope Source

scope :: forall state. String -> VNode state -> VNode state

#accessKey Source

accessKey :: forall state. Char -> VNode state -> VNode state

#contentEditable Source

contentEditable :: forall state. Boolean -> VNode state -> VNode state

#dir Source

dir :: forall state. String -> VNode state -> VNode state

#draggable Source

draggable :: forall state. Boolean -> VNode state -> VNode state

#dropzone Source

dropzone :: forall state. String -> VNode state -> VNode state

#lang Source

lang :: forall state. String -> VNode state -> VNode state

#spellcheck Source

spellcheck :: forall state. Boolean -> VNode state -> VNode state

#tabIndex Source

tabIndex :: forall state. Int -> VNode state -> VNode state

#cite Source

cite :: forall state. String -> VNode state -> VNode state

#dateTime Source

dateTime :: forall state. String -> VNode state -> VNode state