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.
Follow-up to #2408513: Refactor forum module CSS files inline with our CSS standards
Problem/Motivation
There is a inconsistency in how the .indented
class is being used across modules and themes.
Proposed resolution
We create a couple of generic classes like this:
.indented {
margin-left: 20px; /* LTR */
}
[dir="rtl"] .indented {
margin-left: 0;
margin-right: 20px;
}
.indented-double {
margin-left: 40px; /* LTR */
}
[dir="rtl"] .indented-double {
margin-left: 0;
margin-right: 40px;
}
This way, modules can use these classes to give indentation to their elements.
Beta phase evaluation
Issue category | Task because code cleanup |
---|---|
Issue priority | Not critical because code cleanup | Unfrozen changes | Unfrozen because it only changes CSS/markup |
Comment | File | Size | Author |
---|---|---|---|
#11 | consistent-indented-class-2470729-11.patch | 3.55 KB | MathieuSpil |
#8 | consistent-indented-class-2470729-8.patch | 4.01 KB | MathieuSpil |
#3 | consistent-indented-class-2470729-3.patch | 3.96 KB | MathieuSpil |
Comments
Comment #1
LewisNymanComment #2
MathieuSpil CreditAttribution: MathieuSpil commentedComment #3
MathieuSpil CreditAttribution: MathieuSpil commentedAfter a talk with Lewis, we decided to have a couple of generic classes defined inside system css:
Refactoring all the code that uses this, also removed comment.theme.css because that was the only selectors it was using.
Comment #7
Manjit.Singh@MathieuSpil Adding blank line at the end of file just for testbot.
Comment #8
MathieuSpil CreditAttribution: MathieuSpil commentedBecause of recent commit of Tim, the patch no longer applied. Should be fixed now.
I didn't change anything about line endings, so not sure if your change in patch #7 is needed?
Comment #9
MathieuSpil CreditAttribution: MathieuSpil commentedComment #10
Manjit.Singh@MathieuSpil I think you have added css in
system.theme.css
file at the last and forget to add blank line.Please correct if i am wrong.
Comment #11
MathieuSpil CreditAttribution: MathieuSpil commentedAh, my bad.
Indeed, good catch!
Included my fix + the blank line.
Comment #12
Manjit.SinghYeah looking fine now :) Thanks
Comment #13
LewisNymanOk great :) We just need some before/after screenshots to show any UI changes
Comment #14
MathieuSpil CreditAttribution: MathieuSpil commentedComment #15
emma.mariaI have investigated the indented class as part of this issue #2512468: Regression: Indented styles for indented comments are missing in Bartik..
For this issue the indented styles now need to exist in Classy. We have split system.theme.css files here #2395853: Split system.module.css and system.theme.css files into SMACSS style components and then these files are being moved over to Classy within this issue #2489460: [Meta] Move module.theme.css files to Classy or Seven.
The forum module also uses the .indented class. The forum-list.html.twig template within Classy adds it.
Also comments in Classy are indented by 25px, Bartik uses 40px. With the indented styles set in #11 there will be visual changes on indented comments for both of these themes.
Comment #16
MathieuSpil CreditAttribution: MathieuSpil commented@emma.maria We should indeed check if the changes are desirable or not. Also next to moving this css to classy, what do you suggest?