themes icon indicating copy to clipboard operation
themes copied to clipboard

[Container] Container in Container broken

Open jd-carroll opened this issue 1 year ago • 1 comments

The following code snippet does not work:

<Container size="3">
  <Container size="2">
    My constrained content
  </Container>
</Container>

The result is that the parent container's size overrides the child:

Duplicate #591

jd-carroll avatar Oct 04 '24 17:10 jd-carroll

I know a lot of care has been made to ensure the specificity is (0, 1, 0) everywhere, but is this an exception to that?

If it is not, and I suspect not, then I think it would make sense to move the sizing class from rt-Container to rt-ContainerInner. This is the only place in the code base where rt-r-size is used in a "compound" (?) selector statement.

Every other use looks like:

.rt-BaseTabList {
  &:where(.rt-r-size-1) {
    font-size: var(--font-size-1);
  }
}

jd-carroll avatar Oct 04 '24 17:10 jd-carroll