Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

YAML CSS Documentation

Garkatron edited this page Jan 9, 2025 · 1 revision

This documentation describes the structure and properties of the YAML CSS JSON schema.


Main Properties

Version

  • Type: string
  • Default Value: 1.5.0
  • Description: Previous versions. YAML-CSS is not retro-compatible.
  • Allowed Values:
    • 1.0.0
    • 1.1.0
    • 1.2.0
    • 1.3.0
    • 1.4.0
    • 1.4.1
    • 1.5.0

Texture

  • Type: object

Properties of Texture:

  1. id:

    • Type: string
  2. path:

    • Type: string
  3. width:

    • Type: integer
  4. height:

    • Type: integer
  5. mode:

    • Type: string
    • Allowed Values:
      • STRETCH
      • NINE_SLICE
      • TILE
  6. border:

    • Type: object

Properties of border:

  • top: integer
  • bottom: integer
  • left: integer
  • right: integer

Textures

  • Type: array
  • Description: List of textures.
  • Items:
    • Type: object
    • Required: id
    • References: Properties defined in Texture.

SharedProperties

  • Type: object

Properties of SharedProperties:

  • backgroundColor:

    • Type: string
    • Default Value: transparent
    • Description: Background color in hexadecimal format #RRGGBB.
  • backgroundImage:

    • Type: string
    • Default Value: transparent
    • Description: Image as the background of an element.
  • backgroundImagePressed:

    • Type: string
    • Default Value: transparent
    • Description: Background image when the element is pressed.
  • backgroundImageHover:

    • Type: string
    • Default Value: transparent
    • Description: Background image when the cursor hovers over the element.
  • width:

    • Type: string
    • Description: Size on the X-axis of the element.
  • height:

    • Type: string
    • Description: Size on the Y-axis of the element.
  • localX:

    • Type: integer
    • Description: Local X position relative to the global X position of the parent element.
  • localY:

    • Type: integer
    • Description: Local Y position relative to the global Y position of the parent element.
  • globalX:

    • Type: integer
    • Description: Global X position.
  • globalY:

    • Type: integer
    • Description: Global Y position.
  • childrenPlacement:

    • Type: string
    • Allowed Values:
      • TOP_LEFT
      • BOTTOM_LEFT
      • TOP_RIGHT
      • BOTTOM_RIGHT
      • CENTER
      • LEFT
      • RIGHT
      • TOP
      • BOTTOM
      • NONE
      • CHILD_DECIDE
    • Description: Placement of child nodes relative to their parent node.
  • selfPlacement:

    • Type: string
    • Allowed Values: (Same values as childrenPlacement).
  • border:

    • Type: string
    • Default Value: none
    • Description: The width of the border line and the color, e.g., 2px #RRGGBB.
  • border-top:

    • Type: string
    • Description: Width and color of the top border line, e.g., 2px #RRGGBB.
  • border-bottom:

    • Type: string
    • Description: Width and color of the bottom border line, e.g., 2px #RRGGBB.
  • border-left:

    • Type: string
    • Description: Width and color of the left border line, e.g., 2px #RRGGBB.
  • border-right:

    • Type: string
    • Description: Width and color of the right border line, e.g., 2px #RRGGBB.
  • textColor:

    • Type: string
    • Description: Text color in hexadecimal format, e.g., #RRGGBB.
  • textShadow:

    • Type: boolean
    • Description: Enables or disables shadow for text.
  • lineHeight:

    • Type: string
    • Description: Line height for label text.
  • direction:

    • Type: string
    • Allowed Values:
      • vertically
      • horizontally
    • Description: The direction of a bar or scroll bar element.
  • focusBackgroundColor:

    • Type: string
  • focusTextColor:

    • Type: string
  • focusBorderColor:

    • Type: string
  • defaultBorderColor:

    • Type: string
  • defaultBackgroundColor:

    • Type: string
  • defaultTextColor:

    • Type: string
  • drawBackground:

    • Type: boolean
  • cursorBlinkInterval:

    • Type: integer
  • cursorCharacter:

    • Type: string
  • scrollBarLength:

    • Type: integer
  • progressBarFullBackground:

    • Type: string
  • progressBarSmoothingFactor:

    • Type: number
  • pressedBorderColor:

    • Type: string
  • pressedBackgroundColor:

    • Type: string
  • scrollBarVisible:

    • Type: boolean
  • thumbHeight:

    • Type: string
  • thumbWidth:

    • Type: string
  • scrollBarSize:

    • Type: string
  • overflow:

    • Type: string
    • Allowed Values:
      • hide
      • view
    • Default Value: view
  • scrollBarColor:

    • Type: string
  • scrollBarThumbColor:

    • Type: string
  • layoutSpacing:

    • Type: string
  • layoutCenterItems:

    • Type: boolean
  • layoutItemsFromCenter:

    • Type: boolean
    • Default Value: false
  • bgHeight:

    • Type: string
  • bgWidth:

    • Type: string
  • imageScale:

    • Type: string
  • imageScaleWidth:

    • Type: string
  • imageScaleHeight:

    • Type: string

Select

  • Type: array
  • Description: List of Select objects.

Properties of Select elements:

  1. at:

    • Type: string
    • Description: Value of the At attribute.
  2. References:

    • Includes all properties defined in SharedProperties.

Clone this wiki locally