Style

com.alecdorrington.annotatedtextformat.dom.Style
object Style

How highlighted text is drawn, as layers of a background, in CSS.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Style.type

Members list

Type members

Classlikes

final case class Layer(image: String, size: String, position: String)

A layer of a background: its image, its size and its position. They go into CSS as they are, so build images with fill, from a Colour, never from text that a user wrote.

A layer of a background: its image, its size and its position. They go into CSS as they are, so build images with fill, from a Colour, never from text that a user wrote.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def declarations(layers: List[Layer]): List[(String, String)]

The declarations that draw layers, the first on top, as properties; none if there are none.

The declarations that draw layers, the first on top, as properties; none if there are none.

Attributes

def fill(colour: Colour): String

A layer's image of nothing but colour.

A layer's image of nothing but colour.

Attributes

def layers(highlights: List[(Colour, Int)]): List[Layer]

The layers that highlight text under highlights, each a colour and its lane: an underline in each lane, as a background, not an inset shadow, which would thicken over empty lanes; and then a tint of each colour, tint split between them, so that overlaps are no darker.

The layers that highlight text under highlights, each a colour and its lane: an underline in each lane, as a background, not an inset shadow, which would thicken over empty lanes; and then a tint of each colour, tint split between them, so that overlaps are no darker.

Attributes

def of(highlights: List[(Colour, Int)]): List[(String, String)]

The declarations that highlight text under highlights, each a colour and its lane, as layers draws them; none if there are no highlights.

The declarations that highlight text under highlights, each a colour and its lane, as layers draws them; none if there are no highlights.

Attributes

Concrete fields

val laneHeight: Int

The height of each underline, and so of each lane, in pixels.

The height of each underline, and so of each lane, in pixels.

Attributes

val properties: List[String]

The properties of CSS that declarations declares.

The properties of CSS that declarations declares.

Attributes

val tint: Double

How opaque the tint of highlighted text is, however many highlight it.

How opaque the tint of highlighted text is, however many highlight it.

Attributes