You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which, for example, leads to an image size of 620px with a container width of 1280px. logical, because $1280 * 0.5 - 40 / 2 = 620$
PHP produces the same result in this case, as the gutters are removed first and then the multiplier is applied.
Mathematically a different way, but in this case the same result: $(1280 - 40) * 0.5 = 620$
However, if a different multiplier is used, such as 25% instead of 50%, the situation is unfortunately different.
CSS calculates: $1280 * 0.25 - 40 / 2 = 300$
And PHP calculates: $(1280 - 40) * 0.25 = 310$
Ergo:
If you want to reflect the calculation of image/text widths used in SCSS in PHP code, you would first have to apply the multiplier and then subtract half the gutter.
The text was updated successfully, but these errors were encountered:
Bug Report
Prerequisites
to see if your bug or enhancement is already reported?
Description
Once again, a brilliant mathematician has pulled off a stroke of genius and caused the widths of the images not to be calculated correctly:
For example, the CSS states:
Which, for example, leads to an image size of 620px with a container width of 1280px. logical, because$1280 * 0.5 - 40 / 2 = 620$
PHP produces the same result in this case, as the gutters are removed first and then the multiplier is applied.$(1280 - 40) * 0.5 = 620$
Mathematically a different way, but in this case the same result:
However, if a different multiplier is used, such as 25% instead of 50%, the situation is unfortunately different.$1280 * 0.25 - 40 / 2 = 300$ $(1280 - 40) * 0.25 = 310$
CSS calculates:
And PHP calculates:
Ergo:
If you want to reflect the calculation of image/text widths used in SCSS in PHP code, you would first have to apply the multiplier and then subtract half the gutter.
The text was updated successfully, but these errors were encountered: