summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2014-10-20 18:11:03 (GMT)
committerAlex Pott2014-10-20 18:11:03 (GMT)
commitf04c96070b9a505b743a6ccb752de47d29b6e1e7 (patch)
tree7853295e5fc47a7eb824e0ef3e2fea7ad2665972
parent2fdeb8fcf8da4de4b3d58cf79fb1c3e5acaa26aa (diff)
Issue #1623574 by droplet, cilefen, cesarmiquel, patrickfgoddard, sun, zaporylie, er.pushpinderrana, stevecowie, mbroere: Fixed Remove trailing space from form element labels and field labels (HTML nbsp).
-rw-r--r--core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php2
-rw-r--r--core/modules/system/css/system.theme.css11
-rw-r--r--core/modules/system/templates/field.html.twig2
-rw-r--r--core/themes/bartik/templates/field--taxonomy-term-reference.html.twig2
4 files changed, 9 insertions, 8 deletions
diff --git a/core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php b/core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php
index 6f790aa..bf0ae46 100644
--- a/core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php
+++ b/core/modules/entity_reference/src/Tests/EntityReferenceFormatterTest.php
@@ -171,7 +171,7 @@ class EntityReferenceFormatterTest extends EntityUnitTestBase {
</div>
';
$expected_rendered_body_field = '<div class="field field-entity-test--body field-name-body field-type-text field-label-above">
- <div class="field-label">Body:&nbsp;</div>
+ <div class="field-label">Body</div>
<div class="field-items">
<div class="field-item"><p>Hello, world!</p></div>
</div>
diff --git a/core/modules/system/css/system.theme.css b/core/modules/system/css/system.theme.css
index bf14339..2cc44e7 100644
--- a/core/modules/system/css/system.theme.css
+++ b/core/modules/system/css/system.theme.css
@@ -596,18 +596,19 @@ table tr.error {
.field-label-inline .field-label,
.field-label-inline .field-items {
float:left; /*LTR*/
- padding-right: 0.5em;
+ margin-right: 0.5em; /*LTR*/
}
[dir="rtl"] .field-label-inline .field-label,
[dir="rtl"] .field-label-inline .field-items {
float: right;
- padding-left: 0.5em;
+ margin-left: 0.5em;
+ margin-right: 0;
+}
+.field-label-inline .field-label::after {
+ content: ':';
}
/* Form display */
-form .field-edit-link {
- margin: 0 0.3em;
-}
form .field-multiple-table {
margin: 0;
}
diff --git a/core/modules/system/templates/field.html.twig b/core/modules/system/templates/field.html.twig
index 4217b4f..04fd875 100644
--- a/core/modules/system/templates/field.html.twig
+++ b/core/modules/system/templates/field.html.twig
@@ -32,7 +32,7 @@
#}
<div{{ attributes }}>
{% if not label_hidden %}
- <div{{ title_attributes.addClass('field-label') }}>{{ label }}:&nbsp;</div>
+ <div{{ title_attributes.addClass('field-label') }}>{{ label }}</div>
{% endif %}
<div{{ content_attributes.addClass('field-items') }}>
{% for item in items %}
diff --git a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
index f1289ee..a8e94e2 100644
--- a/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
+++ b/core/themes/bartik/templates/field--taxonomy-term-reference.html.twig
@@ -19,7 +19,7 @@
#}
<div{{ attributes.addClass('clearfix') }}>
{% if not label_hidden %}
- <h3{{ title_attributes }}>{{ label }}: </h3>
+ <h3{{ title_attributes }}>{{ label }}</h3>
{% endif %}
<ul{{ content_attributes.addClass('links', 'field-items') }}>
{% for item in items %}