Skip Navigation

[Remonté au deuxième échelon] Toolset hijacks width of editor on non Toolset blocks

This support ticket is created Il y a 4 années et 6 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Marqué : 

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Nigel Il y a 4 années et 6 mois.

Assisté par: Nigel.

Auteur
Publications
#1635651
toolset1.png

In my custom theme to get the backend looking as close to the front end as I can I always add the WP block editor widths to support the built in wide/normal/full alignments. See https://developer.wordpress.org/block-editor/developers/themes/theme-support/ the section "Changing the width of the editor #"

.wp-block {
max-width: 720px;
}

/* Width of "wide" blocks */
.wp-block[data-align="wide"] {
max-width: 1080px;
}

/* Width of "full-wide" blocks */
.wp-block[data-align="full"] {
max-width: none;
}

When Toolset is de-activated this works fine, however with toolset active a VERY aggressively specific inline style is applied inline using Important (see image) with some very specific overides I could get this to not affect non toolset blocks for the standard width however the wide alignment then becomes almost impossible.

Toolset should NOT affect Gutenberg pages/editor sections that have no toolset blocks in them, please look into triggering these width overides only on toolset block as it currently breaks the Gutenberg layout of my themes completely.

#1635665

after a ton of playing around these are the overides I have to add to my theme to get the standard alignments working, I don't see any negative affects taking place on toolset blocks, however installing toolset really needs to not break the WP standard for the theme setting, because I'm not sure in I would have broke any toolset items with this setup.

/* Width of "standard" blocks */
body .wp-block[data-type^="toolset"]:not([data-align^="full"]), body div:not([class]) > .block-editor-block-list__layout > .wp-block:not([data-align^="full"]), body .tb-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block:not([data-align^="full"]) {
	max-width: $wrapper-width-base !important;
}

/* Width of "wide" blocks */
body div:not([class]) > .block-editor-block-list__layout > .wp-block[data-align*="wide"]:not([data-align^="full"])
{
	max-width: $wrapper-width-wide !important;
}
#1635689

One last note, even with the edit above I can not show a wide alignment when it's nested inside a toolset container block.

#1636929

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi Nicholas

I just tested this and confirm the same.

I've escalated it so it can be reported to the devs, and I'll get back to you when I have some feedback to share.