Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The used target class '.content', officially stiil part of the Standard Drupal core classes, is not used by some themes anymore, likely due to the upcoming HTML5 tag 'article'.
We could use '.node' instead, but that would miss out on other entities. Using the HTML5 tag would not be CSS targetable by IE8 and before. There are workarounds for that, but that means other soft dependencies.
Best would be to have it configurable, but configurable CSS is still on the wish list.
Comment | File | Size | Author |
---|---|---|---|
#14 | configurable_css_selector-2505955-14.patch | 4.31 KB | lolandese |
#12 | configurable_css-2505955-12.patch | 27.37 KB | lolandese |
Comments
Comment #1
lolandese CreditAttribution: lolandese commentedA first shot at this. It works but is still missing a UI to set the variable 'autofloat_target', currently set to a default of 'article' that works with the Bootstrap theme.
Comment #2
lolandese CreditAttribution: lolandese commentedBetter to include the new file in the patch.
Comment #3
lolandese CreditAttribution: lolandese commentedComment #5
lolandese CreditAttribution: lolandese commentedComment #6
lolandese CreditAttribution: lolandese commentedAdd validation for the margin form field to ensure it's a positive number.
Comment #7
lolandese CreditAttribution: lolandese commentedComment #9
lolandese CreditAttribution: lolandese commentedComment #11
lolandese CreditAttribution: lolandese commentedPut back in the CSS selectors .content, #content and add article. This way we cover out-of-the-box for most of the themes available (if not all).
Furthermore now that we've added module support in the Style (CSS) Settings module, rewrite the code to have configurable CSS that way. It is much less code intrusive if no configurable CSS is desired.
Comment #12
lolandese CreditAttribution: lolandese commentedAdded
article
as CSS selector. Furthermore added a preview and CSS variables through the Style (CSS) Settings module.Comment #14
lolandese CreditAttribution: lolandese commentedAttached patch adds a configurable CSS selector. Bootstrap uses for example the HTML tag article. Most universal seems .node to target only the node and not the blocks. We made that the default value.
Furthermore we added the specific flickr selectors to avoid override of AutoFloat's CSS by Flickr's CSS.
Comment #16
lolandese CreditAttribution: lolandese commented