Make WordPress Core

Ticket #49762: 49762.patch

File 49762.patch, 3.2 KB (added by tomjdevisser, 3 years ago)

Added gradient theme support + 4 new gradients in the theme's style.

  • src/wp-content/themes/twentythirteen/css/editor-style.css

    diff --git a/src/wp-content/themes/twentythirteen/css/editor-style.css b/src/wp-content/themes/twentythirteen/css/editor-style.css
    index 568418992b..cd1693303e 100644
    a b body { 
    4040        vertical-align: baseline;
    4141}
    4242
     43/* Custom gradient block backgrounds */
     44.has-autumn-brown-gradient-background {
     45        background: linear-gradient(135deg, rgba(226,45,15,1) 0%, rgba(158,25,13,1) 100%);
     46}
     47.has-sunset-yellow-gradient-background {
     48        background: linear-gradient(135deg, rgba(233,139,41,1) 0%, rgba(238,179,95,1) 100%);
     49}
     50.has-light-sky-gradient-background {
     51        background: linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%);
     52}
     53.has-dark-sky-gradient-background {
     54        background: linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%);
     55}
     56
    4357
    4458/**
    4559 * 2.0 Headings
  • src/wp-content/themes/twentythirteen/functions.php

    diff --git a/src/wp-content/themes/twentythirteen/functions.php b/src/wp-content/themes/twentythirteen/functions.php
    index 16637775cf..cb020f6764 100644
    a b function twentythirteen_setup() { 
    151151                )
    152152        );
    153153
     154        // Add support for block gradient colors.
     155        add_theme_support(
     156                'editor-gradient-presets',
     157                array(
     158                        array(
     159                                'name'          =>      __( 'Autumn Brown', 'twentythirteen' ),
     160                                'gradient'      =>      'linear-gradient(135deg, rgba(226,45,15,1) 0%, rgba(158,25,13,1) 100%)',
     161                                'slug'          =>      'autumn-brown'
     162                        ),
     163                        array(
     164                                'name'          =>      __( 'Sunset Yellow', 'twentythirteen' ),
     165                                'gradient'      =>      'linear-gradient(135deg, rgba(233,139,41,1) 0%, rgba(238,179,95,1) 100%)',
     166                                'slug'          =>      'sunset-yellow'
     167                        ),
     168                        array(
     169                                'name'          =>      __( 'Light Sky', 'twentythirteen' ),
     170                                'gradient'      =>      'linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%)',
     171                                'slug'          =>      'light-sky'
     172                        ),
     173                        array(
     174                                'name'          =>      __( 'Dark Sky', 'twentythirteen' ),
     175                                'gradient'      =>      'linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%)',
     176                                'slug'          =>      'dark-sky'
     177                        ),
     178                )
     179        );
     180
    154181        // Adds RSS feed links to <head> for posts and comments.
    155182        add_theme_support( 'automatic-feed-links' );
    156183
  • src/wp-content/themes/twentythirteen/style.css

    diff --git a/src/wp-content/themes/twentythirteen/style.css b/src/wp-content/themes/twentythirteen/style.css
    index 79ddc2dd28..b40ef31730 100644
    a b hr { 
    464464        margin: 0 0 24px;
    465465}
    466466
     467/* Custom gradient block backgrounds */
     468.has-autumn-brown-gradient-background {
     469        background: linear-gradient(135deg, rgba(226,45,15,1) 0%, rgba(158,25,13,1) 100%);
     470}
     471.has-sunset-yellow-gradient-background {
     472        background: linear-gradient(135deg, rgba(233,139,41,1) 0%, rgba(238,179,95,1) 100%);
     473}
     474.has-light-sky-gradient-background {
     475        background: linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%);
     476}
     477.has-dark-sky-gradient-background {
     478        background: linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%);
     479}
     480
    467481
    468482/**
    469483 * 2.0 Repeatable Patterns