As I said above you can't add rules for these classes with TemplateStyles.
All CSS selectors gets `.mw-parser-output` prepended to them. You can see
that in the style element added by TemplateStyles:
> <style data-mw-deduplicate="TemplateStyles:r232810888">
> .mw-parser-output .mw-parser-output {
> background-color: #E8EFFB;
> border: 5px double #aeb3bc;
> margin-top: 10px;
>
padding: 20px;
> width:98%
> }</style>
>
In this case it will look for a `.mw-parser-output` in another
`.mw-parser-output`, which there are none. There may be some clever CSS
trick to somehow get this to work, but I don't know what that would be.
*Sebastian Berlin*
Utvecklare/*Developer*
Wikimedia Sverige (WMSE)
E-post/*E-Mail*: [email protected]
Telefon/*Phone*: (+46) 0707 - 92 03 84
On Fri, 14 Apr 2023 at 13:54, Martin Domdey <[email protected]> wrote:
> Hi Sebastian,
>
> thanks for your reply, but it doesn't work for me.
>
> I tried it with .bodyContent and .mw-parser-output
>
> Please see css:
> https://de.wikipedia.org/wiki/Benutzer:Doc_Taxon/TestA/styles.css
> Please see page: https://de.wikipedia.org/wiki/Benutzer:Doc_Taxon/TestA (there
> are no styled background color and double borders)
>
> Is there anything that overrides the .bodyContent and .mw-parser-output
> classes?
>
> Kind regards
> Doc Taxon ...
>
>
>
>
> Am Fr., 14. Apr. 2023 um 08:36 Uhr schrieb Sebastian Berlin <
> [email protected]>:
>
>> That would be `mw-parser-output` or possibly `mw-parser-output` or
>> `bodyContent` depending on how you define the body. However, the styles
>> added by TemplateStyles are scoped to `mw-parser-output`, as explained in
>> mw.Extension:TemplateStyles#Caveats
>> <https://www.mediawiki.org/wiki/Extension:TemplateStyles#Caveats>. This
>> means you can't add rules to it or anything higher up in the DOM. I don't
>> think you can do what you want (without adding a wrapper) with
>> TemplateStyles.
>>
>> *Sebastian Berlin*
>> Utvecklare/*Developer*
>> Wikimedia Sverige (WMSE)
>>
>> E-post/*E-Mail*: [email protected]
>> Telefon/*Phone*: (+46) 0707 - 92 03 84
>>
>>
>> On Fri, 14 Apr 2023 at 01:20, Martin Domdey <[email protected]> wrote:
>>
>>> css (commented out):
>>> https://de.wikipedia.org/wiki/Benutzer:Doc_Taxon/TestA/styles.css
>>> page: https://de.wikipedia.org/wiki/Benutzer:Doc_Taxon/TestA
>>>
>>> Hi, I want to style the page body content with light blue background and
>>> double border like given in linked css (commented out). This style should
>>> be for the whole page body content of
>>> https://de.wikipedia.org/wiki/Benutzer:Doc_Taxon/TestA , but I don't
>>> want to use a div container for this.
>>>
>>> What is the id name or class name for the whole page body content to set
>>> the page style like given in linked css?
>>>
>>> Thanks for any help.
>>>
>>> Martin
>>>
>>> _______________________________________________
>>> Wikitech-l mailing list -- [email protected]
>>> To unsubscribe send an email to [email protected]
>>>
>>> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>>
>> _______________________________________________
>> Wikitech-l mailing list -- [email protected]
>> To unsubscribe send an email to [email protected]
>>
>> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
>
> _______________________________________________
> Wikitech-l mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
_______________________________________________
Wikitech-l mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/