CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 00:57:24 GMT
content-type: text/html
content-encoding: gzip
last-modified: Sat, 15 Jul 2023 03:15:36 GMT
cache-control: max-age=2592000, public
expires: Sun, 09 Nov 2025 07:26:33 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98c463e36d35e12d
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: HIT
set-cookie: __cf_bm=.FWeKqdZv9XekCJAsr1.nqLQg_4mf5qZtBZTQRo15ok-1760144244-1.0.1.1-EQBILdHD19AveKH8.j7gSq2x7SnbEbVaifI1yFKp6cFoN6B5ImpmNup7V_pzbZjxQL88Xpx63rgaG.izerVuKQzlcv7ypxhb3qCVBMH0ZEo; path=/; expires=Sat, 11-Oct-25 01:27:24 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98ca67339c31c16d-BLR
alt-svc: h3=":443"; ma=86400
Re: background-position-x & y from Jorrit Vermeiren on 2009-01-20 (www-style@w3.org from January 2009)
Re: background-position-x & y
- From: Jorrit Vermeiren <mercator+w3c@gmail.com>
- Date: Tue, 20 Jan 2009 02:13:04 +0100
- To: "L. David Baron" <dbaron@dbaron.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: www-style@w3.org
- Message-ID: <bd6e15d00901191713j2f09a0a5v3a379b0ff14f62fc@mail.gmail.com>
On Wed, Jan 14, 2009 at 22:08, L. David Baron <dbaron@dbaron.org> wrote: > > On Wednesday 2009-01-14 12:41 -0800, fantasai wrote: >> Agreed. sprite() is much preferable to extending url(). > > I'm not sure "sprite" is really what we want to call it. Maybe > "image" or "image-region"? > > Anyway, my previous proposal from the last time this came up is in > https://lists.w3.org/Archives/Public/www-style/2007Sep/0061.html I see one possible drawback to this approach. Doing sprites now, you typically only define the background image URI once, and only need to specify the background-position property for all the alternatives (e.g. see the first post in this thread: https://lists.w3.org/Archives/Public/www-style/2008Nov/0279.html). Would such inheritance still be possible using this function notation? For example: /* top-left 10x10 sprite is the default: */ li { background-image: sprite(url(foo.png), 0px, 0px, 10px, 10px); } /* 2nd and 3rd 10x10 sprites in first row for special cases: */ li#one { background-image: sprite(inherit,10px, 0px, 20px, 10px); } li#two { background-image: sprite(inherit, 20px, 0px, 30px, 10px); } /* hover states in second row: */ li:hover { background-image: sprite(inherit, inherit, 10px, inherit, 10px); } The order of the coordinates I used is x-start, y-start, x-end, y-end, for no particular reason. The exact syntax isn't important (and can hopefully be improved upon), I just hope my intention is clear. Jorrit
Received on Tuesday, 20 January 2009 01:19:40 UTC