Opened 6 years ago
Closed 6 years ago
#52176 closed defect (bug) (fixed)
Twenty Twenty-One: style.css has errors in PhpStorm IDE
| Reported by: | mukesh27 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.7 |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | css, coding-standards |
Description
Hi, just upgraded to WP 5.6 with TwentyTwentyOne theme. The application itself seems to work fine. But when I open it with my PhpStorm IDE, the style.css file shows many errors. Most are related to many -- variables are not defined. But below caught my attention the most:
@media only screen and (min-width: 482px) {
.primary-navigation > div > .menu-wrapper li {
margin: 0;
width: inherit;
}
.primary-navigation > div > .menu-wrapper li:last-child() {
margin-right: 0;
}
}
The IDE highlight last-child() as error. Why do we need a parenthesis here?
Original support ticket - https://wordpress.org/support/topic/twentytwentyone-theme-style-css-has-errors/
Props to @activecoder
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Yeah, it looks like the brackets are not needed for :last-child, only for :nth-last-child.