Refactor and generalize css for floated blocks#833
Conversation
sneridagh
left a comment
There was a problem hiding this comment.
Ok, aside of all my comments, there is a major thing: The value of the CSS property are saved in the field. We moved to have literals on the field, then we use a styleDefinition to make the interpolation on runtime.
I know that the alignment has only one CSS property, but you never know if at some moment we will need it to be mapped to more...
Please read the code and the docs on how to do this:
https://volto-light-theme.readthedocs.io/reference/widgets.html#colorswatch
See styleFieldDefinition utility.
| }, | ||
| ); | ||
|
|
||
| // Blocks alignment convenience classes injection |
There was a problem hiding this comment.
Why do we need at all the classnameExtender if we are controlling all via CSS props?
| @@ -0,0 +1,10 @@ | |||
| /** | |||
There was a problem hiding this comment.
the GDPR block is customizing this... we will have to adapt it adding it this customization, and then what it does pushes. Plus the changes we need to apply this week. And I bet it's customizing the original Volto one. Probably we will have to centralize the customization in here or duplicate the override.
/cc @davisagli @danalvrz
|
@TimoBroeskamp @danalvrz Ah, and a last thing. From now on, we don't ship anything that is not tested in full. Nowadays is almost for free (agents). |
|
Related to: |
I updated the css for floating blocks like image maps and video blocks that are aligned left or right according to the figma design.
https://gitlab.kitconcept.io/kitconcept/distribution-kitconcept-intranet/-/issues/351