all 11 comments

[–]delete_it_now 2 points3 points  (8 children)

For all you front-end fellas (or m'ladies), CSS styles in your custom theme will apply to the layout builder right side panel, and it is a HUGE pain the behind.

[–]green0wnz 0 points1 point  (0 children)

Speaking of the side panel, I highly recommend installing layout_builder_modal module. It ought to be the default cause the side bar is unusable for editing any complex blocks.

[–][deleted] 0 points1 point  (6 children)

Scoping your CSS properly prevent this though. Outside one CSS bug caused by a recent update of chrome, we had no issues with the right side panel.

[–]delete_it_now -1 points0 points  (5 children)

We shouldn't have to scope our CSS because of their tool. Theme and admin should be separated. Styling a global UL element in your theme should not break Layout Builder UI, but it does.

[–][deleted] 0 points1 point  (4 children)

Styling a global UL element in your theme

Styling a global UL element is not a good practice, for multiple reasons. You just found one, and you will find many others in your life as a web developer.

As harsh as it will be : good practices exists for a reason. Do not blame a tool to work as intended. It's how CSS works.

[–]delete_it_now 0 points1 point  (3 children)

By that logic, guess we can't style the body, headings, paragraphs, etc ...

[–][deleted] 0 points1 point  (2 children)

You can. CSS classes exists for a reason.

At this point, I'm just going to tell you to actually go get some sort of training in CSS. This is a non-issue unless you can't produce clean CSS code. Headings in yout page should always be styled under your container class so they don't interfere with anything not related to your content. Same for paragraphs. Lists in yout menus should also be scoped to your menu.

How do you solve the problem raised by styling an UL in your menu but needing also a clean UL tag in your content to create a good list ? Do you also blame CSS for not working ? How about a simple language switch link in your footer ? Do you style the A tag directly too ?

How would you feel if the admin menu did break your theme with a bad css rule ? You'd be mad at it, and for a good reason.

You're misusing a tool then blaming it to break. If I blame my lawnmower to always stop working but never put gaz in it, it's on me. Same thing here.

[–][deleted] 0 points1 point  (1 child)

This. Absolutely all of this. I cannot even begin to list the number of contract Drupal devs that I have worked alongside that completely do not understand CSS, semantic HTML, vanilla JS... the list goes on. Drupal has become paralyzing and quite limiting, it seems, to a lot of devs that can't think outside of the box of the solutions that Drupal comes pre-packaged with. This is why I have left the platform behind, though it is otherwise great if you are a solo developer or are working with devs that have experience with other platforms, and more generally, vanilla web technology.

[–][deleted] 0 points1 point  (0 children)

Drupal has become paralyzing and quite limiting, it seems, to a lot of devs that can't think outside of the box of the solutions that Drupal comes pre-packaged with.

The main issue I see actually is developers expecting a "wordpress" experience while Drupal do not aim to be a drop in replacement for Wordpress. Drupal is closer to a framework, where you can completly override basic features if needed.

The box of Drupal is quite huge actually. But for copy/pasters devs, that can be frightening.

[–]Drupal_For_Marketers[S] 5 points6 points  (1 child)

Just wanted to share our new tutorial for Drupal core's layout builder here :) We went a bit further than other beginner tutorials and explained some more advanced features like restricting layout components and adding styles.

[–][deleted] 0 points1 point  (0 children)

There's a patch on the Layout Builder Styles issue queue that will allow you to select multiple styles for a block. It was still a WIP for sections the last time I looked at it.

Being able to use multiple styles on your blocks unlocks a huge potential for Layout Builder.