Make WordPress Core

#46786 closed defect (bug) (fixed)

Twenty Twelve: Background gradient argument

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


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

Attachments (2)

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

Download all attachments as: .zip

Change History (6)

18 months ago

#1 @ianbelanger
18 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 5.2
  • Version trunk deleted

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
18 months 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.

18 months ago

Changes gradient direction in linear-gradient

#3 @ianbelanger
18 months 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
18 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to 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.