WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#18380 closed enhancement (fixed)

Merge the default colors css into wp-admin.css

Reported by: azaozz Owned by: helen
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Administration Keywords:
Focuses: ui, performance Cc:

Description

As the title.

Attachments (7)

18380.diff (2.6 KB) - added by jorbin 4 years ago.
18380.2.diff (10.7 KB) - added by jorbin 4 years ago.
18380.3.diff (13.7 KB) - added by helen 4 years ago.
18380.4.diff (32.4 KB) - added by helen 4 years ago.
18380.5.diff (98.8 KB) - added by helen 4 years ago.
18380.6.diff (98.8 KB) - added by helen 4 years ago.
18380.patch (568 bytes) - added by ocean90 4 years ago.

Download all attachments as: .zip

Change History (25)

#1 @ryan
6 years ago

  • Milestone changed from 3.3 to Future Release

#2 @ryan
6 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Actually, wontfix until we are committed to this direction.

#3 follow-up: @koopersmith
6 years ago

In IRC, Jane suggested making gray the only color scheme and moving any other color scheme (blue, and potentially a high-contrast color scheme) into a plugin integrated into the UI. I heartily support that suggestion.

#4 in reply to: ↑ 3 @DrewAPicture
6 years ago

Replying to koopersmith:

In IRC, Jane suggested making gray the only color scheme and moving any other color scheme (blue, and potentially a high-contrast color scheme) into a plugin integrated into the UI. I heartily support that suggestion.

+1

#5 @helen
4 years ago

#24806 was marked as a duplicate.

@jorbin
4 years ago

#6 @jorbin
4 years ago

The above patch removes colors.css from being loaded, but only when we are using the default color scheme. I also started on integrating colors.css into wp-admin.css

#7 @helen
4 years ago

  • Focuses ui performance added
  • Milestone set to 3.9
  • Resolution wontfix deleted
  • Status changed from closed to reopened

We're committed to this direction now. It was discussed in IRC, though I am not having luck finding the exact link (my own fault for not doing this earlier). Would be thankful to anybody who can dig it up - it was within the last couple of weeks.

The redesign of 3.8 makes this a much better idea. The default colors.css is @import-ed into each of the alternate color schemes. When using unminified files, this means an extra HTTP request, and a slow one at that. When using minified files, cssmin/clean-css actually inlines the entire file into every single color scheme's colors.css. This makes avoiding a rebuild in point releases very difficult, and now that it is a true overload as opposed to a swap, makes much more sense to merge into the main wp-admin.css file.

Other benefits include:

  • A lower barrier to entry for first-time admin CSS patches. It is less than fun to edit a border width and style in one file, and the color in another.
  • We will likely reduce file size due to being able to use more shorthand properties. At worst, the size will remain about the same, but there will be no more colors.css to add to that.

There is an _admin.scss file that has to be maintained, and of course consideration for each of the color schemes. However, _admin.scss is already quite diverged from colors.css, so it would be a hand-maintained file from this point forward, anyway.

Once this is complete, we will tackle #26669.

@jorbin
4 years ago

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


4 years ago

@helen
4 years ago

@helen
4 years ago

#9 @helen
4 years ago

  • Summary changed from Merge the default colors css into wp-admin.css and overload the blue theme colors to Merge the default colors css into wp-admin.css

Been dumping a diff of work at stopping points onto the ticket, for the curious - this is a lot of heartache.

@helen
4 years ago

@helen
4 years ago

#10 @helen
4 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from reopened to closed

In 27106:

Merge colors.css into wp-admin.css. Non-default color schemes became overloads rather than swaps in the 3.8 redesign. Benefits include:

  • No more border-width, border-style, border-color insanity.
  • Point releases are much less likely to require extra finagling to avoid rebuilding the color schemes.
  • Yours truly has a better overall vision of ~14,000 lines of admin CSS and where we go from here.

1,065 net lines of red, y'all.
props helen, jorbin. fixes #18380.

#11 @helen
4 years ago

In 27107:

Some tweaks to [27106]:

  • Add more @todo markings and remove one that's been resolved.
  • Restore a missing comma in a .wp-badge background rule, and add a comment reminding us why it's there.

see #18380.

@ocean90
4 years ago

#12 @ocean90
4 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This needs a change in register_admin_color_schemes(), see 18380.patch. Otherwise you get a 404 for colors.css.

Not yet tested in build.

#13 @helen
4 years ago

In 27109:

Fix some hover/focus styling and specificity issues. see #18380.

#14 @nacin
4 years ago

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

In 27111:

Fix the conditional enqueueing/printing of colors stylesheets, without breaking dependencies.

fixes #18380.
see #20729 which should properly fix this.

#15 @helen
4 years ago

In 27772:

Make sure inputs in Press This have a type so they are styled appropriately. see #18380.

#16 @helen
4 years ago

In 27832:

Correct cascade issues and remove some unused CSS for the admin menu. see #18380.

#17 @helen
4 years ago

In 27852:

Restore some CSS rules that are necessary for non-default schemes. see #18380.

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


4 years ago

Note: See TracTickets for help on using tickets.