diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2993fddb5..60d7cefab 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -91,13 +91,13 @@ module.exports = { title: 'Modules', collapsable: false, children: [ - ['/modules/Assets', 'Assets'], - ['/modules/Blocks', 'Blocks'], - ['/modules/Commands', 'Commands'], ['/modules/Components', 'Components'], ['/modules/Components-js', 'Components & JS'], - ['/modules/I18n', 'I18n'], ['/modules/Traits', 'Traits'], + ['/modules/Blocks', 'Blocks'], + ['/modules/Assets', 'Assets'], + ['/modules/Commands', 'Commands'], + ['/modules/I18n', 'I18n'], ['/modules/Style-manager', 'Style Manager'], ['/modules/Storage', 'Storage Manager'], ['/modules/Modal', 'Modal'], diff --git a/docs/modules/Blocks.md b/docs/modules/Blocks.md index 5f2710856..4a75879bf 100644 --- a/docs/modules/Blocks.md +++ b/docs/modules/Blocks.md @@ -225,20 +225,71 @@ Don't put non serializable properties, like functions, in your blocks, keep them This will work, but if you try to save and reload a stored project, those will disappear. ### Avoid styles -Don't put styles in your blocks, keep them in your components. +Don't put styles in your blocks, keep them always in your components. ```js // Your block { content: [ + // BAD: You risk to create conflicting styles { 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. `