Replace 0% and 100% selectors with `from` and `to` so that we don't use invalid 100% as tag name.