You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Heading UI element is added to a field layout, it has a top border. When the Heading is the first element in a field layout, the border and extra spacing around it becomes rather unnecessary. Shown here.
Steps to reproduce
Create a field layout for an entry type
Add a Heading UI element as the first element in the layout
Fix
Can you detect that the Heading UI element is the first element in the field layout, and if so, skip the border-top as well as extra spacing around it? It will condense the field layout a bit, and remove an unnecessary separator.
Craft CMS version
4.x
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
Hi, thanks for reaching out. We already have that in place. The top border for the heading UI element won’t show if the heading is the first element in the tab. That said, if you have a conditional field above the heading and that conditional field is hidden, the heading is technically not the first element in the tab, so the border shows, like on the screenshot you shared.
Thank you. I found the issue - this is a field layout with the Title of the entry hidden, so the Title field is above the Heading UI element, but even though it is hidden, the border shows. I was able to fix by moving the hidden Title field elsewhere.
I just raised a PR which should also make the top border and extra padding not apply if the heading UI element is visually not the first element in the tab.
What happened?
Description
When a Heading UI element is added to a field layout, it has a top border. When the Heading is the first element in a field layout, the border and extra spacing around it becomes rather unnecessary. Shown here.
Steps to reproduce
Fix
Can you detect that the Heading UI element is the first element in the field layout, and if so, skip the border-top as well as extra spacing around it? It will condense the field layout a bit, and remove an unnecessary separator.
Craft CMS version
4.x
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: