Zero lengths do not need unit. However, there is some significant benefits of using unit with zero lengths while developing code.

See real unit and easy change of them in browser developer tools

If you have an element which you need to modify the margin, padding, width or height for, you can use the cursor keys to increment/decrement the size. Simply use the up and down cursor keys to increment/decrement by a unit of 1.

In Chrome, Firefox and Safari you can increment/decrement by a unit of 10 by holding the “Shift” key whilst pressing the up and down cursor keys; and you can increment/decrement by a unit of 0.1 hold the “Alt” key whilst pressing the up and down cursor keys.

In Chrome and Safari, you can also increment/decrement by a unit of 100 by holding down the “Shift” key whilst pressing Page-Up and Page-Down.

These shortcuts are especially helpful when you are unsure of exactly what the correct size should be.

No unit in pre-production

Yes, you can omit unit length in pre-production version for smaller file. Of course, be sure that product is tested before release to production.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Comments

You can leave a response, or trackback from your own site.

Before you add comment see for rules.

Leave a Reply

Your email address will not be published. Required fields are marked *

4y7f5s