tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 1077HTML 1008Markdown 12TOML 83209 Sutichaykuna

⎇ traitify-style docs/style-properties.md Markdown · 49 siq'ikuna · 8.0 KB Ñawpa willay ch'uya

Align aspect ratio type with code (#333) 97005dee7 · adjabaev ·

1# Style Properties
2
3Y = Supported in spec and implemented in Taffy
4~Y = Implemented in Taffy, but not thoroughly tested
5N = Supported in spec but not implemented in Taffy
6\- = Not applicable to layout mode
71-5 = Priorities for a phased implementation of CSS Grid
8
9| Property                 | Flex | Grid | Type                                  | Stack | Heap   | Description                                                                                 |
10| ---                      | ---  | ---  | ---                                   | ---   | -      | ---                                                                                         |
11| **Layout Mode**          |      |      |                                       |       |        |                                                                                             |
12| `display`                | Y    | Y    | `Display`                             | 1     | -      | What layout strategy should be used?                                                        |
13| **Position**             |      |      |                                       |       | -      |                                                                                             |
14| `position`               | Y    | Y    | `Position`                            | 1     | -      | Absolute vs. in-flow position                                                               |
15| `inset`                  | Y    | Y    | `Rect<LengthPercentageAuto>`          | 32    | -      | How should the position of this element be tweaked relative to the layout defined?          |
16| **Item size**            |      |      |                                       |       |        |                                                                                             |
17| `size`                   | Y    | Y    | `Size<Dimension>`                     | 16    | -      | The nominal height and width of item                                                        |
18| `min_size`               | Y    | Y    | `Size<Dimension>`                     | 16    | -      | The minimum height and width of the item                                                    |
19| `max_size`               | Y    | Y    | `Size<Dimension>`                     | 16    | -      | The maximum height and width of the item                                                    |
20| `aspect_ratio`           | Y    | 3    | `Option<f32>`                         | 4     | -      | The preferred aspect ratio (calculated as width divided by height)                          |
21| **Item spacing**         |      |      |                                       |       |        |                                                                                             |
22| `padding`                | Y    | ~Y   | `Rect<LengthPercentage>`              | 32    | -      | How large should the padding be on each side?                                               |
23| `border`                 | Y    | ~Y   | `Rect<LengthPercentage>`              | 32    | -      | How large should the border be on each side?                                                |
24| `margin`                 | Y    | ~Y   | `Rect<LengthPercentageAuto>`          | 32    | -      | How large should the margin be on each side?                                                |
25| `gap`                    | Y    | Y    | `Size<LengthPercentage>`              | 16    | -      | The size of the vertical and horizontal gaps between flex items / grid rows                 |
26| **Alignment**            |      |      |                                       |       |        |                                                                                             |
27| `align_content`          | Y    | Y    | `AlignContent`                        | 1     | -      | How should content contained within this item be aligned relative to the cross axis?        |
28| `justify_content`        | Y    | Y    | `AlignContent`                        | 1     | -      | How should content contained within this item be aligned relative to the main axis?         |
29| `align_items`            | Y    | Y    | `AlignItems`                          | 1     | -      | How should items be aligned relative to the cross axis?                                     |
30| `align_self`             | Y    | Y    | `Option<AlignItems>`                  | 1     | -      | Should this item violate the cross axis alignment specified by its parent's [`AlignItems`]? |
31| `justify_items`          | -    | Y    | `AlignItems`                          | 1     | -      | How should items be aligned relative to the main axis?                                      |
32| `justify_self`           | -    | Y    | `Option<AlignItems>`                  | 1     | -      | Should this item violate the main axis alignment specified by its parent's [`AlignItems`]?  |
33| **Flexbox**              |      |      |                                       |       |        |                                                                                             |
34| `flex_direction`         | Y    | -    | `FlexDirection`                       | 1     | -      | Which direction does the main axis flow in?                                                 |
35| `flex_wrap`              | Y    | -    | `FlexWrap`                            | 1     | -      | Should elements wrap, or stay in a single line?                                             |
36| `flex_basis`             | Y    | -    | `Dimension`                           | 8     | -      | Sets the initial main axis size of the item                                                 |
37| `flex_grow`              | Y    | -    | `f32`                                 | 4     | -      | The relative rate at which this item grows when it is expanding to fill space               |
38| `flex_shrink`            | Y    | -    | `f32`                                 | 4     | -      | The relative rate at which this item shrinks when it is contracting to fit into space       |
39| **CSS Grid (Container)** |      |      |                                       |       |        |                                                                                             |
40| `grid_template_columns`  | -    | Y    | `Vec<TrackSizingFunction>`            | 24    | 32 * N | The track sizing functions of the grid's explicit columns                                   |
41| `grid_template_rows`     | -    | Y    | `Vec<TrackSizingFunction>`            | 24    | 32 * N | The track sizing functions of the grid's explicit rows                                      |
42| `grid_template_areas`    | -    | 5    | -                                     | -     | -      | Defines named grid areas                                                                    |
43| `grid_auto_rows`         | -    | Y    | `Vec<NonRepeatedTrackSizingFunction>` | 24    | 20 * N | Track sizing functions for the grid's implicitly generated rows                             |
44| `grid_auto_columns`      | -    | Y    | `Vec<NonRepeatedTrackSizingFunction>` | 24    | 20 * N | Track sizing functions for the grid's implicitly generated columns                          |
45| `grid_auto_flow`         | -    | Y    | `GridAutoFlow`                        | 1     | -      | Whether auto-placed items are placed row-wise or column-wise. And sparsely or densely.      |
46| **CSS Grid (Child)**     |      |      |                                       |       |        |                                                                                             |
47| `grid_row`               | -    | Y    | `Line<GridPlacement>`                 | 8     | -      | The vertical (row) placement of a grid item                                                 |
48| `grid_column`            | -    | Y    | `Line<GridPlacement>`                 | 8     | -      | The horizontal (row) placement of a grid item                                               |
49| `grid_area`              | -    | 5    | -                                     | -     | -      | Accepts either shorthand row/column-start/end or a named grid area                          |

style-properties.md

Style Properties

Y = Supported in spec and implemented in Taffy ~Y = Implemented in Taffy, but not thoroughly tested N = Supported in spec but not implemented in Taffy - = Not applicable to layout mode 1-5 = Priorities for a phased implementation of CSS Grid

PropertyFlexGridTypeStackHeapDescription
Layout Mode
displayYYDisplay1-What layout strategy should be used?
Position-
positionYYPosition1-Absolute vs. in-flow position
insetYYRect<LengthPercentageAuto>32-How should the position of this element be tweaked relative to the layout defined?
Item size
sizeYYSize<Dimension>16-The nominal height and width of item
min_sizeYYSize<Dimension>16-The minimum height and width of the item
max_sizeYYSize<Dimension>16-The maximum height and width of the item
aspect_ratioY3Option<f32>4-The preferred aspect ratio (calculated as width divided by height)
Item spacing
paddingY~YRect<LengthPercentage>32-How large should the padding be on each side?
borderY~YRect<LengthPercentage>32-How large should the border be on each side?
marginY~YRect<LengthPercentageAuto>32-How large should the margin be on each side?
gapYYSize<LengthPercentage>16-The size of the vertical and horizontal gaps between flex items / grid rows
Alignment
align_contentYYAlignContent1-How should content contained within this item be aligned relative to the cross axis?
justify_contentYYAlignContent1-How should content contained within this item be aligned relative to the main axis?
align_itemsYYAlignItems1-How should items be aligned relative to the cross axis?
align_selfYYOption<AlignItems>1-Should this item violate the cross axis alignment specified by its parent's [AlignItems]?
justify_items-YAlignItems1-How should items be aligned relative to the main axis?
justify_self-YOption<AlignItems>1-Should this item violate the main axis alignment specified by its parent's [AlignItems]?
Flexbox
flex_directionY-FlexDirection1-Which direction does the main axis flow in?
flex_wrapY-FlexWrap1-Should elements wrap, or stay in a single line?
flex_basisY-Dimension8-Sets the initial main axis size of the item
flex_growY-f324-The relative rate at which this item grows when it is expanding to fill space
flex_shrinkY-f324-The relative rate at which this item shrinks when it is contracting to fit into space
CSS Grid (Container)
grid_template_columns-YVec<TrackSizingFunction>2432 * NThe track sizing functions of the grid's explicit columns
grid_template_rows-YVec<TrackSizingFunction>2432 * NThe track sizing functions of the grid's explicit rows
grid_template_areas-5---Defines named grid areas
grid_auto_rows-YVec<NonRepeatedTrackSizingFunction>2420 * NTrack sizing functions for the grid's implicitly generated rows
grid_auto_columns-YVec<NonRepeatedTrackSizingFunction>2420 * NTrack sizing functions for the grid's implicitly generated columns
grid_auto_flow-YGridAutoFlow1-Whether auto-placed items are placed row-wise or column-wise. And sparsely or densely.
CSS Grid (Child)
grid_row-YLine<GridPlacement>8-The vertical (row) placement of a grid item
grid_column-YLine<GridPlacement>8-The horizontal (row) placement of a grid item
grid_area-5---Accepts either shorthand row/column-start/end or a named grid area