Currently, if you try to nest a Container component with a smaller size than a Container component that wraps it at any level, the size does not correctly take effect. It always uses the largest size of any wrapping Container component due to CSS specificity.
This PR resolves this by applying the CSS for the sizing specifically to .rt-ContainerInner that are a direct descendent of the .rt-Container.
Testing steps
Use the following JSX and check the correct widths are applied in browser.
<Container size="4">
<Text>This should be size 4</Text>
<Container size="1">
<Text>This should be size 1</Text>
</Container>
</Container>
Alternatively, review the new Container samples in the "sink" demo example page.
Description
Currently, if you try to nest a
Container
component with a smallersize
than aContainer
component that wraps it at any level, thesize
does not correctly take effect. It always uses the largestsize
of any wrappingContainer
component due to CSS specificity.This PR resolves this by applying the CSS for the sizing specifically to
.rt-ContainerInner
that are a direct descendent of the.rt-Container
.Testing steps
Use the following JSX and check the correct widths are applied in browser.
Alternatively, review the new Container samples in the "sink" demo example page.
Related issues / PRs
N/A