resource / Front-End-Standards

Front-end development standards for Resource.
MIT License
23 stars 1 forks source link

Unitless "0" vlaues #47

Closed LukeAskew closed 11 years ago

LukeAskew commented 11 years ago

For CSS standards, you should not use units when the value is 0.

Proposed standard:

LukeAskew commented 11 years ago

@awood1261 @apartyka Thoughts?

apartyka commented 11 years ago

Any time I ever see a unit attached to 0 I remove it. 0 is 0. There is no need to attach the unit.

Sidenote: I once found/replaced 200+ declarations of "0px" from a style sheet over 1000 lines long. It cut down around 140kb. So, one could argue for not adding it for optimization's sake.

mrbinky3000 commented 11 years ago

I agree with the zero policy. One possible exception?

border: 0 none;

On Fri, Jul 26, 2013 at 12:56 PM, apartyka notifications@github.com wrote:

Any time I ever see a unit attached to 0 I remove it. 0 is 0. There is no need to attach the unit.

Sidenote: I once found/replaced 200+ declarations of "0px" from a style sheet over 1000 lines long. It cut down around 140kb. So, one could argue for not adding it for optimization's sake.

— Reply to this email directly or view it on GitHubhttps://github.com/LukeAskew/Front-End-Standards/issues/47#issuecomment-21633720 .

LukeAskew commented 11 years ago

@mrbinky3000 Does that not work? What is the exception?

mrbinky3000 commented 11 years ago

not an exception, I guess. 0 has no unit and "none" is in relation to the border type. So, not a problem.

On Fri, Jul 26, 2013 at 1:16 PM, LukeAskew notifications@github.com wrote:

@mrbinky3000 https://github.com/mrbinky3000 Does that not work? What is the exception?

— Reply to this email directly or view it on GitHubhttps://github.com/LukeAskew/Front-End-Standards/issues/47#issuecomment-21634925 .

nicetransition commented 11 years ago

it's should just be 0, @mrbinky3000 is correct