Home  >  Article  >  Backend Development  >  How to Fix "property value expected css" and "at-rule or selector expected css" Errors While Editing Go Templates in VSCode?

How to Fix "property value expected css" and "at-rule or selector expected css" Errors While Editing Go Templates in VSCode?

Patricia Arquette
Patricia ArquetteOriginal
2024-11-08 08:15:02861browse

How to Fix

Troubleshooting Go Template Editing Errors in VSCode

In Go templates, you can use {{ }} to dynamically insert values into HTML. However, users may encounter errors like "property value expected css" and "at-rule or selector expected css" when editing Go templates in VSCode.

To resolve these errors, consider the following solution:

Disable HTML Validation in VSCode

  1. Open Visual Studio Code.
  2. Click on "File" > "Preferences" > "Settings" (or "Code" > "Preferences" > "Settings" on a Mac).
  3. Scroll down to the "Settings" search bar and type "html.validate.styles."
  4. Set the value of "html.validate.styles" to "false."

Disabling HTML validation should eliminate the "property value expected css" and "at-rule or selector expected css" errors, allowing you to continue editing your Go templates without interruptions caused by formatting issues.

The above is the detailed content of How to Fix "property value expected css" and "at-rule or selector expected css" Errors While Editing Go Templates in VSCode?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn