Make WordPress Core

Ticket #49757: 49757.patch

File 49757.patch, 3.4 KB (added by tomjdevisser, 2 years ago)

Added theme support and four gradients

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

    diff --git a/src/wp-content/themes/twentysixteen/css/editor-style.css b/src/wp-content/themes/twentysixteen/css/editor-style.css
    index e1b3445e86..72a999140d 100644
    a b body.post-type-page { 
    3737        max-width: 840px;
    3838}
    3939
     40/* Custom gradient block backgrounds */
     41.has-wordpress-blue-gradient-background {
     42        background: linear-gradient(135deg,rgba(23,79,193,1.0) 0%,rgba(99,159,255,1.0) 100%);
     43}
     44.has-wordpress-light-blue-gradient-background {
     45        background: linear-gradient(135deg,rgba(107,145,224,1.0) 0%,rgba(181,205,245,1.0) 100%);
     46}
     47.has-light-sky-gradient-background {
     48        background: linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%);
     49}
     50.has-dark-sky-gradient-background {
     51        background: linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%);
     52}
    4053
    4154/**
    4255 * 2.0 - Typography
  • src/wp-content/themes/twentysixteen/functions.php

    diff --git a/src/wp-content/themes/twentysixteen/functions.php b/src/wp-content/themes/twentysixteen/functions.php
    index b5b7c207a9..927a50e06a 100644
    a b if ( ! function_exists( 'twentysixteen_setup' ) ) : 
    214214                        )
    215215                );
    216216
     217                // Add support for block gradient colors.
     218                add_theme_support(
     219                        'editor-gradient-presets',
     220                        array(
     221                                array(
     222                                        'name'          =>      __( 'WordPress Blue', 'twentysixteen' ),
     223                                        'gradient'      =>      'linear-gradient(135deg,rgba(23,79,193,1.0) 0%,rgba(99,159,255,1.0) 100%)',
     224                                        'slug'          =>      'wordpress-blue'
     225                                ),
     226                                array(
     227                                        'name'          =>      __( 'WordPress Light Blue', 'twentysixteen' ),
     228                                        'gradient'      =>      'linear-gradient(135deg,rgba(107,145,224,1.0) 0%,rgba(181,205,245,1.0) 100%)',
     229                                        'slug'          =>      'wordpress-light-blue'
     230                                ),
     231                                array(
     232                                        'name'          =>      __( 'Light Sky', 'twentysixteen' ),
     233                                        'gradient'      =>      'linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%)',
     234                                        'slug'          =>      'light-sky'
     235                                ),
     236                                array(
     237                                        'name'          =>      __( 'Dark Sky', 'twentysixteen' ),
     238                                        'gradient'      =>      'linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%)',
     239                                        'slug'          =>      'dark-sky'
     240                                ),
     241                        )
     242                );
     243
    217244                // Indicate widget sidebars can use selective refresh in the Customizer.
    218245                add_theme_support( 'customize-selective-refresh-widgets' );
    219246
  • src/wp-content/themes/twentysixteen/style.css

    diff --git a/src/wp-content/themes/twentysixteen/style.css b/src/wp-content/themes/twentysixteen/style.css
    index 137d30e4fd..8f875e8f8d 100644
    a b big { 
    449449 * 4.0 - Elements
    450450 */
    451451
     452 /* Custom gradient block backgrounds */
     453.has-wordpress-blue-gradient-background {
     454        background: linear-gradient(135deg,rgba(23,79,193,1.0) 0%,rgba(99,159,255,1.0) 100%);
     455}
     456.has-wordpress-light-blue-gradient-background {
     457        background: linear-gradient(135deg,rgba(107,145,224,1.0) 0%,rgba(181,205,245,1.0) 100%);
     458}
     459.has-light-sky-gradient-background {
     460        background: linear-gradient(135deg,rgba(228,228,228,1.0) 0%,rgba(208,225,252,1.0) 100%);
     461}
     462.has-dark-sky-gradient-background {
     463        background: linear-gradient(135deg,rgba(0,0,0,1.0) 0%,rgba(56,61,69,1.0) 100%);
     464}
     465
    452466html {
    453467        -webkit-box-sizing: border-box;
    454468        -moz-box-sizing: border-box;