Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#46786 closed defect (bug) (fixed)

Twenty Twelve: Background gradient argument

Reported by: man4toman Owned by: SergeyBiryukov
Priority: normal Milestone: 5.2
Component: Bundled Theme Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

The first argument of the linear-gradient should be 'to top', not 'top'.

Attachments (2)

46786.patch​ (5.6 KB ) - added by man4toman 8 years ago.
46786.1.diff​ (5.6 KB ) - added by ianbelanger 8 years ago.
Changes gradient direction in linear-gradient

Download all attachments as: .zip

Change History (6)

@man4toman
8 years ago

#1 @ianbelanger
8 years ago

  • Keywords commit added
  • Milestone Awaiting Review → 5.2
  • Version trunk

Thanks @man4toman,

The patch seems to address all linear-gradient rules in the CSS. I am marking this for commit.

BTW, the Version tag is for the version in which this issue was introduced, not for the version tested against.

Related #46770

#2 @joyously
8 years ago

  • Keywords commit removed

The patch doesn't actually fix the problem, because this ticket was just written for syntax. The real problem is that the old syntax goes the other direction from the new syntax.
For example,
-webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
will start at top with #f4f4f4 and go down to #e6e6e6. But
linear-gradient(to top, #f4f4f4, #e6e6e6);
will start at bottom with #f4f4f4 and go to top to #e6e6e6.

@ianbelanger
8 years ago

Changes gradient direction in linear-gradient

#3 @ianbelanger
8 years ago

  • Keywords commit added

Thanks for pointing that out @joyously, my updated patch changes the direction of the gradient to to bottom in linear-gradient

#4 @SergeyBiryukov
8 years ago

  • Owner set to SergeyBiryukov
  • Resolution → fixed
  • Status new → closed

In 45124:

Twenty Twelve: Correct linear-gradient direction argument syntax.

In CSS, the linear-gradient function requires that the direction value explicitly use to instead of an implicit from.

Props: ianbelanger, joyously, man4toman.
Fixes #46786.

Note: See TracTickets for help on using tickets.