Problem/Motivation

label.png
All forms Labels text contain a trailing SPACE.

- when adding background color to the element, there is no way to remove the space.
- non-relevant SPACE inside html tag is not a best practice.
- Simpletest & JS lookup to labels. It's odd. (eg. #1623564: Wrong text at translation UI)

Proposed resolution

- Removing labels text's trailing SPACE
- Removing the SPACE before Labels

workarounds for people who cannot use the patch / after committed:

- using CSS to adding space between 2 form elements.

eg.

.form-item .option:before {
content: " ";
}

Remaining tasks

- Decide if we want to keep spaces between checkboxes and radio button and their labels, and the space inside the label of a required field. See comment #30

User interface changes

Core: No visual Changes
Custom themes: (if users adding background & padding-left to fix space problem. Now, it might lose one space at right side.)
(seldom happens)
Custom modules: module authors have to update their simpletest.

API changes

-

Updated to comment #30

CommentFileSizeAuthor
#87 remove_trailing_space-1623574-87-4.png34.59 KBzaporylie
#87 remove_trailing_space-1623574-87-3.png37.93 KBzaporylie
#87 remove_trailing_space-1623574-87-2.png28.81 KBzaporylie
#87 remove_trailing_space-1623574-87-1.png31 KBzaporylie
#87 interdiff-1623574-83-87.txt655 byteszaporylie
#87 remove_trailing_space-1623574-87.patch2.67 KBzaporylie
#83 remove_trailing_space-1623574-83.patch2.65 KBcilefen
#81 with-margin.png235.02 KBmbroere
#81 without-margin.png243.22 KBmbroere
#76 inline-76.png9.12 KBmbroere
#76 above-76.png9.35 KBmbroere
#76 1623574-76.patch2.9 KBmbroere
#73 interdiff-66-70.txt340 byteser.pushpinderrana
#70 interdiff-66-70.patch340 bytescilefen
#70 1623574-70.patch2.68 KBcilefen
#67 1623574-66-patched.png26.5 KBvalthebald
#67 1623574-66-nopatch.png26.04 KBvalthebald
#66 interdiff-65-66.txt537 bytescilefen
#66 1623574-66.patch2.7 KBcilefen
#66 extra2.png7.22 KBcilefen
#66 extra.png7.48 KBcilefen
#65 1623574-65.patch2.02 KBdroplet
#64 1623574-64.patch1.93 KBdroplet
#60 interdiff.txt753 bytescesarmiquel
#60 1623574-60.patch1.69 KBcesarmiquel
#57 interdiff.txt734 bytescesarmiquel
#57 1623574-remove-trailing-space-from-form-57.diff1.67 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-55.patch979 bytescesarmiquel
#55 1623574-remove-trailing-space-from-form-55-with-patch.png149.26 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-55-without-patch.png126.23 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-ltr-55-without-patch.png238.43 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-ltr-55-with-patch.png236.75 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-ltr-stark-55-without-patch.png245.88 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-ltr-stark-55-with-patch.png245.1 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-stark-55-with-patch.png229.45 KBcesarmiquel
#55 1623574-remove-trailing-space-from-form-stark-55-without-patch.png242.42 KBcesarmiquel
#50 Broken Inline label.png5.76 KByched
#46 field-label-before.png51.17 KBsun
#46 field-label-after.png51.44 KBsun
#46 field-edit-link-margin.png13.87 KBsun
#39 drupal8.label-whitespace.39.patch1.37 KBsun
#35 drupal8.label-whitespace.35.patch1.04 KBsun
#26 remove-trailing-space-1623574-26.patch3.92 KBpatrickfgoddard
#24 remove-trailing-space-1623574-24.patch3.92 KBpatrickfgoddard
#20 remove-trailing-space-1623574-20.patch3.95 KBpatrickfgoddard
#16 remove-trailing-space-1623574-15.patch4.3 KBstevecowie
#14 1623574-remove-trailing-space-14.patch4.31 KBdroplet
#13 1623574-remove-trailing-space-13.patch4.31 KBdroplet
#9 spacing.png3.23 KBdroplet
#4 loose_space-3-js.patch5.54 KBdroplet
loose_space.patch1.92 KBdroplet
label.png10.14 KBdroplet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tlattimore’s picture

Status: Active » Needs review

Tagging as needs review to the cue bot.

Status: Needs review » Needs work

The last submitted patch, loose_space.patch, failed testing.

joachim’s picture

Related: #991522: Vertical tabs summaries have stray spaces. This fix would possibly fix the problem over there.

droplet’s picture

Component: CSS » other
Status: Needs work » Needs review
Issue tags: +Needs manual testing, +Needs backport to D7
FileSize
5.54 KB

Thanks for the ref @joachim :)

I'm also removed JS $.trim at following patch -> If users really need a SPACE, we should not remove it.

tlattimore’s picture

Patch in #4 looks good, applies cleanly, and conforms to coding standards.

andypost’s picture

+++ b/core/includes/form.incundefined
@@ -4487,7 +4487,7 @@ function theme_form_element_label($variables) {
-  return ' <label' . drupal_attributes($attributes) . '>' . $t('!title !required', array('!title' => $title, '!required' => $required)) . "</label>\n";
+  return ' <label' . drupal_attributes($attributes) . '>' . $t('!title!required', array('!title' => $title, '!required' => $required)) . "</label>\n";

Any reasont to leave this prefix before label?

+++ b/core/modules/field/modules/text/text.jsundefined
@@ -14,6 +14,7 @@ Drupal.behaviors.textSummary = {
+      $summaryLabel.append(' ');

same

+++ b/core/modules/field/modules/text/text.jsundefined
@@ -22,6 +23,7 @@ Drupal.behaviors.textSummary = {
+      $fullLabel.append(' ');

same

droplet’s picture

#1 example:

<div class="form-item form-type-checkbox form-item-menu-enabled">
 <input type="checkbox" class="form-checkbox" value="1" name="menu[enabled]" id="edit-menu-enabled">  <label for="edit-menu-enabled" class="option">Provide a menu link </label>
</div>

#2 & #3 add space between word the hide link:
Summary (Hide summary)

andypost’s picture

#1 adds a useless space befor label id="edit-menu-enabled"> <label

I think #2 & #3 probably makes sense

droplet’s picture

FileSize
3.23 KB
<div class="form-item form-type-checkbox form-item-menu-enabled">
 <input type="checkbox" class="form-checkbox" value="1" name="menu[enabled]" id="edit-menu-enabled">  <label for="edit-menu-enabled" class="option">Provide a menu link </label>
</div>

spacing.png

Since this is not inject spacing inside the tag, we able to style it with CSS. By remove the SPACE in this code, I afraid it will break a lot of themes.

Let wait for one more reviewer?

(EDIT: rephrase my word to more clearly)

tedstein’s picture

I think this patch is important. A lot of themes, and automated tests, will rely on the space if it is not removed. The space is, as droplet said, a CSS issue. The space is a bug, and needs fixing.

tim.plunkett’s picture

Status: Needs review » Closed (duplicate)

Marking as a duplicate of #991522: Vertical tabs summaries have stray spaces, you can widen the scope of that issue but it does pretty much the same thing and is 1.5 years older.

Same thing happened to me #1542700: Content type fieldset summaries contain extra spaces a couple months ago :)

joachim’s picture

Status: Closed (duplicate) » Needs review

This issue may be newer but it has the wider scope already and it has the patch for that, so I reckon this is the one we should keep open :)

droplet’s picture

Reroll.

No way to generate a good interdiff, here is the main changes:

diff --git a/core/modules/block/block.js b/core/modules/block/block.js
index 7b0eb77..6f8c4d0 100644
--- a/core/modules/block/block.js
+++ b/core/modules/block/block.js
@@ -23,7 +23,7 @@ Drupal.behaviors.blockSettingsSummary = {
       if (!vals.length) {
         vals.push(Drupal.t('Not restricted'));
       }
-      return $.map(vals, $.trim).join(', ');
+      return vals.join(', ');
     }


diff --git a/core/modules/field/modules/text/text.js b/core/modules/field/modules/text/text.js
index efc5579..2f8552e 100644
--- a/core/modules/field/modules/text/text.js
+++ b/core/modules/field/modules/text/text.js
@@ -39,6 +39,9 @@ Drupal.behaviors.textSummary = {
         }
       ).appendTo($summaryLabel);
 
+      // Add space before the link.
+      $link.prepend(' ');
+
droplet’s picture

Interesting, thats 2 spaces between radio/checkbox & form label. Also removed #9 space. will it break the bot ? Let's go.

droplet’s picture

Issue summary: View changes

fix

droplet’s picture

Issue summary: View changes

IS

droplet’s picture

Issue summary: View changes

Updated issue summary.

stevecowie’s picture

Assigned: Unassigned » stevecowie
Status: Needs review » Needs work

Patch at #14 no longer works - line references wrong - i'll reroll.

stevecowie’s picture

Status: Needs work » Needs review
FileSize
4.3 KB

re-roll of #14 ready for test

droplet’s picture

Status: Needs review » Needs work
Issue tags: +Needs manual testing, +Needs backport to D7

The last submitted patch, remove-trailing-space-1623574-15.patch, failed testing.

droplet’s picture

Issue tags: +Novice

tagging Novice, anyone willing to reroll a patch, thanks.

patrickfgoddard’s picture

Re-rolled. However, due to this issue: http://drupal.org/node/1685140, the changes done to collapse.js in previous patches no longer is relevant (that whole chunk removed.

I'm not sure I'm doing this correctly, so feel free to look over and review. (followed instructions from http://drupal.org/patch/reroll to reroll)

patrickfgoddard’s picture

Status: Needs work » Needs review

Updating status.

Status: Needs review » Needs work

The last submitted patch, remove-trailing-space-1623574-20.patch, failed testing.

patrickfgoddard’s picture

So the test failed at: "Detect a Drupal installation failure"

Details:
10:13:17] Invoking operation [install]...
[10:13:18] Encountered error on [install], details:
array (
'@reason' => 'Installing: failed to arrive at database configuration page using install path http://drupaltestbot664-mysql/checkout/install.php?profile=standard&langcode=en',
)
[10:13:18] Review complete. test_id=335523 result code=7 details=Array
(
[@reason] => Installing: failed to arrive at database configuration page using install path http://drupaltestbot664-mysql/checkout/install.php?profile=standard&langcode=en
)

Is that because of the patch, or is something else going on?

patrickfgoddard’s picture

Status: Needs work » Needs review
FileSize
3.92 KB

Removing "old mode", "new mode" lines. Don't think that's necessary and hoping that is what was causing the tests to fail.

Status: Needs review » Needs work

The last submitted patch, remove-trailing-space-1623574-24.patch, failed testing.

patrickfgoddard’s picture

Third times a charm?

Discovered drupal_attributes call is now replaced by Attribute object. Modified patch and am resubmitting.

patrickfgoddard’s picture

Status: Needs work » Needs review

Changing status.

acmaintainer’s picture

I am a novice and found this issue via the novice tag. This is the first core issue I have participated in.
I applied the patch cleanly.
The patch did remove trailing spaces from all labels with the exception of the ones in the login block. There is space between the label text and the "abbr" tag and I am not sure if it should be there.

MarkoV’s picture

loose_space.patch queued for re-testing.

Evan King’s picture

Reproduced the issue

Patch 26 applied cleanly and does remove the trailing space inside tags.

Comment #28 noted that spaces still appear in labels of required fields, but this is to separate the text of the label from the asterisk which indicates it is a required field. I'm not sure if this is desired behaviour or not.

However, the leading space before tags still exists after a checkbox or radio button.

<div class="form-item form-type-checkbox form-item-menu-enabled">
 <input type="checkbox" id="edit-menu-enabled" name="menu[enabled]" value="1" class="form-checkbox"> <label class="option" for="edit-menu-enabled">Provide a menu link</label>

</div>

Again, I'm not sure if this is desired behaviour or not.

In both of these cases, I'd vote to keep those spaces in, otherwise we'll lose the visual separation unless a theme knows to style for it. But maybe that's what we want?

Evan King’s picture

Issue summary: View changes

Updated issue summary.

barraponto’s picture

Patch looks ok to me.

Regarding the "required" space, I'd suggest a CSS solution. But not the ugly margin-left: 2px workaround, but rather a .form-required:before { content: " "; } However, right now, the space is added in a t() call — although I have no idea why the required marker is being passed to the t() function. Another issue, maybe?

Anyway, I'll add the CSS generated content workaround to the issue summary. It's safe for every browser and IE>8, see http://caniuse.com/#feat=css-gencontent

barraponto’s picture

Issue summary: View changes

Patch #26 works fine, but we need to decide if we want to keep spaces between checkboxes and labels, and between label text and the asterisk indicating a required field. suegegambit

droplet’s picture

Status: Needs review » Needs work
Issue tags: +Novice, +Needs manual testing, +Needs backport to D7

The last submitted patch, remove-trailing-space-1623574-26.patch, failed testing.

sun’s picture

Title: remove LABELs' trailing space » Remove trailing space from form element labels and field labels (HTML nbsp)
Component: other » markup
Issue tags: -Needs backport to D7

This cannot be backported to D7, as it would potentially break hundreds of thousands of themes. ;)

However, we absolutely need to get rid of this.

There's one more incarnation of this, which is even worse: theme_field() outputs an explicit &nbsp;. Can't get any more ugly. ;) Let's also fix that instance right here, right now.

In general, this patch should remove the offending white-space everywhere, instead of moving it around. If necessary, the CSS should inject an appropriate margin (or padding).

+++ b/core/includes/form.inc
@@ -4541,7 +4541,7 @@ function theme_form_element_label($variables) {
-  $required = !empty($element['#required']) ? theme('form_required_marker', array('element' => $element)) : '';
+  $required = !empty($element['#required']) ? ' ' . theme('form_required_marker', array('element' => $element)) : '';

+++ b/core/modules/field/modules/text/text.js
@@ -39,6 +39,9 @@ Drupal.behaviors.textSummary = {
+      // Add space before the link.
+      $link.prepend(' ');

Both of these should be exclusively handled by CSS.

@stevecowie, any chance to get back to this?

sun’s picture

Assigned: stevecowie » sun
Status: Needs work » Needs review
FileSize
1.04 KB

So... erm... the majority of this issue/patch actually happened as part of the patch in #1838114: Change node form’s vertical tabs into details elements already... (I *knew* I touched those very lines already...)

Re-rolling the last patch against HEAD, and incorporating theme_field() leaves us with the attached patch only.

Let's see how it goes.

Status: Needs review » Needs work
Issue tags: -Novice, -Needs manual testing

The last submitted patch, drupal8.label-whitespace.35.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review
Issue tags: +Novice, +Needs manual testing

#35: drupal8.label-whitespace.35.patch queued for re-testing.

Edit: Failed Git checkout.

droplet’s picture

Nice, I hope we could add back a SPACE to:

Body(Edit summary)

=>

Body (Edit summary)

sun’s picture

Yes, we can. But not with a space. CSS is the key. :)

droplet’s picture

Looks good to me :)

shnark’s picture

+++ b/core/modules/block/block.jsundefined
@@ -23,7 +23,7 @@ Drupal.behaviors.blockSettingsSummary = {
-      return $.map(vals, $.trim).join(', ');
+      return vals.join(', ');

I don't understand what this change is doing, I read the comments, and didn't see this mentioned.

+++ b/core/modules/field/field.moduleundefined
@@ -1256,7 +1256,7 @@ function theme_field($variables) {
-    $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . ':&nbsp;</div>';
+    $output .= '<div class="field-label"' . $variables['title_attributes'] . '>' . $variables['label'] . '</div>';

+++ b/core/modules/field/theme/field.cssundefined
@@ -9,6 +9,9 @@
+form .field-edit-link {
+  margin: 0 0.3em;
+}

this part makes sense, they removed the space, and added a margin in CSS.

The coding standards look fine.

droplet’s picture

I don't understand what this change is doing, I read the comments, and didn't see this mentioned.

Looking back to D7 (before #1838114: Change node form’s vertical tabs into details elements), form API will add SPACE to label (some form elements). Therefore, blockSettingsSummary generated summary with SPACE, we add $.trim to remove the SPACE.

Also @see: http://drupal.org/node/1623574#comment-6097740

sun’s picture

The change to theme_field() requires manual testing + before/after screenshots for confirmation.

With those, this patch should be RTBC. Any takers? :)

sun’s picture

#39: drupal8.label-whitespace.39.patch queued for re-testing.

sun’s picture

Can anyone do a quick visual review to confirm the changes of this patch? :)

sun’s picture

Alright, one before vs. after screenshot for the removal of whitespace and colon from field labels:

field-label-before.png

field-label-after.png

And one additional screenshot for the .field-edit-link margin tweak, affecting the "(Edit summary)" link:

field-edit-link-margin.png

With these, we should be RTBC here.

YesCT’s picture

#39: drupal8.label-whitespace.39.patch queued for re-testing.

YesCT’s picture

Status: Needs review » Reviewed & tested by the community

if the testbot says green, rtbc from me.
the code was already looked at in #40 and #41, and I looked at it, again, looking good.

The manual testing and screenshots are in #46

Dries’s picture

Status: Reviewed & tested by the community » Fixed

We all like pretty HTML. :-) Committed to 8.x. Thanks.

yched’s picture

Status: Fixed » Active
FileSize
5.76 KB

Several issues with the Field part of this :

+form .field-edit-link {
+  margin: 0 0.3em;
+}

.field-edit-*link* ? what does this match ?

- The patch removes a :&nbsp from theme_link() (used for *displayed* entities), and replaces (?) it with some margin on forms ?

- That :&nbsp (the column and the space) was there when the field display is configured with label "inlined". That case is now broken - see screenshot below for field "Some text" :
Broken Inline label.png

- If it gets removed from theme_field(), it also needs to be removed from field.tpl.php

yched’s picture

(also, note from the screenshot that bartik's bartik_field__taxonomy_term_reference() still prints the column for taxonomy field labels)

sun’s picture

The quoted CSS is for the "Edit summary" link of text_summary field widgets in a form. (see #46)

Thanks, looks like we overlooked inline field labels :) For these, we should add a class and corresponding CSS rule along the lines of this:

.field-label--inline::after {
  content: ': ';
}
sun’s picture

Issue summary: View changes

Updated issue summary.

LewisNyman’s picture

Issue summary: View changes
Issue tags: +frontend, +CSS
cesarmiquel’s picture

I'm working on a patch and screenshots. We're handling this issue in Drupal Con Austin in the front end/twig sprint. Will submit shortly.

cesarmiquel’s picture

Submitting a patch for this which removes the   and replaces it with CSS. Tested in Stark and Bartik with LTR and RTL languages. I'm attaching some screenshots:

Bartik before patch:


Bartik after patch:


Stark before patch:


Stark after patch:


Status: Needs review » Needs work

The last submitted patch, 55: 1623574-remove-trailing-space-from-form-55.patch, failed testing.

cesarmiquel’s picture

Status: Needs work » Needs review
FileSize
1.67 KB
734 bytes

Fixed the test as well and re-submitting my previous patch. I also uploaded an interdiff for easier review.

Status: Needs review » Needs work

The last submitted patch, 57: 1623574-remove-trailing-space-from-form-57.diff, failed testing.

joelpittet’s picture

  1. +++ b/core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php
    @@ -178,7 +178,7 @@ public function testEntityFormatter() {
    -      <div class="field-label">Body:&nbsp;</div>
    +      <div class="field-label">Body:</div>
    

    You'd need to remove the ':' as well because that is no longer part of the markup.

  2. +++ b/core/modules/system/css/system.theme.css
    @@ -636,6 +636,9 @@ table tr.error {
    +  content: ': ';
    

    This is not equivilent to a   but considering it's in a div, that's probably fine but just wanted to point that out.

cesarmiquel’s picture

Status: Needs work » Needs review
FileSize
1.69 KB
753 bytes

Thanks Joel! I delayed to re-submit the patch because I was trying to reproduce the fail on my local environment and couldn't. So I'm resubmitting the patch with the same correction you are suggesting. I'm also submitting the interdiff.txt. Lets cross our fingers :-).

joelpittet’s picture

yw @cesarmiquel and thanks for working on this!

@sun you can do the honors?

RTBC++

star-szr’s picture

Looks good to me, just want to note for the commit message that @zetagraph worked on this at the sprint also and should get a commit mention.

Could be better but something like:

Issue #1623574 followup by cesarmiquel, zetagraph: Fixed Remove trailing space from form element labels and field labels (HTML nbsp).
cesarmiquel’s picture

As Scott said, Andrei (a.k.a. @zetagraph) also contributed significantly to getting this done. Glad to have helped and hoping to contribute more on other issues :-).

droplet’s picture

FileSize
1.93 KB

wow. I'm surprised a lot of issues in this thread has been committed in other issues but no one linking back. I found some new problems.

Will this issue get committed at final ?

- changed to margin-right. removed background color issues. see issue summary
- removed space in .field-label-inline .field-label::after

If we wanna add space in CSS content should be:

*:after {
    content: ":\00a0";
}
droplet’s picture

FileSize
2.02 KB

Also, edit summary, no more space

cilefen’s picture

FileSize
7.48 KB
7.22 KB
2.7 KB
537 bytes

I was able to reproduce the extant issues as I understand them in Stark in RTL and LTR on Chrome and Firefox 30.0 on OS X 10.9.3. They are:

  • Unwanted space after inline field labels.
  • Excess spacing after "Body" in "Body (Edit summary)"

The patch applied cleanly and fixed those issues.

But in Bartik there is an extra colon after the taxonomy label.

Extra colon

This patch removes the extra colon.

Extra colon removed

valthebald’s picture

Status: Needs review » Needs work
FileSize
26.04 KB
26.5 KB

After applying patch from #66 there is no colon at all:
Before patch:
No patch
After patch:
With patch

cilefen’s picture

In Bartik and Stark:

#65 produces two colons after the taxonomy label when the label is inline and one when the label is above.

#66 produces one colon after the taxonomy label when the label is inline and none when the label is above.

valthebald’s picture

@cilefen: why to remove colon when label is above?

cilefen’s picture

FileSize
2.68 KB
340 bytes

@valthebald True. Is it as simple as this?

cilefen’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 70: interdiff-66-70.patch, failed testing.

er.pushpinderrana’s picture

Status: Needs work » Needs review
FileSize
340 bytes

#70 looks fine, should moved to Need Review status. As interdiff-66-70.patch filename was wrong, it should be interdiff-66-70.txt. Rename and uploaded interdiff-66-70.txt file and moved this to Need Review status.

sun’s picture

Assigned: sun » Unassigned
Status: Needs review » Needs work

Why does the latest patch add a colon to all field labels now?

Only inline field labels should be adjusted, as in the previous patches up till #66.

+++ b/core/modules/system/css/system.theme.css
@@ -636,7 +636,7 @@
-.field-label-inline .field-label::after {
+.field-label::after {
   content: ':';
 }
prashantgoel’s picture

Assigned: Unassigned » prashantgoel
mbroere’s picture

FileSize
2.9 KB
9.35 KB
9.12 KB

Re-roll of 66

Inline
inline

Above
above

mbroere’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 76: 1623574-76.patch, failed testing.

joelpittet’s picture

Assigned: prashantgoel » Unassigned
Issue tags: +needs screenshots

Thanks for re-rolling this patch! It looks good just one question:

+++ b/core/modules/system/css/system.theme.css
@@ -588,18 +588,18 @@ table tr.error {
-form .field-edit-link {
-  margin: 0 0.3em;
-}

Was this accounted for? Could you take a screenshot of this? It was taken in #46 for the summary field I believe.

emma.maria queued 76: 1623574-76.patch for re-testing.

mbroere’s picture

Status: Needs work » Needs review
FileSize
243.22 KB
235.02 KB

The margin on .field-edit-link was removed in patch-65 and looks alright:
Without margin:
without margin

With margin:
with margin

LewisNyman’s picture

Status: Needs review » Needs work
Issue tags: -needs screenshots +Needs reroll

Looks good to me. Unfortunately this needs a reroll.

cilefen’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
2.65 KB

reroll

valthebald’s picture

Status: Needs review » Reviewed & tested by the community

Screenshots clearly show the difference, thanks @mbroere
Patch looks good as well

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
  1. +++ b/core/modules/system/css/system.theme.css
    @@ -596,18 +596,18 @@ table tr.error {
     .field-label-inline .field-label,
     .field-label-inline .field-items {
       float:left; /*LTR*/
    -  padding-right: 0.5em;
    +  margin-right: 0.5em;
     }
    

    Should have /*LTR*/ comment on margin-right too.

  2. +++ b/core/modules/system/css/system.theme.css
    @@ -596,18 +596,18 @@ table tr.error {
     [dir="rtl"] .field-label-inline .field-label,
     [dir="rtl"] .field-label-inline .field-items {
       float: right;
    -  padding-left: 0.5em;
    +  margin-right: 0.5em;
    +}
    

    don't you mean margin-left and don't we have to reset margin-right here?

EDIT: Improved code context

zaporylie’s picture

Assigned: Unassigned » zaporylie
zaporylie’s picture

@alexpott has absolutely right. I've attached improved patch, interdiff and some screens how it looks now.

LTR without margin:

LTR with margin:

RTL without margin reset:

RTL with margin reset:

joelpittet’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, thanks for the screenshots. This looks like it should do the trick and addresses #85

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f04c960 and pushed to 8.0.x. Thanks!

  • alexpott committed f04c960 on 8.0.x
    Issue #1623574 by droplet, cilefen, cesarmiquel, patrickfgoddard, sun,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.