Make WordPress Core

Ticket #57667: 57667.2.diff

File 57667.2.diff, 1.7 KB (added by dhrupo, 15 months ago)
  • packages/block-library/src/separator/save.js

    From 95ebe39adab7f97cb1c68114a814eec1a3b70245 Mon Sep 17 00:00:00 2001
    From: Dhrupo Nil <dhrupo@gmail.com>
    Date: Fri, 17 Feb 2023 17:53:11 +0600
    Subject: [PATCH] check for all style classname and assign css using the class
    
    ---
     packages/block-library/src/separator/save.js    | 6 ++++++
     packages/block-library/src/separator/style.scss | 8 ++++++++
     2 files changed, 14 insertions(+)
    
    diff --git a/packages/block-library/src/separator/save.js b/packages/block-library/src/separator/save.js
    index 55a67c980c..a6fe7e64ec 100644
    a b export default function separatorSave( { attributes } ) { 
    2929                        [ colorClass ]: colorClass,
    3030                        'has-css-opacity': opacity === 'css',
    3131                        'has-alpha-channel-opacity': opacity === 'alpha-channel',
     32                        'is-style-default':
     33                                ( ! attributes.hasOwnProperty( 'className' ) ||
     34                                        attributes.className === 'is-style-default' ) &&
     35                                'is-style-default',
     36                        'is-style-wide': attributes.className === 'is-style-wide',
     37                        'is-style-dots': attributes.className === 'is-style-dots',
    3238                },
    3339                colorProps.className
    3440        );
  • packages/block-library/src/separator/style.scss

    diff --git a/packages/block-library/src/separator/style.scss b/packages/block-library/src/separator/style.scss
    index e7965c8efe..7d86187eb0 100644
    a b  
    77        border-left: none;
    88        border-right: none;
    99
     10        &.is-style-default {
     11                width: 200px;
     12        }
     13
     14        &.is-style-wide {
     15                width: 100%;
     16        }
     17
    1018        // Dots style
    1119        &.is-style-dots {
    1220                // Override any background themes often set on the hr tag for this style.