WordPress.org

Make WordPress Core

Opened 18 months ago

Closed 18 months ago

Last modified 18 months ago

#22197 closed task (blessed) (fixed)

Consolidate buttons CSS into a single file

Reported by: koopersmith Owned by: koopersmith
Milestone: 3.5 Priority: normal
Severity: normal Version: 3.5
Component: UI Keywords:
Focuses: Cc:

Description

The button updates added in #21598 have made the code quite modular, but it is currently split between wp-admin.css and the two colors files (which have identical copies of the bulk of the buttons CSS). This is not particularly maintainable, and makes it impossible to use the buttons outside the context of the admin.

Given our plans for #21813, we'll need to reuse this CSS inside TinyMCE, and redeclaring the same code for the third time just seems silly.

Change History (3)

comment:1 koopersmith18 months ago

  • Owner set to koopersmith
  • Resolution set to fixed
  • Status changed from new to closed

In [22236]:

Consolidate buttons CSS into a single file.

Adds wp-includes/css/buttons.css to consolidate buttons files and make them available in a modular fashion. Buttons are included automatically with the colors styles, and can be included independently by running:

wp_enqueue_style('buttons');

fixes #22197, see #21598.

comment:2 koopersmith18 months ago

In [22239]:

Revise and combine button selectors.

  • Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
  • Adds buttons documentation.
  • Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
  • Moves basic button color standardization to the beginning of wp-admin.

see #21598, #22197.

comment:3 ocean9018 months ago

Can we please remove the -ms- prefixed gradients?

Note: See TracTickets for help on using tickets.