Rostislav Wolny
a7153d70c3
Add getVariablesValuesMap to the theme controller
...
This commit adds a method that returns map of CSS variables and their values defined based on the theme.json
It is a preparation step for a postprocessor that will use this map to replace variables with values in final HTML.
There are many clients that don't support CSS variables
[MAILPOET-5918]
2024-03-05 16:03:49 +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
Jan Lysý
698c41b77b
Use styles from settings controller in preview
...
[MAILPOET-5638]
2024-03-01 16:36:52 +01:00
Jan Lysý
db8dac03d2
Prepare styles in store for sidebar
...
[MAILPOET-5638]
2024-03-01 16:36:52 +01:00
Jan Lysý
075eaab28a
Change image caption align to center
...
We don't need to set the caption align by image alignment. It should be always center.
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
3a2573bb5b
Fix column and columns width when border is set
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
4caa2f0723
Use WP native function for border style preparation
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
a693c6f4ae
Fix width for full-width blocks with borders
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
76e3a20c24
Improve border compatibility across email clients
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
f9ed604227
Fix setting image width when it's empty
...
The min function doesn't work properly with strings. Converted widths to numbers should work better here.
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
2636bc1055
Update BlocksWidthPreprocessor to calculate with borders
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
53a192b3d8
Add support for rendering image border
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Jan Lysý
9e8647f046
Add support for rendering column and columns borders
...
[MAILPOET-5821]
2024-02-29 11:05:55 +01:00
Rostislav Wolny
85e4bb2ce8
Remove an unnecessary class from a column wrapper
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
f2dd786d19
Remove unused method from SettingsController
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
6e887287e5
Remove unused variable from columns block renderer
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
5f2b5e4bd4
Add support for the site theme's color palette
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
e5d11f99d4
Cache WP_Theme_JSON instance
...
This is a slight improvement to avoid building WP_Theme_JSON instance repeatedly.
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
b724ef4ac2
Extract Theme related methods from SettingsController as ThemeController
...
I want to avoid the SettingsController becoming some kind of a god class
so in this step, I extracted themejson-related stuff to an extra class.
In the future, we should also move methods for manipulating CSS to a helper.
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
aa658782fb
Move getElementInnerHTML from button to DomDocumentHelper
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
febc070c0f
Use dom helper for extracting classes from block HTML
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
d35e498f36
Add getAttributeValueByTagName to dom helper
...
I'm adding this method to cover use-cases where we need to extract classes
from a block's HTML.
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
875fde56e9
Add colors from palette support to the button
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
299d51effa
Add support for palette colors for column and columns
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
5ad27b6038
Adjust the list block renderer to support inlined colors
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
330b4c5a6c
Adjust Paragraph block to work with inlined color palette CSS
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
2645d57dcb
Adjust Paragraph block to work with inlined color palette CSS
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
f3392168ca
Add color palette classes to CSS for renderer
...
[MAILPOET-5741]
2024-02-28 09:01:20 +01:00
Rostislav Wolny
2858a21783
Add spacing sizes presets
...
This commit addresses an issue that padding control in the email
an editor is rendered without a slider.
This change makes the padding control render the same as in TT4 theme
[MAILPOET-5714]
2024-02-19 11:44:33 +01:00
Jan Lysý
1338554c41
Change property name to better fit to new classname
...
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
dc96fa2b1c
Add postprocessor for replacing mark tag to span
...
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
9b54217049
Rename PreprocessManager class to ProcessManager
...
As we want to add rendering postprocessing, it's better to use a different name for this class.
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
9106d38aee
Add text highlighting support for buttons
...
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
a671a88956
Remove replacing space in image URL
...
This fix should not be used anymore.
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
b6538cd1c6
Set default line-height for the rendered email
...
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
7fac0e019f
Remove line-height CSS styles
...
Because the line height setting makes the rendered email not look good sometimes.
For now we decided to remove it.
[MAILPOET-5809]
2024-02-19 11:18:58 +01:00
Jan Lysý
d1899090bc
Create DomDocumentHelper to work with DOMDocument
...
[MAILPOET-5831]
2024-02-16 14:18:47 +01:00
Pavel Dohnal
9cf2eef721
Register send status
...
[MAILPOET-5851]
2024-02-15 10:43:46 +01:00
Jan Lysý
851a9626c9
Enable typography appearance
...
[MAILPOET-5840]
2024-02-14 14:43:10 +01:00
Jan Lysý
436349a980
Remove skipping core/columns in spacing preprocessor
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
d2ebd587a0
Remove a space in style causing failing integration test
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
fc79e3eee9
Implement margin-top for core block renderers
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
eed1dbb695
Fix heading and paragraph background with padding
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
92fec6eb2f
Fix spaces around list elements in Outlook
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
48b4388992
Add block spacing preprocessing
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
9e0209f0c6
Reduce resetting styles for email rendering
...
Because a lot of reset styles make the email HTML hardly readable, I decided to reduce reset styles.
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
6ccbf84cdf
Use gap size as email layout padding
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Jan Lysý
7ab562bdd2
Set default block gap
...
[MAILPOET-5816]
2024-01-24 15:38:13 +01:00
Rostislav Wolny
d6e83a3471
Add documentation for theme.json
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
3574e6b2ca
Move gradients config to theme.json
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00