Skip to content

Commit

Permalink
Merge branch 'main' of github.com:/davesnx/styled-ppx into Migrate-cs…
Browse files Browse the repository at this point in the history
…s-support-test-to-typesafety

* 'main' of github.com:/davesnx/styled-ppx:
  Add `justify-self` support (#453)
  • Loading branch information
davesnx committed Mar 18, 2024
2 parents 88d9ff6 + cb2bf08 commit 344b0b7
Show file tree
Hide file tree
Showing 2 changed files with 2,392 additions and 1 deletion.
21 changes: 20 additions & 1 deletion packages/ppx/src/declarations_to_emotion.re
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,26 @@ let justify_items =
},
);

let justify_self =
monomorphic(
Parser.property_justify_self,
(~loc) => [%expr CssJs.justifySelf],
(~loc, value) => {
switch (value) {
| `Auto => [%expr `auto]
| `Normal => [%expr `normal]
| `Stretch => [%expr `stretch]
| `Static(None, position) =>
[%expr [%e render_self_position_left_right(~loc, position)]]
| `Static(Some(`Safe), position) =>
[%expr `safe([%e render_self_position_left_right(~loc, position)])]
| `Static(Some(`Unsafe), position) =>
[%expr `unsafe([%e render_self_position_left_right(~loc, position)])]
| `Baseline_position(pos, ()) => render_baseline_position(~loc, pos)
}
},
);

let align_items =
monomorphic(
Parser.property_align_items,
Expand Down Expand Up @@ -4067,7 +4087,6 @@ let font_language_override =
unsupportedProperty(Parser.property_hyphenate_limit_zone); */
let ime_mode = unsupportedProperty(Parser.property_ime_mode);
let isolation = unsupportedProperty(Parser.property_isolation);
let justify_self = unsupportedProperty(Parser.property_justify_self);
/* let layout_grid = unsupportedProperty(Parser.property_layout_grid); */
/* let layout_grid_char = unsupportedProperty(Parser.property_layout_grid_char); */
/* let layout_grid_line = unsupportedProperty(Parser.property_layout_grid_line); */
Expand Down
Loading

0 comments on commit 344b0b7

Please sign in to comment.