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.
Part of #2359331: [Meta] Add missing RTL rules in core CSS files.. These missing RTL rules were found using an automated tool.
Comment | File | Size | Author |
---|---|---|---|
#66 | system-missing-rtl-2396473-66.patch | 6.09 KB | herom |
#66 | interdiff-2396473-62-66.txt | 964 bytes | herom |
#66 | admin-modules-rtl-after.png | 5.2 KB | herom |
#66 | admin-modules-rtl-before.png | 5.51 KB | herom |
#66 | admin-module-ltr.png | 5.16 KB | herom |
Comments
Comment #1
Gábor HojtsyWhere is 12 defined for the default one? Generally for all td?
Same question for 9px?
Extra whitespace at end of line.
Already has an RTL rule?
Is the LTR one already marked for this one?
Comment #2
herom CreditAttribution: herom commentedThanks for the review.
1. yes. there is a
td { padding: 10px 12px; }
inthemes/seven/css/components/tables.css:45
.2. there is a default for all
th
, but, strangely, it's 12px. fixed. It's inthemes/seven/css/components/tables.css:17
.3. fixed.
4. yes, it has. added more context lines to the patch, so it's visible.
5. fixed. marked both the
-webkit-animation
and-moz-animation
as/* LTR */
Comment #3
Gábor HojtsyThanks, looks good with those fixes.
Comment #4
catchIf the px is added in Seven, why isn't the RTL version also in Seven?
Comment #5
Gábor Hojtsy@catch: I think you are concerned for these two.
Looks like those 12px are defined in core/themes/seven/css/components/tables.css:
However the patch is against core/modules/system/css/system.admin.css.
So it is true that we are adding arbitrary 12pxs here if a theme other than seven is used.
Would it be a good idea though to add 12px into the system theme? Would that not be too specific for what these rules wanted to achieve?
Comment #6
herom CreditAttribution: herom commentedWell, I was trying to follow the convention of including the RTL version of a CSS rule immediately after the rule itself, but as you pointed out, it didn't work in this case. So, I fixed it and moved the 12px RTL fix into Seven code.
I also noted an RTL issue that was only visible visually (rule specifity issue), and added a fix for that too.
Comment #7
Gábor HojtsyComment #8
DevElCuy CreditAttribution: DevElCuy commentedComment #9
DevElCuy CreditAttribution: DevElCuy commentedRemoved SprintWeekend2015Queue by mistake.
Comment #10
Kristen PolCan someone add some thoughts to the issue summary on how to best test this? Not sure what to do.
Comment #11
idebr CreditAttribution: idebr commented@Kristen Pol Have a look at a related issue to see what is expected #2360069: Add missing RTL rules to Seven tabs.css. The basic gist is you switch language direction to Right-to-left (/admin/config/regional/language/edit/en) and do manual testing and take screenshots along the way.
Comment #12
idebr CreditAttribution: idebr commentedPatch looks great!
All the missing RTL styling has been added. However, there is a rule missing from the automated report from system.theme.css:
The RTL version should reset the padding-right to 0.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous commentedadded RTL reset of padding 0 as asked in #12,
cant create interdiff properly as there were line changes that it was able to sort out..
Comment #14
Gábor HojtsyWould make both paddings inherit, is that intended? Ie. LTR is not undone.
Erm, why? The RTL td has different text align so this needs to be more specific?
Should redo the left padding no?
This does not come right after the LTR counterpart, why?
This does not follow the LTR counterpart, why?
Comment #15
LewisNymanThere are some clear actions here so tagging novice
Comment #16
Gábor HojtsyIs someone planning to work on this one?
Comment #17
Anonymous (not verified) CreditAttribution: Anonymous commentedI can take a look at it tomorrow.Didnt have time busy week.Comment #18
juankvillegas CreditAttribution: juankvillegas commentedIt is duplicated #2396483: Add missing RTL rules to Seven theme CSS
Comment #19
Anonymous (not verified) CreditAttribution: Anonymous commentedNo it is not duplicate this is referencing System module and not seven theme.
Comment #20
Gábor HojtsyLooks like not being actively worked on, removing from sprint. :/
Comment #21
Aunion CreditAttribution: Aunion commentedComment #22
Aunion CreditAttribution: Aunion commented#14:
1. Reset padding right
2. Tested to remove this and didn't seem to make a difference, removed
3. Redid padding left
4 & 5. No LTR counterpart, removed
Comment #23
Aunion CreditAttribution: Aunion commentedComment #24
LewisNymanThese properties aren't LTR specific, also changes to Seven CSS should be made in #2396483: Add missing RTL rules to Seven theme CSS
Comment #25
Aunion CreditAttribution: Aunion commentedComment #26
Aunion CreditAttribution: Aunion commentedRemoved Seven specific changes.
Comment #27
idebr CreditAttribution: idebr commentedThanks @Aunion, changes look great!
However, this patch will need a reroll now that #2430961: Remove leftover CSS from theme_exposed_filters() has been committed:
error: patch failed: core/modules/system/css/system.admin.css:370
error: core/modules/system/css/system.admin.css: patch does not apply
Comment #28
Aunion CreditAttribution: Aunion commentedRerolled
Comment #31
idebr CreditAttribution: idebr commentedThanks @Aunion, just a few minor remarks and then we're good to go!
While technically this is correct, .system-modules td has no padding by default so these selectors can safely be removed.
RTL overrides don't require an additional linebreak
This additional line-break is unnecessary and can be removed.
Comment #32
pjbaertThe remarks by @idebr of #31 are processed in this patch.
Comment #33
pjbaertComment #34
Anonymous (not verified) CreditAttribution: Anonymous commentedThese aren't LTR specific as RTL uses em also but just with the animation-direction property, or am i just confused?
If we want to mark this shouldn't we use
animation-direction: normal;/*LTR*/
Comment #35
Dhorkiy CreditAttribution: Dhorkiy commentedModified according to #34
Comment #36
pjbaertI agree with the changes proposed by b0unty.
There is no need to add the
animation-direction: normal;/*LTR*/
line in the CSS.Patch #35 by Dhorkiy looks fine to me.
Comment #37
alexpottI'm surprised that there are no screenshots on this issue?
Comment #38
Dom. CreditAttribution: Dom. commentedComment #39
Dom. CreditAttribution: Dom. commentedPatch #35 applies properly. Though, I can't check specifically the effect of it's CSS because it is overriden by superior CSS rules (form.css overrides the change of .form-type-checkbox .description from the patch for instance).
Still, without this patch, admin pages looks good RTL. Here is an example where the above CSS rule applies : it is the same RTL with and without page because form.css already does the job.
LTR of Account settings page :
RTL of Account settings page :
@alexpott could you be more specific about expected screenshots and remaining work ?
Comment #40
Gábor Hojtsy@Dom: is this CSS used on a page without the form CSS? As for the screenshots, a few places where this fixes CSS would be nice to screenshot with markings on what is fixed (before/after).
Comment #41
Dom. CreditAttribution: Dom. commentedHi !
The patch applies quasi-exclusively on some form generated items (checkboxes, radio buttons, table, etc..) where form.css always overrides that.
There is however ".system-themes-admin-form" clear:left changed to clear:right. But this is also effectless because even without the patch, the concerned item renders properly (Administrative theme box under /admin/appearance)
Comment #42
LewisNyman@Dom. To test this patch correctly I would enable the Classy theme as the admin theme instead of Seven, otherwise the Seven CSS will override some of the changes here.
Comment #43
Dom. CreditAttribution: Dom. commented@LewisNyman: So true ! How could I forgot that !
Here is full review :
Otherone seems to apply properly; exampe here :
becomes after patch :
I could find this issue remaining though where parenthesis gone wrong :
Comment #44
fran seva CreditAttribution: fran seva commentedComment #45
Dom. CreditAttribution: Dom. commentedComment #46
disasm CreditAttribution: disasm at AppliedTrust commentedLets get the issue summary updated and embed the most recent screenshots in the summary.
Comment #47
pbland CreditAttribution: pbland commentedAnyone know where .diff-inline-legend (declared in system.diff.css) is used in the Admin section? My global search isn't finding it and it's not in the Diff mod.
Comment #48
Manjit.Singhrerolling a patch #35
Comment #49
Manjit.Singhminor spaces between text and arrow in RTL as compared to LTR :(
Comment #50
pjbaertComment #51
kerrymick CreditAttribution: kerrymick commented@Manjit.Singh This appears to be an issue with head. The issue occurs with both head and with the patch applied in the Safari browser on a mac, but looks fine on Firefox and Chrome in both versions.
Comment #52
Anonymous (not verified) CreditAttribution: Anonymous at Druid commentedconfirmed what was said in #51, also the patch looks RTBC to me
Comment #53
LewisNymanDo you mind if we postpone this until #2395853: Split system.module.css and system.theme.css files into SMACSS style components lands? It's a very difficult patch to reroll and we run the risk of losing these improvements easily.
Comment #54
Anonymous (not verified) CreditAttribution: Anonymous at Druid commentedseems like no one is working actively on the issue lewis posted, so unpostponing this, patch does still seem to apply so back to RTBC
Comment #56
davidhernandezThe issue Lewis mentioned in #53 has been committed.
Comment #57
pjbaertrerolled patch #48
Comment #58
Manjit.Singhmanually test #57 patch. Arrows looks fine in Seven and stark !! Please check screenshots.
Comment #59
LewisNymanWe've added RTL styling but we haven't placed LTR comments on the corresponding lines above.
Also, if we're using animation-direction we should also be using the same browser prefixes as above. (webkit, moz)
This adds an LTR comment but I can't find the corresponding RTL styling?
Comment #60
LewisNymanComment #61
prabhurajn654 CreditAttribution: prabhurajn654 commentedComment #62
prabhurajn654 CreditAttribution: prabhurajn654 commented@lewis I have made the changes as suggested in #59.
Also i have removed the LTR comment, As there is nor RTL style for the same. Please verify.
system-missing-rtl-2396473-62.patch
Comment #63
prabhurajn654 CreditAttribution: prabhurajn654 commentedComment #64
Manjit.SinghTrigger testbot
Comment #65
LewisNymanI think instead we should add the RTL styling. Sorry I wasn't very clear.
Also, it helps me review your changes if you also create interdiffs between patches. You can find out how to create them here: https://www.drupal.org/documentation/git/interdiff
Comment #66
herom CreditAttribution: herom commentedRerolled. Addressed #65.
Also, found a visible visual issue, and added a fix. Screenshots below:
LTR:
RTL (before):
RTL (after):
Comment #67
Gábor HojtsyReviewed each change in the patch on a code level. Where there is no matching LTR/RTL change in the patch, there is already in the existing code. Looks good.
Comment #69
webchickNice catch.
Committed and pushed to 8.0.x. Thanks!
Comment #71
prabhurajn654 CreditAttribution: prabhurajn654 as a volunteer and commentedComment #72
prabhurajn654 CreditAttribution: prabhurajn654 as a volunteer and at Srijan | A Material+ Company commented