Scripting API

Scripting API

StyleValue

Record in Abyss.Core, from Abyss.Core.

A property a stylesheet's rule sets, and what to.

public record StyleValue

Constructors

StyleValue

public StyleValue(string Css, string From, string Text, bool Important, string? Unit, float? Number, Vector4? Color, string? Keyword)

A property a stylesheet's rule sets, and what to.

Parameters

  • Css: The property's name.
  • From: The declaration setting it: itself, or a shorthand.
  • Text: Its value as written; a shorthand's whole value, where it says it in no fixed place.
  • Important: Whether it is !important.
  • Unit: A length's unit — px, %, vw, vh, vmin, vmax or auto — where it is one.
  • Number: A length's number, or a number's.
  • Color: A color, in sRGB, red, green, blue and alpha, zero to one; null for none.
  • Keyword: A keyword, as CSS writes it.

Properties

Css

public string Css { get; init; }

The property's name.

From

public string From { get; init; }

The declaration setting it: itself, or a shorthand.

Text

public string Text { get; init; }

Its value as written; a shorthand's whole value, where it says it in no fixed place.

Important

public bool Important { get; init; }

Whether it is !important.

Unit

public string? Unit { get; init; }

A length's unit — px, %, vw, vh, vmin, vmax or auto — where it is one.

Number

public float? Number { get; init; }

A length's number, or a number's.

Color

public Vector4? Color { get; init; }

A color, in sRGB, red, green, blue and alpha, zero to one; null for none.

Keyword

public string? Keyword { get; init; }

A keyword, as CSS writes it.