This adds a class to the body node of output pages in the form:
rootpage-X
Where X is the root title of the page.
This provides for the use cases in the linked tasks, and allows the
numerous existing cases of expensive css selectors using class*='page-X'
that are otherwise needed to apply a style to a page and or its subpages.
Bug: T123156
Bug: T17075
Change-Id: Ib16e380d97bd7bb55c5b5044a084fefbd039d599
}
$name = Sanitizer::escapeClass( 'page-' . $title->getPrefixedText() );
+ $root = Sanitizer::escapeClass( 'rootpage-' . $title->getRootTitle()->getPrefixedText() );
- return "$numeric $type $name";
+ return "$numeric $type $name $root";
}
/**