CssNumber

scalatags.DataConverters.CssNumber
class CssNumber[T](x: T)(implicit evidence$1: Numeric[T])

Extends numbers to provide a bunch of useful methods, allowing you to write CSS-lengths in a nice syntax without resorting to strings.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def ch: String

This unit represents the width, or more precisely the advance measure, of the glyph '0' zero, the Unicode character U+0030 in the element's font.

This unit represents the width, or more precisely the advance measure, of the glyph '0' zero, the Unicode character U+0030 in the element's font.

MDN

Attributes

def cm: String

One centimeter 10 millimeters.

One centimeter 10 millimeters.

MDN

Attributes

def deg: String

An angle in degrees. One full circle is 360deg. E.g. 0deg, 90deg, 360deg.

An angle in degrees. One full circle is 360deg. E.g. 0deg, 90deg, 360deg.

Attributes

def em: String

This unit represents the calculated font-size of the element. If used on the font-size property itself, it represents the inherited font-size of the element.

This unit represents the calculated font-size of the element. If used on the font-size property itself, it represents the inherited font-size of the element.

MDN

Attributes

def ex: String

This unit represents the x-height of the element's font. On fonts with the 'x' letter, this is generally the height of lowercase letters in the font; 1ex ≈ 0.5em in many fonts.

This unit represents the x-height of the element's font. On fonts with the 'x' letter, this is generally the height of lowercase letters in the font; 1ex ≈ 0.5em in many fonts.

MDN

Attributes

def grad: String

An angle in gradians. One full circle is 400grad. E.g. 0grad, 100grad, 400grad.

An angle in gradians. One full circle is 400grad. E.g. 0grad, 100grad, 400grad.

MDN

Attributes

def in: String

One inch 2.54 centimeters.

One inch 2.54 centimeters.

MDN

Attributes

def mm: String

One millimeter.

One millimeter.

MDN

Attributes

def pc: String

One pica which is 12 points.

One pica which is 12 points.

MDN

Attributes

def pct: String

A percentage value

A percentage value

Attributes

def pt: String

One point which is 1/72 of an inch.

One point which is 1/72 of an inch.

MDN

Attributes

def px: String

Relative to the viewing device. For screen display, typically one device pixel (dot) of the display.

Relative to the viewing device. For screen display, typically one device pixel (dot) of the display.

For printers and very high resolution screens one CSS pixel implies multiple device pixels, so that the number of pixel per inch stays around 96.

MDN

Attributes

def rad: String

An angle in radians. One full circle is 2π radians which approximates to 6.2832rad. 1rad is 180/π degrees. E.g. 0rad, 1.0708rad, 6.2832rad.

An angle in radians. One full circle is 2π radians which approximates to 6.2832rad. 1rad is 180/π degrees. E.g. 0rad, 1.0708rad, 6.2832rad.

MDN

Attributes

def rem: String

This unit represents the font-size of the root element e.g. the font-size of the html element. When used on the font-size on this root element, it represents its initial value.

This unit represents the font-size of the root element e.g. the font-size of the html element. When used on the font-size on this root element, it represents its initial value.

MDN

Attributes

def turn: String

The number of turns the angle is. One full circle is 1turn. E.g. 0turn, 0.25turn, 1turn.

The number of turns the angle is. One full circle is 1turn. E.g. 0turn, 0.25turn, 1turn.

MDN

Attributes