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.
Bug Report
Prerequisites
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. 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.