benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.
https://www.bootstrap-package.com/
MIT License
338 stars 205 forks source link

Unneeded DIV tags for content element shortcut / "Insert Records" #1456

Open SventB opened 10 months ago

SventB commented 10 months ago

Bug Report

Prerequisites

Description

When using content element "Insert Records", first the "Insert Record" content element is wrapped in many div tags, then the referenced content element, too:

<div id="c265" class=" frame frame-default frame-type-shortcut frame-layout-default frame-size-default frame-height-default frame-background-none frame-space-before-none frame-space-after-medium frame-no-backgroundimage">
    <div class="frame-group-container">
        <div class="frame-group-inner">
            <div class="frame-container frame-container-default">
                <div class="frame-inner">
                    <div id="c123" class=" frame frame-default frame-type-image frame-layout-default frame-size-default frame-height-default frame-background-none frame-space-before-none frame-space-after-none frame-no-backgroundimage">

This not only bloats the source code, it's also an unexpected result (when styling content elements with CSS, this HTML structure is unexpected in my opinion), and this leads to double paddings for this content element (this is what I meant with "unexpected", you didn't expect this structure when writing styles for ".frame" class ;) ):

double-padding

The red "1" is first padding, "2" second padding.

I will provide a fix for this.

Steps to Reproduce

  1. Use content element "Insert Records"
SventB commented 10 months ago

No need for a pull request, just change template "Shortcut.html" to

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
    <f:format.raw>{shortcuts}</f:format.raw>
</html>