Skip to main content

stylex_constants/constants/
logical_to_ltr.rs

1use phf::phf_map;
2
3// These properties are kept for a polyfill that is only used with `legacy-expand-shorthands`
4pub static PROPERTY_TO_LTR: phf::Map<&'static str, &'static str> = phf_map! {
5    "margin-start" => "margin-left",
6    "margin-end" => "margin-right",
7    "padding-start" => "padding-left",
8    "padding-end" => "padding-right",
9    "border-start" => "border-left",
10    "border-end" => "border-right",
11    "border-start-width" => "border-left-width",
12    "border-end-width" => "border-right-width",
13    "border-start-color" => "border-left-color",
14    "border-end-color" => "border-right-color",
15    "border-start-style" => "border-left-style",
16    "border-end-style" => "border-right-style",
17    "border-top-start-radius" => "border-top-left-radius",
18    "border-bottom-start-radius" => "border-bottom-left-radius",
19    "border-top-end-radius" => "border-top-right-radius",
20    "border-bottom-end-radius" => "border-bottom-right-radius",
21    "start" => "left",
22    "end" => "right",
23
24};
25
26pub static INLINE_PROPERTY_TO_LTR: phf::Map<&'static str, &'static str> = phf_map! {
27    "margin-inline-start" => "margin-left",
28    "margin-inline-end" => "margin-right",
29    "padding-inline-start" => "padding-left",
30    "padding-inline-end" => "padding-right",
31    "border-inline-start" => "border-left",
32    "border-inline-end" => "border-right",
33    "border-inline-start-width" => "border-left-width",
34    "border-inline-end-width" => "border-right-width",
35    "border-inline-start-color" => "border-left-color",
36    "border-inline-end-color" => "border-right-color",
37    "border-inline-start-style" => "border-left-style",
38    "border-inline-end-style" => "border-right-style",
39    "border-start-start-radius" => "border-top-left-radius",
40    "border-end-start-radius" => "border-bottom-left-radius",
41    "border-start-end-radius" => "border-top-right-radius",
42    "border-end-end-radius" => "border-bottom-right-radius",
43    "inset-inline-start" => "left",
44    "inset-inline-end" => "right",
45};