WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 17 months ago

#36527 new enhancement

Add a 'wp-' prefix to ALL admin classes to prevent CSS conflicts

Reported by: mrpritchett Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: ui Cc:

Description

Long story short, in any front end editors, which WP itself seems to be moving towards with the Customizer, there are lots of admin elements that are not prefixed and can quickly begin to conflict. Some examples are .button, .textarea, etc. I'd love to see all admin classes add a prefix of .wp-

Change History (3)

#1 @mrpritchett
4 years ago

  • Component changed from General to Customize
  • Focuses accessibility added

#2 @justinbusa
4 years ago

I agree that it would be nice for something to be done here.

While any kind of front-end editing experience has to wrestle with the challenges of trying not to take on theme styles, a good first step would be getting the WordPress editor to style properly across the board on the front-end.

I'd be happy to submit a patch if prefixing the classes is an acceptable solution.

#3 @afercia
4 years ago

  • Component changed from Customize to Administration
  • Focuses accessibility administration removed
  • Milestone changed from Awaiting Review to Future Release
  • Version trunk deleted

Definitely something I'd love to see too, but there are also big, big, backwards compatibility concerns. For sure, for the sanity of the project, something should be done sooner or later :) See for example this make core post:
https://make.wordpress.org/core/2014/12/19/core-css-roadmap/
"Decide on CSS naming conventions"

Setting the component to administration since "Customize" is specific for the Customizer. Also, the version should be set to the version the bug/feature was first introduced which in this case is... I don't know :) Lastly, removing the accessibility focus since it's not strictly related to accessibility.

Note: See TracTickets for help on using tickets.