Opened 4 years ago
Closed 4 years ago
#52176 closed defect (bug) (fixed)
Twenty Twenty-One: style.css has errors in PhpStorm IDE
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch |
Focuses: | css, coding-standards | Cc: |
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.
Yeah, it looks like the brackets are not needed for :last-child, only for :nth-last-child.