craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.2k stars 617 forks source link

[5.x]: color field on element card styling issue #14296

Closed WHITE-developer closed 5 months ago

WHITE-developer commented 5 months ago

What happened?

Description

When adding a color field to the elements card to color preview takes up the entire card

Steps to reproduce

  1. create an element with a color field
  2. add the color field to the element card

Expected behavior

image

Actual behavior

image

Craft CMS version

5.0.0-alpha.11

PHP version

8.3.2

Operating system and version

Ubuntu 22.04

Database type and version

mysql 8.0.32

Image driver and version

No response

Installed plugins and versions

No response

brandonkelly commented 5 months ago

I’m not able to reproduce this. Tested with the same setup – Matrix field in cards view, set to 50% width, and tried both grid and list view options. Checked in Firefox, Safari, and Edge.

a Matrix field with one nested entry, displayed as a card view that previews its color field value

Do you have any custom CSS that could be affecting it?

lukas-jansen commented 5 months ago

🤔 I'll double check tomorrow with plugins disabled, but no custom styling of myself is loaded in the cp

WHITE-developer commented 5 months ago

Looks like it was Seomatic that conflicts with the static class

brandonkelly commented 5 months ago

Thanks for looking into it!

khalwat commented 5 months ago

Here's the culprit: https://tailwindcss.com/docs/position#statically-positioning-elements

I will fix this by prefixing my Tailwind CSS build -- something I probably should have been doing already.