Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The resulting CSS is really inefficient.

1. It should only write the URL of the background image once, and only background-position on the rest.

2. The most widely used width/height should be specified as the default and width/height properties only included when it differs.

Also, to avoid the need of any padding between the images you can emulate background-crop with pseudo elements (http://nicolasgallagher.com/css-background-image-hacks/).



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: