Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34147 closed defect (bug) (invalid)

_custom_background_cb() prints background-position in wrong order

Reported by: swedish-boy's profile swedish boy Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Customize Keywords: reporter-feedback
Focuses: Cc:

Description

Even though browser are smart and can take css values (top, left, right) in any order x should come before y for browser compatibility.

https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/theme.php#L1277

row 1275-1277 says:

              if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )
                   $position = 'left';
              $position = " background-position: top $position;";

Change History (4)

#1 @swissspidy
9 years ago

  • Keywords reporter-feedback added

According to the spec the order isn't relevant.

Note that a pair of keywords can be reordered while a combination of keyword and length or percentage cannot. So ‘center left’ is valid while ‘50% left’ is not.

x should come before y for browser compatibility

Can you elaborate on which browsers don't understand this?

#2 @SergeyBiryukov
9 years ago

  • Component changed from Themes to Customize

#3 @swissspidy
9 years ago

  • Keywords close added

#4 @swissspidy
9 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.