StyleSheet

class StyleSheet(val selector: CompoundSelector = CompoundSelector.DUMMY)(source)

Constructors

Link copied to clipboard
constructor(selector: CompoundSelector = CompoundSelector.DUMMY)

Properties

Link copied to clipboard
Link copied to clipboard

how a flex item is placed across the line, auto for the align-items of its container

Link copied to clipboard

the time in seconds before an animation starts

Link copied to clipboard

the time in seconds an iteration of an animation takes

Link copied to clipboard

the number of iterations of an animation, infinite for Double.POSITIVE_INFINITY

Link copied to clipboard

The names of the animations of the element, none for none. The other animation properties are lists too, their values repeat for the animations that they do not give, as in CSS.

Link copied to clipboard

how an animation moves from keyframe to keyframe

Link copied to clipboard

the proportion of the width to the height, an auto height follows the width; null for auto

Link copied to clipboard
Link copied to clipboard

the image of the background, a gradient, drawn under the element; background: linear-gradient(…) sets it

Link copied to clipboard
Link copied to clipboard

the radius of the corners of the box, in pixels or as a percentage of its shorter side

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the shadows of the box, drawn under the element, outside its box

Link copied to clipboard
Link copied to clipboard

True when the element clips its content, when it scrolls along one of its axes; along an axis that is visible the content is clipped too, but does not scroll

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The selector of CSS of the sheet, made when the sheet is first matched: child and descendant relate the selector to the selector of their parent sheet after the sheet is made

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val StyleSheet.effectiveColor: ColorRGBa?
Link copied to clipboard

the horizontal overflow: overflowX, or overflow when it is not set

Link copied to clipboard

the vertical overflow: overflowY, or overflow when it is not set

Link copied to clipboard

the size of a flex item along the main axis before it grows or shrinks, auto for its width or height

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The font families, separated by commas, the first that is registered is used: in the font manager of the control manager, then in org.openrndr.extra.textwriter.Fonts, the fonts of all programs

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the weight of the font, from 100 to 900, 400 is regular and 700 bold

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the space added after every character, normal is none; inherited

Link copied to clipboard

The distance between the baselines of the lines of text: normal, LinearDimension.Auto, the line height of the font, a number or a percentage of the font size, or a length; inherited

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the media query of the @media rule the sheet is in, null when it applies everywhere

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

the opacity of the element and its descendants, from 0 for invisible to 1 for opaque

Link copied to clipboard

the order of a flex item in its container, items with the same order keep the order of the document

Link copied to clipboard

the color of the outline

Link copied to clipboard

the space between the box and its outline

Link copied to clipboard

the width of the outline drawn around the box, outside its border, for example to show the keyboard focus

Link copied to clipboard
Link copied to clipboard

how the content overflows horizontally, as overflow when it is not set

Link copied to clipboard

how the content overflows vertically, as overflow when it is not set

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

true when the content scrolls horizontally: by the program for Overflow.Hidden, also by the user for Overflow.Scroll

Link copied to clipboard

true when the content scrolls vertically, see scrollableX

Link copied to clipboard

the color of the thumbs of scrollbars

Link copied to clipboard

the cursor over scrollbars, and while a scrollbar is dragged

Link copied to clipboard

the color of the tracks of scrollbars

Link copied to clipboard

When scrollbars are shown: ScrollbarVisibility.Auto shows them while the element scrolls, while they are hovered and dragged, and fades them out after that; ScrollbarVisibility.Always always shows them

Link copied to clipboard

the thickness of the scrollbars of elements that scroll, in pixels; 0 hides them

Link copied to clipboard

how the element scrolls its content, smoothly by default

Link copied to clipboard
Link copied to clipboard

the specificity of the selector

Link copied to clipboard

the lines drawn with text, like underline or line-through; inherited by the text of the element

Link copied to clipboard

how text that does not fit in a single line is shown, see TextOverflow; inherited by the text of the element

Link copied to clipboard

the offsets of a positioned element from the sides of what it is positioned in; auto is 0 for top and left

Link copied to clipboard

The transform of the element and its descendants, like scale(1.05) rotate(2deg), around transformOrigin; it does not change the layout

Link copied to clipboard

the point that the element is transformed around, in fractions of its size, the center by default

Link copied to clipboard

the time in seconds before the colors and the opacity of the element start to change, see transitionDuration

Link copied to clipboard

The time in seconds it takes the colors and the opacity of the element to change to new values, for example when it is hovered; 0 changes them at once

Link copied to clipboard

The properties that transition, see transitionDuration: of background-color, color, border-color, outline-color and opacity, all for all of them

Link copied to clipboard

how the colors and the opacity of the element change over time, see transitionDuration

Link copied to clipboard

counts the changes to the properties, so that changes made in place are noticed

Link copied to clipboard

how white space and line breaks are handled, see WhiteSpace; inherited

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun StyleSheet.and(selector: CompoundSelector, init: StyleSheet.() -> Unit)
Link copied to clipboard
Link copied to clipboard
fun StyleSheet.child(selector: CompoundSelector, init: StyleSheet.() -> Unit)
Link copied to clipboard
fun css(declarations: String)

Sets the properties of the CSS declarations, like width: 100px; background-color: #333 !important, with shorthands like margin, padding, border and transition, and custom properties like --accent: #f80 that values use with var(), like color: var(--accent). Declarations of properties that are not known and values that are not valid are left out, as in CSS.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
operator fun get(name: String): Any?

the value of the property name as it is set, null when it is not set

Link copied to clipboard
Link copied to clipboard
fun important(block: StyleSheet.() -> Unit)

the properties that block sets are !important: they win over the declarations that are not

Link copied to clipboard
fun inherit(vararg names: String)

the properties names take the values of the parent, like the CSS keyword inherit

Link copied to clipboard
fun initial(vararg names: String)

the properties names take their initial values, like the CSS keyword initial

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

removes the property name, so that the cascade decides it again

Link copied to clipboard
operator fun set(name: String, value: String)

sets the property name to the CSS value, see css

Link copied to clipboard
fun setProperty(name: String, value: Any?, important: Boolean = settingImportant)

sets the property name to value, a value of the property or a CssKeyword

Link copied to clipboard
open override fun toString(): String