Background contains everything about background rendering: using photos or gradient, and positionning them on the page.
Represents an image in CSS. It can be an image, represented by a source url, or
a gradiant. They are instanciated by image (which instanciate an Image inside a
BackgroundImage) or by linear or radial, instanciating a gradiant.
Represents a Background Image, i.e. an image in Background. Contrary to Image,
a BackgroundImage contains an image and a position. This position set the position of the image
on the background.
Defines a gradient, which can be either linear or radial. They are instanciated by the corresponding functions.
Represents an angle. Can be either radiant or degree.
Represents a degree.
Represents a radiant.
Represents a CSS Color Stop, which contains a Color, and possibly a position.
This is automatically generated by colorStop.
Generates an empty Background.
Modify the background rendering to add photos and gradients.
It modifies the images list in Background.
Background.images
[ Background.image "/example.photo" ]Accepts an Url, and returns a BackgroundImage. This image can be modified
to add a position to it.
Creates a linear gradient. The angle, and two colors (one for starting color,
the second for the ending color) are required, and more colors can be added in the
gradient using intermediateColors.
Creates a radial gradient. Two colors (one for starting color, the second
for the ending color) are required, and more colors can be added in the gradient
using intermediateColors.
Sets multiples intermediate colors in a gradient. By default, a gradient is created with two colors. This can be used to add more colors.
Sets a position on both a gradient and a BackgroundImage.
Compiles a Background record to the corresponding CSS list of tuples.
Compiles only styles which are defined, ignoring Nothing fields.
The
Backgroundrecord contains everything about background rendering, including character rendering. You probably won't use it as is, but instead usingBox.backgroundwhich automatically generate an emptyBackgroundrecord. You can then use modifiers. I.E.