Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46786 closed defect (bug) (fixed)

Twenty Twelve: Background gradient argument

Reported by: man4toman's profile man4toman Owned by: sergeybiryukov's profile 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 5 years ago.
46786.1.diff (5.6 KB) - added by ianbelanger 5 years ago.
Changes gradient direction in linear-gradient

Download all attachments as: .zip

Change History (6)

5 years ago

#1 @ianbelanger
5 years 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
5 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.

5 years ago

Changes gradient direction in linear-gradient

#3 @ianbelanger
5 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
5 years 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.