statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
4.13k stars 540 forks source link

Height of the spacer fieldtype is too large on small screens #10528

Open helloDanuk opened 4 months ago

helloDanuk commented 4 months ago

Bug description

The spacer field type leads to incorrect vertical spacing between fieldtypes on small screens.

Bildschirmfoto 2024-07-30 um 10 14 45 Bildschirmfoto 2024-07-30 um 10 16 01

How to reproduce

Create a blueprint with a spacer fieldtype between some narrow fields, so that the second textfield moves to a new line. For example:

Logs

No response

Environment

Environment
Application Name: Kochort CMS
Laravel Version: 11.18.1
PHP Version: 8.3.9
Composer Version: 2.7.7
Environment: local
Debug Mode: ENABLED
URL: /
Maintenance Mode: OFF
Timezone: Europe/Zurich
Locale: de_CH

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 4
Sites: 1
Stache Watcher: Enabled
Static Caching: Disabled
Version: 5.17.1 PRO

Statamic Addons
mitydigital/statamic-sticky-notes: 1.0.1
statamic/seo-pro: 6.0.3
stillat/relationships: 2.2.1
swiftmade/statamic-clear-assets: 3.0.0

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

RyanRoberts commented 3 months ago

I noticed this the other day, it's too big on large screens in some situations too. I gather it's because of the hidden text so I quickly fudged some CP CSS for it.

@container (min-width: 24rem) {
  .publish-tab .spacer-fieldtype .field-inner + div,
  .publish-tab .spacer-fieldtype .publish-field-label {
        display: none;
  }
}

@media screen and (max-width: 33.4375rem) {
  .publish-tab .spacer-fieldtype {
        display: none;
  }
}