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 } ) { |
29 | 29 | [ colorClass ]: colorClass, |
30 | 30 | 'has-css-opacity': opacity === 'css', |
31 | 31 | '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', |
32 | 38 | }, |
33 | 39 | colorProps.className |
34 | 40 | ); |
diff --git a/packages/block-library/src/separator/style.scss b/packages/block-library/src/separator/style.scss
index e7965c8efe..7d86187eb0 100644
a
|
b
|
|
7 | 7 | border-left: none; |
8 | 8 | border-right: none; |
9 | 9 | |
| 10 | &.is-style-default { |
| 11 | width: 200px; |
| 12 | } |
| 13 | |
| 14 | &.is-style-wide { |
| 15 | width: 100%; |
| 16 | } |
| 17 | |
10 | 18 | // Dots style |
11 | 19 | &.is-style-dots { |
12 | 20 | // Override any background themes often set on the hr tag for this style. |