Skip to content

Bug: use-baseline reports linear-gradient and radial-gradient as not being widely available #135

@jimmy-zhening-luo

Description

@jimmy-zhening-luo

Environment

ESLint version: 9.26.0
@eslint/css version: 0.8.0
Node version: 22.15.1
npm version: 11.4.0
Operating System: Ubuntu & Windows 11 Pro

Which language are you using?

stylesheet

What did you do?

Configuration
import { defineConfig } from "eslint/config";
import css from "@eslint/css";

export default defineConfig([
	// lint CSS files
	{
		files: ["**/*.css"],
		language: "css/css",
		plugins: { css },
		extends: ["css/recommended"],
	},

	// your other configs here
]);
body {
  background-size: 100vi 100vb;
  background-image:
    linear-gradient(180deg,
      var(--color-bg-0) 0%,
      var(--color-bg-1) 15%,
      var(--color-bg-2) 50%) /* should be OK, but errors */;
    radial-gradient(50% 50% at 50% 50%,
      rgba(255, 255, 255, 0.75) 0%,
      rgba(255, 255, 255, 0) 100%) /* should be OK, but errors */,
}

What did you expect to happen?

I expected the above code to not produce any error.

Reasoning

linear-gradient and radial-gradient are considered widely-available by mdn, with few exceptions noted here and here.

What actually happened?

Received the following errors (with screenshot):

Type 'linear-gradient' is not a widely available baseline feature.eslintcss/use-baseline

Type 'radial-gradient' is not a widely available baseline feature.eslintcss/use-baseline

Image

Link to Minimal Reproducible Example

Please use the exact config and exact code above for minimum repo

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't working

    Type

    No type

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions