fix: app config page padding property is properly interpreted as shorthand #2720
+53
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Description
app_config
propertyLAYOUT.page_padding
would not be correctly interpreted as a shorthand CSS property for setting the padding on multiple sides, e.g.24px 0
or24px 32px 10px 24px
inline_padding
variant of the display group componentinline_padding
variant would also be 0.padding-inline: 24px
, for example). However, as well as providing a convenient alternative to adding custom styling, the custom styling approach is currently broken, see [BUG] Padding applied to display group through style_list is applied twice #2709.inline_padding
variant.padding-inline
to be half the desired value, knowing that it will be applied twice on the rendered componentDev notes
Because ionic components use the shadow dom, we must rely on the exposed CSS variables to customise the styling. In the case of padding, the shadow element
.inner-scroll
gets padding applied through 4 exposed CSS variables:--padding-top
,--padding-bottom
,--padding-start
and--padding-end
, see screenshot below. In order to set these variables from our authoredpage_padding
value, which defines all 4 via in shorthand syntax, we must manually extract the different values.Git Issues
Closes #2710
Screenshots/Videos
feat_app_layout_padding: