web-view-0.3.0: Type-safe HTML and CSS with intuitive layouts and composable styles.
Safe HaskellSafe-Inferred
LanguageGHC2021

Web.View.Reset

Synopsis

Documentation

cssResetEmbed :: ByteString Source #

Default CSS to remove unintuitive default styles. This or cssResetLink is required.

import Data.String.Interpolate (i)

toDocument :: Text -> Text
toDocument cnt =
  [i|<html>
    <head>
      <style type="text/css">#{cssResetEmbed}</style>
    </head>
    <body>#{cnt}</body>
  </html>|]

cssResetLink :: Text Source #

Alternatively, the reset is available as on a CDN

import Data.String.Interpolate (i)

toDocument :: Text -> Text
toDocument cnt =
  [i|<html>
    <head>
      <link rel="stylesheet" href="#{cssResetEmbed}">
    </head>
    <body>#{cnt}</body>
  </html>|]