Skip to content

Disallow units for zero values #541

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

Merged
merged 1 commit into from Jun 17, 2016
Merged

Disallow units for zero values #541

merged 1 commit into from Jun 17, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jun 17, 2016

The value of 0 works without specifying units in all situations where numbers with length units or percentages are allowed. There is no difference between 0px, 0em, 0%, or any other zero-value. The units aren't important because the value is still zero. CSS allows you to omit the length units for zero values and still remain valid CSS.

It's recommended to remove units for all zero length values because these units aren't being used by the browser and therefore can be safely removed to save bytes.

@gkatsev
Copy link
Member

gkatsev commented Jun 17, 2016

Thanks! LGTM.

@gkatsev gkatsev merged commit d5b29f4 into vimperator:master Jun 17, 2016
amlitzer added a commit to amlitzer/vimperator-labs that referenced this pull request Sep 18, 2016
* master:
  fix command line Shift+Insert paste on Linux
  Fix vimperator#444: Honor hlsearch on n/N
  fix Shift+Insert paste on Linux
  use saniztizer based on app platform version, vimperator#556
  Remove asciidoc.conf
  Remove regressions.js
  Fix vimperator#259: Command prompt selection sometimes cleared
  Fix misspellings (vimperator#546)
  Optimize vimperator-labs-white.png and about_background.png, reduce file size with optipng
  Disallow units for zero values (vimperator#541)
  help.css: Disallow overqualified elements (vimperator#540)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant