Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#49001 closed defect (bug) (duplicate)

Theme Editor — Stylesheet — Validation

Reported by: douglasuk's profile douglasuk Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Administration Keywords:
Focuses: css, administration, coding-standards Cc:

Description

Valid CSS is not being recognised and is raising validation errors. There are two instances being reported here.

{Urgency: low; impact: low (workaround clear); functionality: unaffected}

(1) padding-inline-start

This is valid CSS https://www.w3.org/TR/css-logical-1/#padding-properties but is not being recognised. Perhaps other padding names are also not recognised; I have not checked.

Example:

.wp-block-latest-posts.wp-block-latest-posts__list {
	padding-inline-start: 5%;
}

Causes a warning message "Unknown property 'padding-inline-start'".

(2) CSS variable setting and usage is not being recognised.

Setting a variable causes an error which has to be overridden every time the css is saved. Using the variable causes warnings. Both of these are valid CSS https://www.w3.org/TR/css-variables-1/

Examples:
Setting a variable:

:root {
	--theme-color: #00b359;
}

Results in error "Expected RBRACE at line x col x."
This causing an error rather than, perhaps, a warning about using advanced features, is a particular issue.

Using a variable:

.some_box {
	background-color: var(--theme-color)

Results in warning "Expected (<color>) but found 'var(--theme-color)'"

.some_box {
	border-color: var(--theme-color)

Results in warning "Expected (<color>{1,4}) but found 'var(--theme-color)'"

Change History (1)

#1 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi there, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #44471.

Note: See TracTickets for help on using tickets.