New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove imagemargin and floating in Contao 5 #4575
Comments
Why do you want to remove floating? We use that all the time. Same with images per row for gallery elements. |
We don't use either. But I can see, how you might use these — at least floating. Let us see, how others use these settings. |
I agree that we should probably keep the floating setting. |
And regarding the row setting for gallery elements - that's how we use it: .ce_gallery {
ul {
display: grid;
gap: var(--grid-gap);
}
@for $i from 1 through 12 {
ul.cols_#{$i} {
grid-template-columns: repeat(#{$i}, 1fr);
}
}
} plus a mechanism to automatically set the appropriate image size from |
Yes, in the new elements I would name it |
Yes, please keep the floating setting. |
I'm also for keeping the floating but I'd also really like to see the |
Marking |
Here is what I'm currently doing in #4444: contao/core-bundle/src/Controller/ContentElement/TextController.php Lines 44 to 50 in 704940d
contao/core-bundle/src/Resources/contao/templates/_new/content_element/text.html.twig Lines 17 to 38 in 704940d
|
That would introduce additional wrappers which I wouldn't like 🙃. I'd prefer the class being added on the main wrapper. |
Well, that's debatable. 🙂 IMHO it's better this way as it semantically separates outer and inner layout. But, having a separate set of attributes makes it easy to adjust: {% extends "@Contao/content_element/text.html.twig" %}
{% set attributes = attributes.mergeWith(layout_attributes) %}
{% block content %}
{{ block('content_inner') }}
{% endblock %} |
As discussed in the Contao call, we want to keep the |
Description
Many years ago we had
margin before
andmargin after
fields for content elements (not exactly sure about that), which we removed because that was theme-related. I think we should finally removeimagemargin
andfloating
, too, as this is theme-related as well and should be solved otherwise.The same goes for the layout options (rows and columns) in the gallery element actually, but this might be another topic.
The text was updated successfully, but these errors were encountered: