getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

Object Field: container query issue #6241

Closed bogdancondorachi closed 9 months ago

bogdancondorachi commented 9 months ago

Description

If you are trying to place the object field inside a container that's lower than 2/3 the preview is slightly different and its values are not displayed inside it.

@container (max-width: 40rem) {
  .k-table :where(th,td):not(.k-table-index-column):not(.k-table-options-column) {
    width: auto!important;
  }
}

Screenshots
image

To reproduce

sections:
  profile:
    type: fields
    fields:
      contact:
        type: object
        fields:
          photo:
            type: files
          name:
            type: text
          email:
            type: email
          phone:
            type: tel

Setup

Kirby Version 4.1.0

afbora commented 9 months ago

May be about left column width (container query issue). Could you test wider for left column?

cgundermann commented 9 months ago

May be about left column width (container query issue). Could you test wider for left column?

I guess, it's related to https://github.com/getkirby/kirby/issues/6228#issuecomment-1918856872

I've also posted a video sample there below.

bogdancondorachi commented 9 months ago

May be about left column width (container query issue). Could you test wider for left column?

Indeed if the column is wider than it displays correctly, but the width has to be at least 2/3, it does not work with 1/2 either.

The same goes if you have the field on a full-width container and apply a width lower than 2/3 to the object field, so definitely a container query issue.

afbora commented 9 months ago

Closing favor of https://github.com/getkirby/kirby/issues/6228