Remove mw-body-content from HTML that is not the article body

The `mw-body-content` class is currently decorating various things,
however should be limited to the body of the article. This allows
us to identify the wrapping element without resorting to a selector
that makes use of an identifier and to separate styling concerns of
UI (indicators and site notice) from article content.

Bug: T279388
Change-Id: I4c1b15d90bacbc9b13782a1d8f52e838ce8ecd83
This commit is contained in:
Jdlrobson 2021-04-26 16:25:30 -07:00
parent 63f9dd81e3
commit efaf3aadf3
4 changed files with 6 additions and 8 deletions

View file

@ -1,5 +1,5 @@
{{! @typedef Indicator[]}} {{! @typedef Indicator[]}}
<div class="mw-indicators mw-body-content"> <div class="mw-indicators">
{{#array-indicators}} {{#array-indicators}}
<div id="{{id}}" class="{{class}}">{{{html}}}</div> <div id="{{id}}" class="{{class}}">{{{html}}}</div>
{{/array-indicators}} {{/array-indicators}}

View file

@ -29,10 +29,10 @@
<div id="mw-head-base" class="noprint"></div> <div id="mw-head-base" class="noprint"></div>
<div id="content" class="mw-body" role="main"> <div id="content" class="mw-body" role="main">
<a id="top"></a> <a id="top"></a>
<div id="siteNotice" class="mw-body-content">{{{html-site-notice}}}</div> <div id="siteNotice">{{{html-site-notice}}}</div>
{{>Indicators}} {{>Indicators}}
<h1 id="firstHeading" class="firstHeading" {{{html-user-language-attributes}}}>{{{html-title}}}</h1> <h1 id="firstHeading" class="firstHeading" {{{html-user-language-attributes}}}>{{{html-title}}}</h1>
<div id="bodyContent" class="mw-body-content"> <div id="bodyContent">
{{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}} {{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}}
<div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div> <div id="contentSub"{{{html-user-language-attributes}}}>{{{html-subtitle}}}</div>
<div id="contentSub2">{{{html-undelete-link}}}</div> <div id="contentSub2">{{{html-undelete-link}}}</div>

View file

@ -48,7 +48,7 @@
{{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }} {{! `role` is unnecessary but kept to support selectors in any gadgets or user styles. }}
<main id="content" class="mw-body" role="main"> <main id="content" class="mw-body" role="main">
<a id="top"></a> <a id="top"></a>
<div id="siteNotice" class="mw-body-content">{{{html-site-notice}}}</div> <div id="siteNotice">{{{html-site-notice}}}</div>
{{^is-language-in-header}} {{^is-language-in-header}}
{{>Indicators}} {{>Indicators}}
@ -70,7 +70,7 @@
</header> </header>
{{/is-language-in-header}} {{/is-language-in-header}}
<div id="bodyContent" class="mw-body-content"> <div id="bodyContent">
{{^is-language-in-header}} {{^is-language-in-header}}
{{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}} {{#is-article}}<div id="siteSub" class="noprint">{{msg-tagline}}</div>{{/is-article}}
{{/is-language-in-header}} {{/is-language-in-header}}

View file

@ -100,7 +100,6 @@
"skins.vector.styles.legacy": { "skins.vector.styles.legacy": {
"class": "ResourceLoaderSkinModule", "class": "ResourceLoaderSkinModule",
"features": { "features": {
"content-parser-output": true,
"normalize": true, "normalize": true,
"elements": true, "elements": true,
"content": true, "content": true,
@ -124,8 +123,7 @@
"elements": true, "elements": true,
"content": true, "content": true,
"interface": true, "interface": true,
"legacy": true, "legacy": true
"content-parser-output": true
}, },
"targets": [ "targets": [
"desktop", "desktop",