benjaminkott / bootstrap_package

Bootstrap Package delivers a full configured theme for TYPO3, based on the Bootstrap CSS Framework.

Home Page:https://www.bootstrap-package.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

SventB opened this issue · comments

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v11.5 LTS
  • Can you reproduce the problem on TYPO3 v12.4 LTS
  • Did you perform a cursory search
    to see if your bug or enhancement is already reported?

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"

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>