WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 6 months ago

Last modified 4 months ago

#47569 closed enhancement (fixed)

Remove unnecessary !important from wp-admin/css/common.css

Reported by: foack Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit
Focuses: ui, administration Cc:

Description

There are 21 !important statements in common.css, that sometimes simply overwrite CSS changes made in JS, overwrite other !important statements in the same file or other files. Overall, it doesn't help with clarity :)

Attachments (7)

common.css (69.0 KB) - added by foack 18 months ago.
47569.diff (12.3 KB) - added by foack 18 months ago.
updated version of postbox.js
47569-postbox.js.diff (12.2 KB) - added by foack 18 months ago.
Updated postbox.js
47569-2.diff (2.2 KB) - added by foack 18 months ago.
Updated common.css
47569-3.diff (2.8 KB) - added by foack 18 months ago.
Updated common-rtl.css
47569-postbox.js.2.diff (428 bytes) - added by foack 18 months ago.
postbox.js without formatting changes.
47569.4.diff (2.9 KB) - added by audrasjb 6 months ago.
Administration: Remove unnecessary !important CSS rules from common.css

Download all attachments as: .zip

Change History (24)

@foack
18 months ago

@foack
18 months ago

updated version of postbox.js

#1 in reply to: ↑ description @foack
18 months ago

Replying to foack:

There are 21 !important statements in common.css, that sometimes simply overwrite CSS changes made in JS, overwrite other !important statements in the same file or other files. Overall, it doesn't help with clarity :)

Please ignore the uploaded common.css and 47569.diff - those are here forever but don't actually contribute to clarity and do not move the ticket further.

#2 @foack
18 months ago

Updated postbox.js and the statement that added overflow:hidden to #wpbody-content, so that the !important statement on overflow:visible in common.css line 29 can be removed.

@foack
18 months ago

Updated postbox.js

@foack
18 months ago

Updated common.css

@foack
18 months ago

Updated common-rtl.css

#3 @foack
18 months ago

  • Keywords has-patch needs-testing needs-design-feedback added; needs-patch removed
  • Type changed from defect (bug) to enhancement

#4 @SergeyBiryukov
18 months ago

  • Component changed from General to Administration

#6 @SergeyBiryukov
18 months ago

  • Keywords needs-refresh added

Hi @foack, welcome to WordPress Trac! Thanks for the ticket and the patches.

Could you upload a version of 47569-postbox.js.diff without the formatting changes? It's hard to see what's actually changed there.

@foack
18 months ago

postbox.js without formatting changes.

#7 @foack
18 months ago

Sure thing @SergeyBiryukov, sorry that I forgot to disable my auto-formatting the first time. WCEU was too exciting :)

Let me know if the new diff helps to clarify!

#8 @SergeyBiryukov
18 months ago

  • Keywords needs-refresh removed
  • Milestone changed from Awaiting Review to 5.3
  • Owner changed from foack to SergeyBiryukov
  • Status changed from assigned to reviewing

#9 @davidbaumwald
15 months ago

@SergeyBiryukov Can this be included in time for 5.3 Beta 1 today?

#10 @davidbaumwald
15 months ago

  • Milestone changed from 5.3 to Future Release

The deadline for features and enhancements for version 5.3 Beta 1 has now passed. Moving this to Future Release.

#11 @sabernhardt
11 months ago

These styles are at the beginning of this list from WP 5.3.2 core:
https://docs.google.com/spreadsheets/d/1WCuUXfm_WSx7wYFlZ3h8_yLaLxoganyBcPys0TKfoRY/edit?usp=sharing

Column D gives any explanatory notes that are already in each file. If you have something to add to columns E through G, you can use comments within the spreadsheet.

#12 @isabel_brison
9 months ago

  • Keywords commit added; needs-testing needs-design-feedback removed

I have tested these changes by applying the patches locally and going through all the screens in wp-admin at different screen widths and in RTL mode. I also tested the classic editor view. Nothing is breaking, in fact, nothing is changing at all :)

This ticket was mentioned in Slack in #core-css by isabelbrison. View the logs.


9 months ago

#14 @SergeyBiryukov
9 months ago

  • Milestone changed from Future Release to 5.5

@audrasjb
6 months ago

Administration: Remove unnecessary !important CSS rules from common.css

#15 @audrasjb
6 months ago

In 47569.4.diff, I put together a patch using the previous proposals.

#16 @whyisjake
6 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 48129:

Administration: Remove unnecessary !important CSS rules from common.css

Fixes #47569.

Props foack, SergeyBiryukov, davidbaumwald, sabernhardt, isabel_brison, audrasjb.

This ticket was mentioned in Slack in #core by sergey. View the logs.


4 months ago

Note: See TracTickets for help on using tickets.