Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider not adding the wrapper to all blocks by default #105

Open
sneridagh opened this issue Nov 7, 2024 · 0 comments
Open

Consider not adding the wrapper to all blocks by default #105

sneridagh opened this issue Nov 7, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@sneridagh
Copy link

sneridagh commented Nov 7, 2024

Volto 18 (and 17) already have the core stylewrapper which lead to have duplicated wrappers, with the same classnames:

image

This could lead to conflictive CSS declarations because of the nested stylewrapper in blocks that really don't use this add-on.

We had in fact, this situation:
We installed @eeacms/volto-tabs-block, inadvertently it installed @eeacms/volto-block-style.
Then all our blocks had all of a sudden an extra stylewrapper coming apparently "from nowhere".

I know, it's on the README in bold, but still I won't have expected that this will happen. I'd expect that it only applies to the blocks that use it.

The workaround is to use the pluggableStylesBlocksWhitelist or pluggableStylesBlocksBlacklist to specify the blocks that we want to mark, but it's not documented in the README. However, this has a drawback in itself, if you use the new setup, since if you are using the addons of your policy package, the setting is being applied afterwards @eeacms/volto-block-style config kicks-in. The workaround is to specify the addon in volto.config.js instead, but it's kind of cumbersome and not portable anymore...

const addons = ['volto-my-policy-addon', '@eeacms/volto-tabs-block'];
const theme = '@kitconcept/volto-light-theme';

module.exports = {
  addons,
  theme,
};
@ichim-david ichim-david added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants