CSS
- Package
- purescript-css
- Repository
- slamdata/purescript-css
Re-exports from CSS.Animation
#IterationCount Source
#AnimationName Source
#AnimationDirection Source
#animation Source
animation :: AnimationName -> Time -> TimingFunction -> Time -> IterationCount -> AnimationDirection -> FillMode -> CSS
Re-exports from CSS.Background
#Background Source
class (Val a) <= Background a where
We implement the generic background property as a type class that accepts
Members
background :: a -> CSS
Instances
#url Source
url :: String -> BackgroundImage
#sideMiddle Source
sideMiddle :: Side
#sideCenter Source
sideCenter :: Side
#sideBottom Source
sideBottom :: Side
#positioned Source
positioned :: forall a. Size a -> Size a -> BackgroundPosition
#origin Source
origin :: BoxType -> BackgroundOrigin
#boxClip Source
boxClip :: BoxType -> BackgroundClip
#backgroundSize Source
backgroundSize :: BackgroundSize -> CSS
#backgroundColor Source
backgroundColor :: Color -> CSS
#backgroundClip Source
backgroundClip :: BackgroundClip -> CSS
Re-exports from CSS.Border
#borderColor Source
borderColor :: Color -> CSS
Re-exports from CSS.Box
#paddingBox Source
paddingBox :: BoxType
DEPRECATED
Re-exports from CSS.Color
#ColorSpace Source
data ColorSpace
Definition of a color space.
RGB
: red, green, blueHSL
: hue, saturation, lightnessLCh
: Lightness, chroma, hueLab
: Lightness, a, b
Constructors
#Color Source
data Color
The representation of a color.
Note:
- The
Eq
instance compares twoColor
s by comparing their (integer) RGB values. This is different from comparing the HSL values (for example, HSL has many different representations of black (arbitrary hue and saturation values). - Colors outside the sRGB gamut which cannot be displayed on a typical
computer screen can not be represented by
Color
.
Instances
#yellowgreen Source
yellowgreen :: Color
#xyz Source
xyz :: Number -> Number -> Number -> Color
Create a Color
from XYZ coordinates in the CIE 1931 color space. Note
that a Color
always represents a color in the sRGB gamut (colors that
can be represented on a typical computer screen) while the XYZ color space
is bigger. This function will tend to create fully saturated colors at the
edge of the sRGB gamut if the coordinates lie outside the sRGB range.
See:
#whitesmoke Source
whitesmoke :: Color
#toXYZ Source
#toHexString Source
toHexString :: Color -> String
Return a hexadecimal representation of the color in the form #rrggbb
,
where rr
, gg
and bb
refer to hexadecimal digits corresponding to
the RGB channel values between 00
and ff
. The alpha channel is not
represented.
#springgreen Source
springgreen :: Color
#sandybrown Source
sandybrown :: Color
#saddlebrown Source
saddlebrown :: Color
#powderblue Source
powderblue :: Color
#papayawhip Source
papayawhip :: Color
#mix Source
mix :: ColorSpace -> Interpolator
Mix two colors by linearly interpolating between them in the specified color space. For the HSL colorspace, the shortest path is chosen along the circle of hue values.
#mediumblue Source
mediumblue :: Color
#luminance Source
luminance :: Color -> Number
The relative brightness of a color (normalized to 0.0 for darkest black and 1.0 for lightest white), according to the WCAG definition.
See: https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
#lightyellow Source
lightyellow :: Color
#lightsalmon Source
lightsalmon :: Color
#lightgreen Source
lightgreen :: Color
#lightcoral Source
lightcoral :: Color
#lch Source
#isReadable Source
isReadable :: Color -> Color -> Boolean
Determine whether text of one color is readable on a background of a
different color (see contrast
). This function is symmetric in both
arguments.
isReadable c1 c2 = contrast c1 c2 > 4.5
#greenyellow Source
greenyellow :: Color
#ghostwhite Source
ghostwhite :: Color
#fromHexString Source
fromHexString :: String -> Maybe Color
Parse a hexadecimal RGB code of the form #rgb
or #rrggbb
. The #
character is required. Each hexadecimal digit is of the form [0-9a-fA-F]
(case insensitive). Returns Nothing
if the string is in a wrong format.
#forestgreen Source
forestgreen :: Color
#floralwhite Source
floralwhite :: Color
#dodgerblue Source
dodgerblue :: Color
#distance Source
#desaturate Source
desaturate :: Number -> Color -> Color
Decrease the saturation of a color by subtracting a certain amount (number between -1.0 and 1.0) from the saturation channel. If the number is negative, the color is saturated.
#deepskyblue Source
deepskyblue :: Color
#darkviolet Source
darkviolet :: Color
#darksalmon Source
darksalmon :: Color
#darkorchid Source
darkorchid :: Color
#darkorange Source
darkorange :: Color
#darkmagenta Source
darkmagenta :: Color
#cssStringRGBA Source
cssStringRGBA :: Color -> String
A CSS representation of the color in the form rgb(..)
or rgba(...)
.
#cssStringHSLA Source
cssStringHSLA :: Color -> String
A CSS representation of the color in the form hsl(..)
or hsla(...)
.
#contrast Source
contrast :: Color -> Color -> Number
The contrast ratio of two colors. A minimum contrast ratio of 4.5 is
recommended to ensure that text is readable on a colored background. The
contrast ratio is symmetric on both arguments:
contrast c1 c2 == contrast c2 c1
.
See http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
#complementary Source
complementary :: Color -> Color
Get the complementary color (hue rotated by 180°).
#chartreuse Source
chartreuse :: Color
#brightness Source
brightness :: Color -> Number
The percieved brightness of the color (A number between 0.0 and 1.0).
#blueviolet Source
blueviolet :: Color
#aquamarine Source
aquamarine :: Color
Re-exports from CSS.Display
#floatRight Source
floatRight :: Float
#clear Source
clear :: ClearFloat -> CSS
Re-exports from CSS.Elements
Re-exports from CSS.Flexbox
#JustifyContentValue Source
newtype JustifyContentValue
Constructors
Instances
Eq JustifyContentValue
Ord JustifyContentValue
Generic JustifyContentValue _
IsString JustifyContentValue
Val JustifyContentValue
Other JustifyContentValue
Inherit JustifyContentValue
Center JustifyContentValue
FlexEnd JustifyContentValue
FlexStart JustifyContentValue
SpaceAround JustifyContentValue
SpaceBetween JustifyContentValue
#FlexDirection Source
#AlignSelfValue Source
#AlignItemsValue Source
#AlignContentValue Source
newtype AlignContentValue
Constructors
Instances
Eq AlignContentValue
Ord AlignContentValue
Generic AlignContentValue _
IsString AlignContentValue
Val AlignContentValue
Other AlignContentValue
Inherit AlignContentValue
FlexStart AlignContentValue
FlexEnd AlignContentValue
Center AlignContentValue
SpaceBetween AlignContentValue
SpaceAround AlignContentValue
Stretch AlignContentValue
#SpaceAround Source
#SpaceBetween Source
#row Source
row :: FlexDirection
#flexShrink Source
flexShrink :: Int -> CSS
#flexDirection Source
flexDirection :: FlexDirection -> CSS
#alignSelf Source
alignSelf :: AlignSelfValue -> CSS
#alignItems Source
alignItems :: AlignItemsValue -> CSS
#alignContent Source
alignContent :: AlignContentValue -> CSS
Re-exports from CSS.Font
#GenericFontFamily Source
#FontWeight Source
#weight Source
weight :: Number -> FontWeight
#fontWeight Source
fontWeight :: FontWeight -> CSS
#fontFamily Source
fontFamily :: Array String -> NonEmpty Array GenericFontFamily -> CSS
#bolder Source
bolder :: FontWeight
#bold Source
bold :: FontWeight
Re-exports from CSS.FontFace
#FontFaceSrc Source
#FontFaceFormat Source
#formatName Source
formatName :: FontFaceFormat -> String
#fontFaceSrc Source
fontFaceSrc :: NonEmpty Array FontFaceSrc -> CSS
#fontFaceFamily Source
fontFaceFamily :: String -> CSS
Re-exports from CSS.Geometry
#paddingTop Source
paddingTop :: forall a. Size a -> CSS
#paddingRight Source
paddingRight :: forall a. Size a -> CSS
#paddingLeft Source
paddingLeft :: forall a. Size a -> CSS
#paddingBottom Source
paddingBottom :: forall a. Size a -> CSS
#marginRight Source
marginRight :: forall a. Size a -> CSS
#marginLeft Source
marginLeft :: forall a. Size a -> CSS
#marginBottom Source
marginBottom :: forall a. Size a -> CSS
#lineHeight Source
lineHeight :: forall a. Size a -> CSS
Re-exports from CSS.Gradient
#vRepeatingGradient Source
vRepeatingGradient :: Color -> Color -> BackgroundImage
#repeatingRadialGradient Source
repeatingRadialGradient :: forall l. Loc l => l -> Radial -> Ramp -> BackgroundImage
#radialGradient Source
radialGradient :: forall l. Loc l => l -> Radial -> Ramp -> BackgroundImage
#linearGradient Source
linearGradient :: Direction -> Ramp -> BackgroundImage
#hRepeatingGradient Source
hRepeatingGradient :: Color -> Color -> BackgroundImage
Re-exports from CSS.Property
Re-exports from CSS.Pseudo
#hover Source
hover :: Refinement
Re-exports from CSS.Render
#mediaQuery Source
mediaQuery :: MediaQuery -> String
Re-exports from CSS.Selector
#Refinement Source
Re-exports from CSS.Size
Re-exports from CSS.String
Re-exports from CSS.Stylesheet
#MediaQuery Source
Re-exports from CSS.Text
#TextDecoration Source
#textDecoration Source
textDecoration :: TextDecoration -> CSS
#letterSpacing Source
letterSpacing :: forall a. Size a -> CSS
Re-exports from CSS.Text.Whitespace
#TextWhitespace Source
newtype TextWhitespace
Instances
#textWhitespace Source
textWhitespace :: TextWhitespace -> CSS
Re-exports from CSS.Time
Re-exports from CSS.Transform
#Transformation Source
#TransformOriginOffset Source
#TransformOrigin Source
#transforms Source
transforms :: Array Transformation -> CSS
#transformOrigin Source
transformOrigin :: forall a. TransformOriginOffset a -> TransformOriginOffset a -> Size a -> CSS
#transform Source
transform :: Transformation -> CSS
#rotate Source
rotate :: forall a. Angle a -> Transformation
#offsetTop Source
offsetTop :: forall a. TransformOriginOffset a
#offsetRight Source
offsetRight :: forall a. TransformOriginOffset a
#offsetLeft Source
offsetLeft :: forall a. TransformOriginOffset a
#offsetCenter Source
offsetCenter :: forall a. TransformOriginOffset a
#offsetBottom Source
offsetBottom :: forall a. TransformOriginOffset a
#offset Source
offset :: forall a. Size a -> TransformOriginOffset a
Re-exports from CSS.Transition
#TimingFunction Source
- Modules
- CSS
- CSS.
Animation - CSS.
Background - CSS.
Border - CSS.
Box - CSS.
Color - CSS.
Common - CSS.
Display - CSS.
Elements - CSS.
Flexbox - CSS.
Font - CSS.
FontFace - CSS.
Geometry - CSS.
Gradient - CSS.
ListStyle - CSS.
ListStyle. Image - CSS.
ListStyle. Position - CSS.
ListStyle. Type - CSS.
Media - CSS.
Overflow - CSS.
Property - CSS.
Pseudo - CSS.
Render - CSS.
Selector - CSS.
Size - CSS.
String - CSS.
Stylesheet - CSS.
Text - CSS.
Text. Shadow - CSS.
Text. Transform - CSS.
Text. Whitespace - CSS.
TextAlign - CSS.
Time - CSS.
Transform - CSS.
Transition - CSS.
VerticalAlign