Commit 4fd9ea47 authored by webchick's avatar webchick

Issue #2449445 by mortendk, alexpott, Cottser: Add "indentation" class back to...

Issue #2449445 by mortendk, alexpott, Cottser: Add "indentation" class back to indentation theme hook, use it for styling
parent 9166c436
......@@ -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;
}
......
......@@ -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;
......
......@@ -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 %}
......@@ -53,7 +53,7 @@ function testTermIndentation() {
// 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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment