Opened 6 months ago
Closed 6 months ago
#64502 closed defect (bug) (invalid)
CSS Syntax error in _admin.scss: Malformed content property
| Reported by: | hiroshisato | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: | css, administration |
Description
Hello,
I noticed a CSS syntax error in src/wp-admin/css/colors/_admin.scss on line 72.
I spotted this while reviewing [61480], but the error appears to exist independently of that changeset.
The content property syntax is malformed. The url() function is missing its closing parenthesis ), and the subsequent characters seem to be a typo intended for the CSS content alternative text syntax.
Current code (Line 72):
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-color(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E" / ';
Suggested fix:
It should properly close the url() function and provide an empty string for the alternative text.
content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27#{url-friendly-color(variables.$form-checked)}%27%2F%3E%3C%2Fsvg%3E") / '';
Thank you.
Change History (4)
#1
follow-ups:
↓ 2
↓ 3
@
6 months ago
- Focuses ui accessibility removed
- Milestone Awaiting Review → 6.9.1
- Version trunk → 6.9
#2
in reply to: ↑ 1
@
6 months ago
Replying to peterwilsoncc:
Thanks for the report @hiroshisato, I've added this to the 6.9.1 milestone for review.
Apologies, I made a mistake in the description and would like to correct it here.
Actually, both fixes are required:
- Adding the missing closing parenthesis
)for theurl(). - Correcting the single quote
'to an empty string''.
The suggested fix code provided above correctly addresses both of these points.
#3
in reply to: ↑ 1
;
follow-up:
↓ 4
@
6 months ago
Replying to peterwilsoncc:
Thanks for the report @hiroshisato, I've added this to the 6.9.1 milestone for review.
I sincerely apologize.
I discovered that the browser translation tool I was using caused a display error, making the code appear to have syntax errors (missing ) and broken quotes).
I have verified that the actual source code is correct. This was a false alarm on my end.
Please close this ticket as invalid.
#4
in reply to: ↑ 3
@
6 months ago
- Milestone 6.9.1
- Resolution → invalid
- Status new → closed
- Version 6.9
Replying to hiroshisato:
I sincerely apologize.
I discovered that the browser translation tool I was using caused a display error, making the code appear to have syntax errors (missing
)and broken quotes).
I have verified that the actual source code is correct. This was a false alarm on my end.
Please close this ticket as invalid.
No need to apologize, these things happen.
Thanks for following up, I've closed the ticket off as requested.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for the report @hiroshisato, I've added this to the 6.9.1 milestone for review.