The Color CSS data type denotes a color in the sRGB color space.
The Color CSS data type denotes a color in the sRGB color space. A color can be described in any of these ways:
- using a keyword - using the RGB cubic-coordinate system (via the #-hexadecimal or the rgb() and rgba() functional notations) - using the HSL cylindrical-coordinate system (via the hsl() and hsla() functional notations)
MDN
Something that can be used in as a color stop in a gradient.
Something that can be used in as a color stop in a gradient. Generally is either a Color or a ColorStopPair.
An image created via a portion of the DOM, selected by a CSS selector
An image which is a gradient, either Linear or Radial
A color represented as a hex string e.
A color represented as a hex string e.g. #fff or #ababab
A color represented as Hue (0-360), Saturation (0-100) and Lightness (0-100)
A color represented as Hue (0-360), Saturation (0-100) and Lightness (0-100) as well as an alpha (opacity) from 0.
A color represented as Hue (0-360), Saturation (0-100) and Lightness (0-100) as well as an alpha (opacity) from 0.0 to 1.0
The Image CSS data type represents a 2D image.
The Image CSS data type represents a 2D image. There are two kinds of images in CSS: plain static images, often referenced using a URL, and dynamically-generated images like gradients or representations of parts of the tree.
MDN
The Length CSS data type denotes distance measurements.
The Length CSS data type denotes distance measurements. It is a Number immediately followed by a length unit (px, em, pc, in, mm, …). Like for any CSS dimension, there is no space between the unit literal and the number.
The CSS linear-gradient() function creates an Image which represents a linear gradient of colors.
The CSS linear-gradient() function creates an Image which represents a linear gradient of colors. The result of this function is an object of the CSS Gradient data type. Like any other gradient, a CSS linear gradient is not a CSS Color but an image with no intrinsic dimensions; that is, it has neither natural or preferred size, nor ratio. Its concrete size will match the one of the element it applies to.
MDN
The CSS radial-gradient() function creates an Image which represents a gradient of colors radiating from an origin, the center of the gradient.
The CSS radial-gradient() function creates an Image which represents a gradient of colors radiating from an origin, the center of the gradient. The result of this function is an object of the CSS Gradient data type.
MDN
A color represented as its 3 primary components, from 0 to 255
A color represented as its 3 primary components, from 0 to 255, as well as an alpha (opacity) from 0.
A color represented as its 3 primary components, from 0 to 255, as well as an alpha (opacity) from 0.0 to 1.0
An image found at a particular URL
Contains the trait and case class definitions for the most commonly used CSS data types. Not really necessary if you are declaring your CSS inline with your fragments, but useful if you want to pass CSS values around and need a type to put in a parameter list or collection.