Closed aon21 closed 1 year ago
Any expectations of when this will get merged? 👀
I'm a little confused by the output of the inlineStyle stuff to get spacing/etc. If I dump $block->style
I seem to get:
+"style": array:1 [â–¼
"spacing" => array:1 [â–¼
"padding" => array:4 [â–¼
"top" => "var:preset|spacing|70"
"right" => "var:preset|spacing|70"
"bottom" => "var:preset|spacing|70"
"left" => "var:preset|spacing|70"
]
]
]
where each value is var:preset|spacing|xx
which wouldn't be valid when inlined in the style
tag of the block.
I think it was generally supposed to output the actual CSS var like var(--preset-spacing-70)
I think?
Did something change between the initial PR and now? Am I missing something? Do we need to deserialize this ourselves? 😩
Actually there was more issues to it. Added a css formatter as a helper to build css correctly. Didn't want to put it in the same file as its already very big. Updated gradients to be returned in classes and in inline style. As there are two ways how wp adds gradients:
Updated stubs too.
Nice! I will get to this when I wake up. Was waiting on this before I push a release.
I think we could probably move the CssFormatter
into a Trait
inside of the Concerns
directory and name it something like FormatsStyles
or FormatsCss
.
Also need to add color stuff to the construct block stub.
Thats a good idea. Moved it into a Trait.
The latest changes on this look good! I'll try to test it sometime this week. :)