Module

Grain.Markup.Prop

Package
purescript-grain
Repository
purescript-grain/purescript-grain

#css Source

css :: String -> VNode -> VNode

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 :: VNode
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:

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

#className Source

#defaultValue Source

#placeholder Source

#acceptCharset Source

#autocomplete Source

#autofocus Source

#enctype Source

#formAction Source

#maxLength Source

#minLength Source

#noValidate Source

#pattern Source

#size Source

size :: Int -> VNode -> VNode

#htmlFor Source

#cols Source

cols :: Int -> VNode -> VNode

#rows Source

rows :: Int -> VNode -> VNode

#download Source

#hreflang Source

#height Source

#width Source

width :: Int -> VNode -> VNode

#preload Source

#srclang Source

#sandbox Source

#start Source

start :: Int -> VNode -> VNode

#colSpan Source

#rowSpan Source

#headers Source

#accessKey Source

#contentEditable Source

#draggable Source

#dropzone Source

#spellcheck Source

#tabIndex Source

#dateTime Source