Issue #2449445 by mortendk, alexpott, Cottser: Add "indentation" class back to indentation theme hook, use it for styling

8.0.x
webchick 2015-03-18 23:51:06 -07:00
parent 9166c436a0
commit 4fd9ea47fc
4 changed files with 5 additions and 5 deletions

View File

@ -1092,7 +1092,7 @@ function template_preprocess_feed_icon(&$variables) {
function theme_indentation($variables) {
$output = '';
for ($n = 0; $n < $variables['size']; $n++) {
$output .= '<div class="js-indentation">&nbsp;</div>';
$output .= '<div class="js-indentation indentation">&nbsp;</div>';
}
return $output;
}

View File

@ -134,14 +134,14 @@ a.tabledrag-handle:focus .handle {
.touch .draggable.drag a.tabledrag-handle .handle {
background-position: 50% -32px;
}
div.js-indentation {
.indentation {
float: left; /* LTR */
height: 1.7em;
margin: -0.4em 0.2em -0.4em -0.4em; /* LTR */
padding: 0.42em 0 0.42em 0.6em; /* LTR */
width: 20px;
}
[dir="rtl"] div.js-indentation {
[dir="rtl"] .indentation {
float: right;
margin: -0.4em -0.4em -0.4em 0.2em;
padding: 0.42em 0.6em 0.42em 0;

View File

@ -17,4 +17,4 @@ See https://api.drupal.org/api/function/theme_indentation/8 for details.
After copying this file to your theme's folder and customizing it, remove this
HTML comment.
-->
{% for i in 1..size if size > 0 %}<div class="indentation">&nbsp;</div>{% endfor %}
{% for i in 1..size if size > 0 %}<div class="js-indentation indentation">&nbsp;</div>{% endfor %}

View File

@ -53,7 +53,7 @@ class TaxonomyTermIndentationTest extends TaxonomyTestBase {
// Submit the edited form and check for HTML indentation element presence.
$this->drupalPostForm('admin/structure/taxonomy/manage/' . $this->vocabulary->get('vid') . '/overview', $edit, t('Save'));
$this->assertPattern('|<div class="js-indentation">&nbsp;</div>|');
$this->assertPattern('|<div class="js-indentation indentation">&nbsp;</div>|');
// Check explicitly that term 2's parent is term 1.
$parents = taxonomy_term_load_parents($term2->id());