cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

feat(jss-plugin-expand): Add support background array of objects #1659

Open N1cE-me opened 3 months ago

N1cE-me commented 3 months ago

Corresponding Issue(s): https://github.com/cssinjs/jss/issues/711

What Would You Like to Add/Fix?

Support for multiple backgrounds list, from array of objects. Example:

[
  {
    "image": "url(...)",
    "position": ["50%", "50%"],
    "size": "cover",
    "repeat": "no-repeat"
  },
  {
    "image": "linear-gradient(....)"
  },
  {
    "image": "url(...)",
    "position": [0, 0],
    "size": "cover"
  },
]

Expectations on Changes

This changes only add support for arrays. Old code will still work without the need to make changes.