Bug Description
The PHP CSS Parser is failing to parse the CSS units vmin and vmax, inserting spaces so they become vm in and vm ax.
Similarly, the turn unit is also corrupted but in a different way: 1turn gets serialized out as 1 turn which is a syntax error.
Originally reported in the support forum.
Expected Behaviour
All CSS units should be preserved.
Steps to reproduce
Add this HTML to a Custom HTML block:
<div id="box">
I should be 20vmin×20vmax in size (and be spinning)!
</div>
<style>
#box {
width: 20vmin;
height: 20vmax;
border: solid 1px red;
background-color: gray;
animation: spin 12s linear infinite;
}
@keyframes spin {
to {
transform: rotate(1turn);
}
}
</style>
Compare the AMP with the non-AMP version. The non-AMP version appears as a box and spins:

Whereas the AMP does not (and no animation appears):

Update: In develop it the element now appears as a box. The vmax and vmin units were fixed with #4610.
The PHP CSS Parser incorrectly is injecting spaces into the units:
@keyframes spin{
to {
transform: rotate(1 turn)
}
}
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
QA testing instructions
Demo
Changelog entry
Bug Description
The PHP CSS Parser is failing to parse the CSS unitsvminandvmax, inserting spaces so they becomevm inandvm ax.Similarly, the
turnunit is also corrupted but in a different way:1turngets serialized out as1 turnwhich is a syntax error.Originally reported in the support forum.
Expected Behaviour
All CSS units should be preserved.
Steps to reproduce
Add this HTML to a Custom HTML block:
Compare the AMP with the non-AMP version. The non-AMP version appears as a box and spins:
Whereas the AMP does not (and no animation appears):
Update: In
developit the element now appears as a box. Thevmaxandvminunits were fixed with #4610.The PHP CSS Parser incorrectly is injecting spaces into the units:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
vminandvmaxfirst beforevm.turnunit.QA testing instructions
Demo
Changelog entry