Open Bug 703217 Opened 8 years ago Updated 6 months ago

Implement image() from CSS Image Values and Replaced Content Module Level 4

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set

Tracking

()

People

(Reporter: aharon, Assigned: seth)

References

(Depends on 1 open bug, Blocks 3 open bugs, )

Details

(Keywords: dev-doc-needed, feature)

The CSS Images Level 3 Working Draft defines image() notation (http://www.w3.org/TR/2011/WD-css3-images-20110908/#image-notation). Supporting it would allow not only image fallbacks, but also image flipping for RTL, on images annotated with the ltr keyword (as in, "this image is ltr; flip when it is being displayed in rtl"; there is also the rtl keyword for the inverse case). That would simplify mirroring some pages, especially ones with relatively simple graphics.
Blocks: html5bidi
FYI, The ltr and rtl keywords have now been dropped from CSS3 images due to a design issue. The feature has been deferred to Level 4 (but may wind up with a different syntax than originally suggested). The design issue (see http://lists.w3.org/Archives/Public/www-style/2012Mar/0243 and replies in "Next in thread" chain) is that it is not clear that there is a use case for specifying different modes (non-flipping, ltr, rtl) for different images in the fallback chain. That the syntax allows this may indicate that it is suboptimal.

Nevertheless, it would still be useful if browsers prototype this feature in the current syntax (suitably prefixed as necessary).
This functionality is now back in Level 4 (http://dev.w3.org/csswg/css4-images/#bidi-images), with a slight modification.
Depends on: 790640
Media Fragments for Images: Spatial Dimensions support is required before image() can be implemented (per spec). 

Please change this bug's description to remove the second part so it just says e. g. "Implement image() (CSS Image Lvl 3)".
Assignee: nobody → seth
Blocks: 801844
Shouldn't this depend on bug 801844, rather than the other way around?
AFAICS Bug 801844 is a meta bug, so blocking it is the correct relationship.
I think the idea is that we'll do bug 801844 before we fix this bug. And I don't think bug 801844 is a meta bug, actually.
(Seth Fowler [:seth] from Bug 801844 comment #1)
> Let's treat this as a tracking bug since there are a lot of subprojects
> here. I'll create additional bugs for the specific features as needed.

Looks to me like a meta bug (ok, tracking bug, whatever ;-) ). Implementing image() is part of the refactoring. 

BTW: html5bidi should be removed from "blocking" as this is longer covered by CSS3 but CSS4 (this bug is about CSS3).
We don't usually implement new features as part of a refactoring.
We agree that bug 801844 does not have the best title. =) The intention was that we add support for the CSS3 image-related features mentioned in that bug's description, while making the changes necessary to do so in such a way that it will be easier to support the CSS4 features also mentioned in the bug when the time comes. I don't think that "refactoring" was the right term to use for this. Sorry if this has caused some confusion.
Blocks: css3test
No longer blocks: html5bidi
Keywords: feature
Summary: Support Image Level 3's image() notation; it offers automated image flipping for RTL → Support Image Level 3's image() notation for fallbacks & sprites
Duplicate of this bug: 1352749
Blocks: css-images-4
Summary: Support Image Level 3's image() notation for fallbacks & sprites → Implement image() from CSS Image Values and Replaced Content Module Level 4
MDN image() page: https://developer.mozilla.org/en-US/docs/Web/CSS/_image

JSFiddle for image media fragments: http://jsfiddle.net/Wf2Vj/5/

image with spatial fragment currently supported only in FF (since FF4), but via the -moz-image-rect(url(), t, r, b, l) syntax (see http://jsfiddle.net/Wf2Vj/7/)
Type: defect → enhancement
You need to log in before you can comment on or make changes to this bug.