css-property-parser icon indicating copy to clipboard operation
css-property-parser copied to clipboard

Error parsing shorthand property background: linear-gradient

Open addlistener opened this issue 1 year ago • 0 comments

My version

css-property-parser@^1.0.6:
  version "1.0.6"
  resolved "https://registry.npmjs.org/css-property-parser/-/css-property-parser-1.0.6.tgz#f0609a9e65f2ab429492d13b1406579e10ba0b3c"
  integrity sha512-exNU7S4ZXcOkQqP8gJRDz5yqj8ZzHU99ZCH3pnKNfivPgoHfVczN6Qh2S9P9SkbSYaEyq/NGhJtlyoxYdePJUQ==
  

The syntax error

Error: 'Error parsing shorthand property background: linear-gradient(109.6deg, rgb(61, 245, 167) 11.2%, rgb(9, 111, 224) 91.1%). Syntax error at line 1 col 17:

1 linear-gradient(109.6deg, rgb(61, 245, 167) 11.2%, rgb(9, 111, 224) 91.1%)
                  ^

Unexpected "1". Instead, I was expecting to see one of the following:

A character matching /[ \t\n\v\f]/ based on:
    wschar →  ● /[ \t\n\v\f]/
    __$ebnf$1 →  ● wschar
    __ →  ● __$ebnf$1
    LinearGradientFunc$subexpression$1$subexpression$1 → LinearGradientFunc$subexpression$1$subexpression$1$string$1 ● __ LinearGradientFunc$subexpression$1$subexpression$1$ebnf$1 ColorStopList
    LinearGradientFunc$subexpression$1 →  ● LinearGradientFunc$subexpression$1$subexpression$1 __ ")"
    LinearGradientFunc →  ● LinearGradientFunc$subexpression$1
    Gradient$subexpression$1$subexpression$1$subexpression$1 →  ● LinearGradientFunc
    Gradient$subexpression$1$subexpression$1 →  ● Gradient$subexpression$1$subexpression$1$subexpression$1
    Gradient$subexpression$1 →  ● Gradient$subexpression$1$subexpression$1
    Gradient →  ● Gradient$subexpression$1
    Image$subexpression$1 →  ● Gradient
    Image →  ● Image$subexpression$1
    BgImage$subexpression$1 →  ● Image
    BgImage →  ● BgImage$subexpression$1
    FinalBgLayer$subexpression$1 →  ● BgImage
    FinalBgLayer →  ● FinalBgLayer$subexpression$1 FinalBgLayer$ebnf$1
    Base → Base$ebnf$1 ● FinalBgLayer

addlistener avatar Aug 01 '24 03:08 addlistener