I’m not sure, but it could be that the second wrapper doesn’t get the values of the global class and the height value is placed in the section instead.
You need to target the inner wrapper with Relative Styling when using a global class, since there is no direct block access to the inner wrapper.
The section block has its own logic, so it applies some styles (e.g. height, background) to the parent and the rest to the child container when applying them via block class.
Glad it worked out for you @T-low, thanks for letting me know!
For the Relative Styling combinator, I suggested you to use the child one instead of the descendant one to target explicitly (and only) the sections’ inner wrapper and not any nested div inside the section.
Another solution would be to simple target the . .cc-wrapper class.
Instead of type, just use class as a Relative Styling type.
When targeting the inner wrappers’ class, you can consider to revert back to the descendent Relative Styling combinator (unless you plan to place sections inside sections, which hopefully isn’t the case).
Custom CSS only makes sense if you want to explicitly use it or if the required CSS property is not available inside the block inspector’s Relative Styling panel, which very rarely is the case.
In this case, you want to use .globalclass .cc-wrapper, not only .cc-wrapper.
The .globalclass selector automatically translates to your actual global class’ name (.my-section-class). So in case you decide to change the global class’ name at some point, you don’t have to modify the custom CSS.
Let me know in any case if you need further guidance.
Thank you for the clarification @Marius, I really appreciate the help.
No, I don’t plan to fabricate a sectionception …
Nightmare potential... open at own risk!
Is there any benefit in using the descendant combinator for this case?
Update in case CSS would be used:
I will stick with Relative Styling. I would be interested to know which method you would prefer for this case and why. The Relative Styling Type by class or by type?
I think that’s up to you for which combinator you decide for.
It’s rather a thing of general thinking/approach which should always consider/include all possible circumstances.
My personal preference would be the descendant combinator and class name: .globalclass .cc-wrapper
Targeting an HTML tag can make sense, but imo not in this situation.
But if you decide to do so (which would be totally fine), it is required to set child as the combinator.