Ryo Kawaguchi wrote:
Hi,

There has been some discussion on how to support CSS sprites.
[bug 113577] https://bugzilla.mozilla.org/show_bug.cgi?id=113577

There are a few options:

(1) define a new CSS value type for background-image property.
(e.g. background-image: -moz-image-with-region('foo',10,10,10,10))

(2) use a new syntax in URI as proposed by Media Fragments WG.
(e.g. http://host/foo#xywh=10,10,10,10).

After some discussion, we were in favor of the second option; it
generalizes CSS sprites as a kind of Media Fragments, and it can
be used not only in background-image but also in <img> tags and
so on. But, roc pointed out the first option may be better
considering compatibility with older browsers since during the
transition time, people can use 2 lines of background-image as
follows (older browser simply ignores the 2nd line).

background-image: url(logo7.png);
background-image: -moz-image-with-region('logos.png', 10, 30, 60, 20);

I'd like to have more discussion on this to finalize the plan.
Any feedback is welcomed.

I think it's likely that the CSSWG will adopt some kind of CSS-specific
syntax for sprites, although there seems to be interest in a more
powerful solution than a simple URL-with-rect function.

On the other hand, if the Media Fragments WG publishes a fragment
identifier syntax, it's likely that we'd want to implement it. But
since fragment identifiers don't have a good fallback story or a
good way to experiment with syntax, perhaps the best thing to do
would be

  - Implement -moz-image-with-region()
  - Do it in a way that's easy to extend to handle fragment IDs

~fantasai
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to