Feature #601
class instead of inline style for floating images in text
| Status: | Closed | Start: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | leo | % Done: | 0% |
|
| Category: | backend | |||
| Target version: | 2.7.0 |
Description
Dear devs!
At first I would like to thank you for this wonderful cms!
I noticed that the BE setting for floating images in text leads to an inline style like style="float: left". My suggestion is to use classes (e.g. "left"/"right") for the surrounding image_container instead, so the developer can style the image (esp. general margins) in the stylesheet by using .image_container.left or image_container.right. The aim is to save the user from having to set the same margins for each image over and over again and on the other hand it seperates layout from content.
This change would require to also add the img width to the image_container, but only if set. It also would require two new classes in typolight.css: .left and .right.
Thank you so much & keep on the good work,
juju
History
Updated by leo over 1 year ago
- Status changed from New to Closed
You can modify the template files and replace the inline style there.
Updated by Anonymous over 1 year ago
Hi Leo,
that's what I do. I just thought it would be handy for a lot of developers and would further improve the quality of typolight.
Best regards,
juju
Updated by leo over 1 year ago
Basically, you are right, however, using classes requires a style sheet that defines them. And since there is no default style sheet, the user would have to create one before he can use the image alignment feature - which is not very intuitiv at all.
Updated by Anonymous over 1 year ago
But do you think it is possible to at least add a class "left" or "right" to the image_container and leave the rest untouched? Otherwise checking the float and setting the corresponding class requires so "much" code to manually add to each image/text template and news template.
Thanks for your time,
juju
PS: Would you mind to also have a [/ticket/602 look at another ticket] I opened, which I subsequently changed from "bug report" to "feature request" and therefore doesn't show up in "New Tickets" anymore? Thanks again.
Updated by leo over 1 year ago
- Status changed from Closed to Reopened
Updated by leo over 1 year ago
- Status changed from Reopened to Accepted
I will see what I can do (not promising anything).
Updated by leo over 1 year ago
- Status changed from Accepted to Closed
In the end, there are more than 50 files that would need modification - a lot of work for little result.
You can use classes to float images in your installation, though. Simply add them to the content element (e.g. float_left), do not choose an image alignment and add the following to your style sheet:
1 .ce_text.float_left .image_container {
2 float:left;
3 }
Also available in: Atom