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ý
4caa2f0723
Use WP native function for border style preparation
...
[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ý
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
6e887287e5
Remove unused variable from columns block renderer
...
[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
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
Jan Lysý
9106d38aee
Add text highlighting support for buttons
...
[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
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
Rostislav Wolny
b90a35d80a
Add definition of default heading font-sizes and renderer support
...
Initially, I tried to place the definition to theme.json
(It could set it in styles.block.core/heading or styles.elements.h1...)
It was not possible to use theme.json because of the fluid typography
feature which, when enabled for a site, causes font sizes to being
converted to the fluid definition (clamp(x, y, z)) and which
is not usable for an email due to very little client support.
We need to make some changes in Gutenberg to be able to disable the feature.
Currently, the code for generating font sizes in CSS generated from the theme.json
looks directly at the global settings of the site.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
4b55bb5bb3
Move default core/button styles configuration to integration
...
[MAILPOET-5814]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
cd274c0738
Add basic style for buttons
...
Default background rendering has to be handled on the button renderer level
because of a specific markup for Outlook (bgcolor attribute). Default text color and paddings are
handled via CSS inlining. That's why they are tested in RendererTest
I used the same background color and font color as the one defined for the button
element in WP core theme.json, and I also used similar padding values
(In core they use "calc(0.667em + 2px) calc(1.333em + 2px)")
[MAILPOET-5814]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
daf2d9f854
Update button renderer to read font size set by preprocessor
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
c4586d60e9
Move the default font family and font size settings to the theme.json
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
e8bb1b5ac0
Refactor font family rendering using CSS inlining
...
We don't reset font family on any level, so there is no need to
bubble the setting using a preprocessor and render the inline styles
explicitly in every block.
In this commit, I change how font-family settings are distributed/rendered
in the email renderer. In the new approach, we rely on class names defining font-family
and a generated CSS sheet with font-family definitions.
We apply the font-family CSS by inlining CSS rules for families in the later phase of
rendering after all individual blocks are processed.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Rostislav Wolny
3cb469a11b
Apply font-family set by user in button block
...
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00
Jan Lysý
6dba7b3afc
Use min function for better readability
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
1030d521c0
Use constant from SettingsController in image renderer
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
932f47b763
Fix image block rendering when image is not set
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
2fc3860512
Fix background color for full-width columns
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
fb2d89cb81
Fix rendering images with higher width than newsletter
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
da16f50d33
Refactor core/image renderer for better compatibility with Outlook
...
[MAILPOET-5788]
2024-01-16 12:22:54 +01:00
Jan Lysý
b68df77aee
Simplify ListBlock renderer
...
Because for nesting is better to doesn't have any wrapper, we add configured styles directly to the list tag
[MAILPOET-5790]
2024-01-11 14:39:08 +01:00
Rostislav Wolny
6368496de1
Render font size on button instead of buttons wrapper
...
Font size on the wrapper was causing whitespace below the buttons block.
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
0e10e6ed24
Use isset instead ?? operator in button renderer
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
9522a55460
Apply font color from the preprocessor in the button block
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
70273c626d
Add Button renderer test
...
This commit adds a button renderer test and fixes a couple of issues
found when working on the test
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
8054088852
Unify styles processing in button renderer with other blocks
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
7329826d39
Skip rendering of empty buttons
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
becb5243d5
Remove witdh:100% from columns wrapper
...
This was causing incorrect width in cases when $layoutPaddingLeft
and $layoutPaddingRight were set. Box-sizing doesn't have proper
support in clients, so I tried to fix it by removing 100% of the width.
According to tests in AcidEmail, this shouldn't break anything.
This was introduced when we added full-width alignment.
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
820af6454b
Extract flex layout rendering functionality to an extra class
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
486f497290
Apply text-decoration in the button renderer from preprocessor
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
9d35863fd0
Render buttons with borders with the correct width
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
499db0034c
Remove forgotten bdumps from image block
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
a359c1e392
Improve font styles rendering in button
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
bfa7b509cc
Add buttons block rendering
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
195756c0c7
Add renderer for core/button block
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00
Rostislav Wolny
3a74c1c4a0
Enable blocks and register dummy button/buttons renderers
...
[MAILPOET-5644]
2024-01-08 09:21:16 +01:00