This page describes how the extra styles for bibliographic references on this site are generated.
Preamble
As usual, we start with defining the main module, module imports, and writing the CSS stylesheet to standard output.
module Main (main) where
import Clay
import Prelude hiding (div, not)
main :: IO ()
= putCss biblioStyle main
Bibliography
This site uses the citation style used by the Association for Computing Machinery. The stylesheet here is responsible for ensuring that the citation keys are lined up and that there is appropriate spacing between entries.
biblioStyle :: Css
= do
biblioStyle div # ".csl-bib-body" ? do
$ em 1
paddingBottom
div # ".csl-entry" ? do
$ em 1
marginBottom
-- When width is small, break long URLs.
overflowWrap breakWord
div # ".csl-left-margin" ? do
float floatLeft$ em 3
width $ alignSide sideRight
textAlign
div # ".csl-right-inline" ? do
$ em 3
marginLeft $ em 1 paddingLeft