coren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/281253
Change subject: Add root title class to <body>
......................................................................
Add root title class to <body>
This adds a class to the body node of output pages in the form:
page-root-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
---
M includes/skins/Skin.php
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/53/281253/1
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index e5b9cb9..6a203bc 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -387,8 +387,9 @@
}
$name = Sanitizer::escapeClass( 'page-' .
$title->getPrefixedText() );
+ $root = Sanitizer::escapeClass( 'page-root-' .
$title->getRootTitle()->getPrefixedText() );
- return "$numeric $type $name";
+ return "$numeric $type $name $root";
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/281253
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib16e380d97bd7bb55c5b5044a084fefbd039d599
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: coren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits