Parse padding presets for use in sizes
values
#1240
Labels
[Plugin] Auto Sizes
Issues for the Auto Sizes plugin
sizes
values
#1240
As described in this comment. In order to make an image's
sizes
value more accurately reflect the constraints of its alignment container, we need to incorporate the way padding settings affect the width of the container. For example, in the Twenty Twenty-four theme, the defaultsettings.layout.contentSize
setting is 620px, which is the max size that the container will be on larger viewport widths, but that width gets constrained by the padding styles for the site.However, in many cases, theme.json padding styles reference the global padding settings, using CSS variables like
var(--wp--preset--spacing--50)
, which cannot be calculated by the browser when thesizes
attribute is parsed, so we will need a way to parse these settings into valid media query values.The text was updated successfully, but these errors were encountered: