Skip to content

Three different parse errors related to CSS variables #315

@tmb-github

Description

@tmb-github
/*
Three different cases where the validator cannot parse CSS variables & reports parse errors:
*/

.aaa {
  padding-top: calc(var(--aspect-ratio-h, 1) / var(--aspect-ratio-w, 1) * 100%);
}

.bbb {
  background: linear-gradient(var(--cta-orange-light), var(--cta-orange-dark));
}

.ccc {
  margin: calc(1em + var(--header-height)) auto 3em auto;
}

/*
It reports back the following:
2   .aaa  Value Error : padding-top Parse Error ) * 100%)
6   .bbb  Value Error : background Parse Error )
10  .ccc  Value Error : margin Parse Error )) auto 3em auto
*/

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions