- From: Sophie <sophie.gousset@laposte.net>
- Date: Tue, 19 May 2009 10:55:04 +0200
- CC: www-style@w3.org
Jorrit, I like the logic of this proposal. The resulting markup would be rather light and I think easier to read than position coordinates. If I follow you on this track, I would add an optional 'clip' series of coordinates to be able to mask the rest of the image when you assign it to an area bigger than the sprite you want to use (tab icons with text for example). You then wouldn’t need to space the sprites in the image file, or use extra markup to clip the sprites. @sprite <id> { sprite-image: <image>; sprite-offsets-x: <number>+; sprite-clip-x: <number>+; sprite-offsets-y: <number>+; sprite-clip-y: <number>+; } sprite(<id>, <x-index>, <y-index>) would refer to the x and y offsets list, the clip indexes wouldn’t be used outside of the @sprite rule. Sophie -- ______________________________________________________________ | S O | P H- http://sophie-g.net/ |_I_E__________________________________________________________
Received on Tuesday, 19 May 2009 08:55:44 UTC