Commit Graph

131 Commits

Author SHA1 Message Date
Mike Jolley
004c31e5d7 Remove extra padding and empty rendered paragraphs 2024-05-01 11:15:27 +01:00
Mike Jolley
d90e4dc962 Fix element styles and scrollbars 2024-04-22 12:43:17 +01:00
Mike Jolley
1e5ec13403 Ensure typography has value 2024-04-22 12:43:17 +01:00
Mike Jolley
587a59e842 remove inherited size from buttons 2024-04-22 12:43:17 +01:00
Mike Jolley
af92fd9af3 Fix styles in preview 2024-04-22 12:43:17 +01:00
Mike Jolley
a8e9b167cb Work on tool panels 2024-04-22 12:43:17 +01:00
Rostislav Wolny
4f7268e364 Use sprintf for inserting styles into text block HTML template
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
13c73b781b Remove unnecessary table wrap for outlook for text blocks
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
b8396140ac Remove paragraph renderer
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
fd04141141 Use Text renderer also for paragraph block
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
d49f3e8988 Rename Heading renderer to Text renderer
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
c52937202e Polish Heading block renderer code
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
057de1d2e7 Use a first tag from heading block rendered content
The block has only one HTML element, so we don't need to explicitly ask for a heading.
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
9873634f1e Use inherit value as a fix for font-size defined via clamp
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
d56cf24a7c Fix regular expression for removing padding in the heading block
The problem was that \padding.*:\ would eat much more than just one padding rule.
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Rostislav Wolny
15e0c3fa4d Use WP's style engine for formatting style arrays to string
[MAILPOET-5798]
2024-04-18 12:45:15 +02:00
Mike Jolley
3f2b96f3a6 Introduce block to handle email content 2024-04-10 11:42:50 +02:00
Mike Jolley
37e901c809 Restore content renderer styles to fix remaining tests 2024-04-10 11:42:50 +02:00
Mike Jolley
02b8a4ad78 Force content render 2024-04-10 11:42:50 +02:00
Mike Jolley
0b2e88df9a Outlook spacing 2024-04-10 11:42:50 +02:00
Mike Jolley
2060b68583 Handle spacing using consistent spacing element 2024-04-10 11:42:50 +02:00
Mike Jolley
f79f3a00c4 Remove kses 2024-04-10 11:42:50 +02:00
Mike Jolley
e0d27db790 Remove top level processor in favour of wrapping column in template, fix column padding 2024-04-10 11:42:50 +02:00
Mike Jolley
05124fc6c1 Remove redundant use statement 2024-03-25 12:11:11 +01:00
Mike Jolley
2c98fc4323 Code styling 2024-03-25 12:11:11 +01:00
Mike Jolley
a5f177c7e4 Spacing 2024-03-25 12:11:11 +01:00
Mike Jolley
fc384424ac Update tests to reflect markup changes 2024-03-25 12:11:11 +01:00
Mike Jolley
2f888daca5 Fix rendering and include shared logic 2024-03-25 12:11:11 +01:00
Mike Jolley
9a705a4394 Refactor button styling 2024-03-25 12:11:11 +01:00
Pavel Dohnal
fea141d1bd Fix rendering of columns width
[MAILPOET-5945]
2024-03-22 15:46:57 +01:00
Mike Jolley
435f638011 Apply rules on lib dir 2024-03-21 16:57:59 +01:00
Jan Lysý
5ceef236bf Use the same format for styles as it is in theme.json
This should be the first step to using theme.json format in DB and merging more style configurations to the final one.
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Jan Lysý
c415f1efce Move heading styles from CSS file to theme.json
Because we want to have all editor configurations in theme.json, I moved heading font sized to theme.json and removed redundant filters.
[MAILPOET-5640]
2024-03-15 16:57:41 +01:00
Rostislav Wolny
3bbb7b71a1 Fix border radius issues in the button
When only the radius was defined, we set border solid and it caused
that sometimes it was rendered even when the width was not defined.
Overflow hidden ensures that inner link element doesn't break the border radius.
[MAILPOET-5907
2024-03-15 14:43:01 +01:00
Rostislav Wolny
4071175178 Move ContentRenderer to the Renderer/ContentRenderer namespace
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Rostislav Wolny
2c5857e89b Split renderer into content renderer and renderer
Content renderer - renders the content of the email post
Renderer - places the content into the email HTML template and generates text version
[MAILPOET-5798]
2024-03-15 10:28:48 +01:00
Mike Jolley
3defeec415 Rename tableWidth variable 2024-03-13 10:02:00 +01:00
Mike Jolley
9e25796d66 IE column widths 2024-03-13 10:02:00 +01:00
Mike Jolley
3e8edcdc8f Fix border styles 2024-03-13 10:02:00 +01:00
Mike Jolley
bc500812ed Remove max width so table fills full width of layout 2024-03-13 10:02:00 +01:00
Mike Jolley
a922714154 Correctly set default alignment to stretched 2024-03-13 10:02:00 +01:00
Mike Jolley
c75367b996 Merge borders to ensure defaults are set 2024-03-13 10:02:00 +01:00
Mike Jolley
86a9de0df5 Fix extra borders in columns 2024-03-13 10:02:00 +01:00
Mike Jolley
44d95d9e6b Fixing tests and adding debug information to show generated HTML 2024-03-13 10:02:00 +01:00
Mike Jolley
880f157fb0 Update tests due to moving some classnames and styles 2024-03-13 10:02:00 +01:00
Mike Jolley
250f4ad929 Tidy markup 2024-03-13 10:02:00 +01:00
Mike Jolley
27414dfc55 Padding from block styles 2024-03-13 10:02:00 +01:00
Mike Jolley
c4deea8b48 Add background support for columns 2024-03-13 10:02:00 +01:00
Rostislav Wolny
970b321de5 Fix border color fallback for button block
When the border color is not set, a block uses text color as a fallback.
This was not working properly for the button block when the font color was picked from the color palette.
This PR fixes the issue and adds the proper border color class.

[MAILPOET-5919]
2024-03-12 08:38:56 +01:00
Rostislav Wolny
c545dc4967 Refactor applying padding in block renderers
Instead of using our own logic for building padding style definition,
we switch to wp_style_engine_get_styles which generates the styles definitions for us.
It also handles value variable formatting to valid CSS (var:preset|spacing|50 to var(--wp--preset--spacing--50)).
[MAILPOET-5918]
2024-03-05 16:03:49 +01:00