Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5.2]: Fields with 25% width are displayed with 50% width #16165

Closed
jakobhaerter opened this issue Nov 20, 2024 · 3 comments · Fixed by #16170
Closed

[5.5.2]: Fields with 25% width are displayed with 50% width #16165

jakobhaerter opened this issue Nov 20, 2024 · 3 comments · Fixed by #16170
Assignees
Labels

Comments

@jakobhaerter
Copy link

jakobhaerter commented Nov 20, 2024

What happened?

Description

Fields with 25% width get width: 50%, together with 50% fields – even with more than enough space available. I'm guessing there's something wrong with css specificity. This part in the CP CSS seems to be responsible:

#content :not(.meta) > .flex-fields,
#content > .flex-fields,
.draghelper.drag-in-content .flex-fields {
  & > :not(h2, hr, .line-break) {
    &,
    &:last-child {
      // 4 cols for >= 1536px
      @media only screen and (min-width: $minXlUiWidth) {
        &.width-25 {
          width: 25%;
        }

        &.width-50 {
          width: 50%;
        }

        &.width-75 {
          width: 75%;
        }
      }

      // 2 cols when container is > 720px
      @container (min-width: 45em) {
        &.width-25,
        &.width-50 {
          width: 50%;
        }
      }
    }
  }
}

Steps to reproduce

  1. Create a 75% field and a 25% field inside an entry type.
  2. See the 25% wrap into the second row as it gets width: 50%.

Expected behavior

Fields with 25% width should get width: 25% if space is available.

Actual behavior

Fields with 25% width get width: 50%.

Craft CMS version

5.5.2

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brianjhanson
Copy link
Contributor

Thanks for reporting! Looks like this was an unintended consequence of #16117. I've opened #16170 to address it.

@MoritzLost
Copy link
Contributor

MoritzLost commented Nov 22, 2024

@brianjhanson Any ETA on when this fix gets merged and deployed? We can't stay on an earlier 5.5.x version because of #16145, but the latest version broke all our field layouts …

@brandonkelly
Copy link
Member

Craft 5.5.3 is out with the fix for this. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants