carolinan / fullsiteediting

https://fullsiteediting.com/
289 stars 88 forks source link

Custom CSS should be on a single line #37

Closed glerner closed 11 months ago

glerner commented 1 year ago

"Site-wide custom CSS" on https://fullsiteediting.com/lessons/how-to-use-custom-css-in-theme-json/

Visual Studio Code indicates error in the JSON if have line breaks in the CSS. "Unexpected end of string"

Have to join all the CSS into a single line, from "css:" to the closing double quote. All JSON strings have to be on a single line (or "JSON requires all line breaks to be escaped as \n.")

I suggest mentioning that "single line" in the documentation.

Related issue to add to documentation: escaping double quotes in your CSS background: "red" change to background: \"red\"

carolinan commented 1 year ago

Thank you, I made a small update to the page.