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 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 18:16:14 GMT