Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid trailing zeros and semicolons in sizer's padding #930

Conversation

schlessera
Copy link
Collaborator

@schlessera schlessera commented Sep 25, 2020

The inline style for responsive sizers currently wastes bytes by adding fixed trailing zeroes to its value, like 80.0000%. This PR fixes this to only use as many digits as needed for values like this, stripping any unneeded zeroes and maybe even the period.

It also strips the trailing semi-colon that is not needed after the padding to save one more byte per sizer.

@google-cla google-cla bot added the cla: yes label Sep 25, 2020
@schlessera schlessera changed the title Avoid trailing zeros and semicolons in sizer's apdding Avoid trailing zeros and semicolons in sizer's padding Sep 25, 2020
@patrickkettner patrickkettner self-requested a review October 7, 2020 03:05
@CLAassistant
Copy link

CLAassistant commented Oct 8, 2020

CLA assistant check
All committers have signed the CLA.

@patrickkettner
Copy link
Collaborator

@schlessera terribly sorry, would you be able to sign off on the new CLA? thanks!

@patrickkettner patrickkettner merged commit 5563746 into ampproject:main Oct 9, 2020
@schlessera schlessera deleted the fix/avoid-trailing-zeros-and-semicolons branch October 10, 2020 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants