From 7d9c20216e33da1372f09578e7fac97c44502d90 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Fri, 1 Oct 2021 14:24:33 +0200 Subject: [PATCH] Update Blocks doc --- docs/modules/Blocks.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/modules/Blocks.md b/docs/modules/Blocks.md index 95676b425..d72edd190 100644 --- a/docs/modules/Blocks.md +++ b/docs/modules/Blocks.md @@ -239,16 +239,15 @@ Don't put styles in your blocks, keep them always in your components. { type: 'my-cmp', styles: '.cmp { color: red }' }, { type: 'my-cmp', styles: '.cmp { color: green }' }, - // REALLY BAD: There is no safe way for the editor to know how to connect - // your styles and clean them, in case all related components are removed. - ` -
Element
+ // REALLY BAD: In case all related components are removed, + // there is no safe way for the editor to know how to connect + // and clean your styles. + `
Element
Element 2
- `, + `, ], } ``` @@ -256,7 +255,7 @@ Don't put styles in your blocks, keep them always in your components. With the component-oriented approach, you put yourself in a risk of conflicting styles and having a lot of useless redundant styles definitions in your project JSON. -With the HTML string, if you remove all related elements, the editor is not even able to clean those styles from the project JSON, as there is no safe way to connect them. +With the HTML string, if you remove all related elements, the editor is not able to clean those styles from the project JSON, as there is no safe way to connect them.