csskit/csskit

Implement css-images-4 `<image>` types

Open

#845 创建于 2026年1月29日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (10 fork)github user discovery
area: hirbaseline: widely availablecomplexity: mediumhelp wantedimpact: one StyleValuespopularity: very high

仓库指标

Star
 (301 star)
PR 合并指标
 (PR 指标待抓取)

描述

input

body{
 background-image:    image-set(
    url(    "    https://mdn.github.io/shared-assets/images/examples/balloons-small.jpg   "    )
      1x,
    url(    https://mdn.github.io/shared-assets/images/examples/balloons-landscape.jpg    )
      2x
  );
mask-image:image-set(
  "image1.avif"type("  image/avif  "),
  "image2.jpg"   type("image/jpeg")
);
}

div {
  background:   url(    "foo.png"   );
}

output

body{background-image:image-set( url( "    https://mdn.github.io/shared-assets/images/examples/balloons-small.jpg   ")1x,url(https://mdn.github.io/shared-assets/images/examples/balloons-landscape.jpg) 2x);mask-image:image-set( "image1.avif"type("  image/avif  "),"image2.jpg" type("image/jpeg"))}div{background:url( "foo.png")}

extened

body{background-image:image-set("https://mdn.github.io/shared-assets/images/examples/balloons-small.jpg"1x,"https://mdn.github.io/shared-assets/images/examples/balloons-landscape.jpg"2x);mask-image:image-set("image1.avif"1x type("image/avif"),"image2.jpg"1x type("image/jpeg"))}div{background:url(foo.png)}

贡献者指南