Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS images 4: image() #402

Open
jsnkuhn opened this issue Sep 23, 2024 · 0 comments
Open

CSS images 4: image() #402

jsnkuhn opened this issue Sep 23, 2024 · 0 comments
Labels
topic: css Spec relates to CSS (Cascading Style Sheets) topic: images Spec relates to bitmap or vector image formats, or display or processing of images venue: W3C CSS WG

Comments

@jsnkuhn
Copy link

jsnkuhn commented Sep 23, 2024

WebKittens

No response

Title of the proposal

CSS Images Module Level 4: iamge()

URL to the spec

https://drafts.csswg.org/css-images-4/#image-notation

URL to the spec's repository

No response

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

No response

Mozilla standards-positions issue URL

mozilla/standards-positions#856

WebKit Bugzilla URL

https://bugs.webkit.org/show_bug.cgi?id=72584

Radar URL

No response

Description

spec fixes many long standing issues with CSS images:

a simplified syntax for image spriting that doesn't require 3 different CSS properties: background-image: image('sprites.svg#xywh=40,0,20,20');. This is a similar syntax as is used in object-view-box. Would be wonderful to finally have parity for background and foreground images. This also opens up the use of background-size and background-position for actual sizing and positioning of these images instead of dealing with the spriting.

ability to create a solid color image like this: background-image: image(red); instead of hacking a gradient like this: linear-gradient(red, red). Is good for devs because it's less repetition in the code and for browser vendors i'm guessing this would allow a path to a separate algorithm for just rendering a solid colored image.

Proper image fall-backs which url() can't do. When the image at the specified url can’t be downloaded or decoded, fallback to another image or color. This could lead to less background colors that are never seen being painted behind images.

automatically respect the image orientation specified in the image’s metadata.

FYI: the above are all from images-4 but the CSSWG is already looking at expanding image() in images-5 for things like background video (w3c/csswg-drafts#6732) and @image-manipulation (w3c/csswg-drafts#6807)

more detailed explainer: https://12daysofweb.dev/2022/css-image/

@nt1m nt1m added topic: css Spec relates to CSS (Cascading Style Sheets) venue: W3C CSS WG labels Nov 2, 2024
@othermaciej othermaciej added the topic: images Spec relates to bitmap or vector image formats, or display or processing of images label Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: css Spec relates to CSS (Cascading Style Sheets) topic: images Spec relates to bitmap or vector image formats, or display or processing of images venue: W3C CSS WG
Projects
None yet
Development

No branches or pull requests

3 participants