```Librrd 游乐场```
Librrd Playground

原始链接: https://systemf.epfl.ch/etc/librrd/

该语言采用基于 CSS 的语法,包含四个主要标签(terminal、nonterminal、sequence 和 stack),以及标准选择器(通配符、类、ID 和 `:root`)和组合器。它遵循 CSS 关于特异性和层叠的规则。 布局控制通过几个关键属性实现: * **垂直对齐:** `align-items`(继承)和 `align-self`(覆盖)支持 `top`、`center`、`bottom` 和 `baseline`。`align-self` 接受双值以独立控制左侧和右侧。 * **水平对齐:** `justify-content`(继承)提供多种对齐和间距选项(例如 `center`、`space-between`),默认为 `space-between`。 其他属性包括: * **Flex-absorb:** 一个继承比例(0–1,默认 0)。 * **Gap:** 非负间距值(默认 0)。 * **Continuation-marker:** 一个字符串(默认 `…`)。 * **Font:** 定义字体族、样式、字重和大小的复合属性(默认值:`sans-serif`、`normal`、`normal`、`1rem`)。 除 `align-items`、`justify-content` 和 `flex-absorb` 外,这些属性均为非继承属性。

抱歉。
相关文章

原文

The language is modeled after CSS. The selector language has 4 tags (terminal, nonterminal, sequence, stack); wildcard, class, and ID selectors; a :root pseudo-selector; and descendant and child combinators. Specificity and cascading is as in CSS. The possible properties are explained below.

align-items controls vertical alignment of a container's items. It is an inherited property. align-self on an item controls its own alignment, overriding the container. The possible values for both properties are top, center, bottom, and baseline. The default value is top. If two values are given for align-self, they apply to the left and right sides of the item, respectively.

justify-content controls horizontal justification of a container's items. It is an inherited property. The possible values are left, right, start, end, center, space-around, space-between, and space-evenly. The default value is space-between.

Other properties (non-inherited except where noted) are

  • flex-absorb, a proportion between 0 and 1, default 0, inherited;
  • gap a nonnegative number, default 0;
  • continuation-marker, a string, default ; and
  • font, up to 4 space-separated strings, being the font family, style, weight, and size, respectively, taking their default values if omitted, which are sans-serif, normal, normal, and 1rem.
联系我们 contact @ memedata.com