Make WordPress Core

Opened 8 years ago

Closed 10 months ago

Last modified 10 months ago

#43896 closed defect (bug) (worksforme)

Several flex and grid CSS properties listed as Unknown property in Customizer

Reported by: davidjlaietta's profile davidjlaietta Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9
Component: General Keywords: has-patch
Focuses: css Cc:

Description

When I use the CSS editor in the Customizer it suggests element properties as I start typing them. One of the properties that it suggests is the justify-items property. When I save the settings in the Customizer I get a notice of "Unknown property 'justify-items'."

I've checked some of the other flexbox and grid properties, and there are several others that this is the case for, namely:

  • justify-items
  • grid-gap
  • grid-column-gap
  • grid-row-gap
  • place-self

The properties still work in supported browsers, they just display an error in the Customizer. Some valid values for properties that are recognized also give errors, such as the values of start and end for several grid properties.

Attachments (6)

Screenshot 2018-04-27 10.48.54.png (5.9 KB) - added by davidjlaietta 8 years ago.
screenshot of Customizer Edit CSS showing an unknown property
Screenshot 2018-04-27 10.49.10.png (7.1 KB) - added by davidjlaietta 8 years ago.
screenshot of Customizer Edit CSS showing the suggestion of an unknown property
43896.diff (563 bytes) - added by subrataemfluence 8 years ago.
Added property justify-items
editor-screenshot.png (4.3 KB) - added by subrataemfluence 8 years ago.
Warning disappeared
43896-1.diff (2.3 KB) - added by subrataemfluence 8 years ago.
43896-2.diff (2.3 KB) - added by subrataemfluence 8 years ago.

Download all attachments as: .zip

Change History (18)

@davidjlaietta
8 years ago

screenshot of Customizer Edit CSS showing an unknown property

@davidjlaietta
8 years ago

screenshot of Customizer Edit CSS showing the suggestion of an unknown property

@subrataemfluence
8 years ago

Added property justify-items

#1 @subrataemfluence
8 years ago

  • Keywords has-patch added

@subrataemfluence
8 years ago

Warning disappeared

#2 follow-up: @westonruter
8 years ago

@subrataemfluence Your patch doesn't indicate which file it is that is being patched.

#3 in reply to: ↑ 2 @subrataemfluence
8 years ago

Oops! I am sorry for this. It's almost midnight here. Will fix the patch tomorrow morning.

Replying to westonruter:

@subrataemfluence Your patch doesn't indicate which file it is that is being patched.

#4 @subrataemfluence
8 years ago

@westonruter I modified initial patch and uploaded 43896-1.diff. In this patch I considered all properties @davidjlaietta mentioned.

However, this one has some unwanted white spaces and tabs characters, which I realized only after uploading. So, I removed them and uploaded a newer version 43896-2.diff. Hope this works!

#5 @pento
7 years ago

  • Version trunk deleted

#6 @celloexpressions
5 years ago

  • Focuses css added
  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to Future Release
  • Version set to 4.9

This appears to be the same general issue as described in #43197. The fix here is likely a good approach for that ticket as well.

Can those actively working on the latest innovations in CSS please review 43896-2.diff and confirm any other properties that should be added to the core list?

#7 follow-up: @SirLouen
10 months ago

  • Keywords needs-testing removed
  • Resolution set to wontfix
  • Status changed from new to closed
  • Type changed from defect (bug) to enhancement

This is not a bug, this is an enhancement to the Customizer CSS editor
Customizer is in maintenance mode. Don't use this CSS editor anymore if possible. If you are encountering a problem not being able to showcase certain elements in the customizer, please move away from it and use any of the other methods to add CSS to your WP.

Time to close this report as this wontfix

#8 in reply to: ↑ 7 @sabernhardt
10 months ago

  • Milestone Future Release deleted
  • Resolution changed from wontfix to worksforme
  • Type changed from enhancement to defect (bug)

@SirLouen The Customizer is still a very important part of 'classic' themes, and people should use the Additional CSS panel for custom styles if they do not create their own stylesheet (in a child theme or plugin).

The proposal recommending a 'maintenance' mode is not even published yet, and that should only limit how much will be improved in Customize and similar Core Trac components.

This ticket reported a bug that existed years ago, but I do not experience any errors now with the mentioned properties. It seems to have been fixed in WordPress 5.4.

#9 follow-up: @westonruter
10 months ago

This isn't actually an issue in the Customizer per se but rather in anywhere that core uses the Code Mirror library for editing.

That said, I'm not seeing justify-items: space-between; causing any issue in either the Additional CSS of the Customizer or in the Theme File Editor when editing style.css. So the underlying issue seems to have been resolved.

#10 @sabernhardt
10 months ago

[47305] removed the CSS linting.

#11 in reply to: ↑ 9 @SirLouen
10 months ago

  • Component changed from Customize to Cache API

Replying to westonruter:

This isn't actually an issue in the Customizer per se but rather in anywhere that core uses the Code Mirror library for editing.

True, I completely forgot that Code Mirror is also in any other code editor like themes and plugins.
After wasting a good time on #47692 for nothing, I was on autopilot on anything Customize.
I am not sure why most Code Mirror issues have been associated to Component Customize (i.e. #44820)
Wondering if there is a better component selection for this.

#12 @SirLouen
10 months ago

  • Component changed from Cache API to General
Note: See TracTickets for help on using tickets.