MediaWiki talk:Gadget-site.css: Difference between revisions

From mediawiki.org
Content deleted Content added
Line 33: Line 33:
:The only interaction I don't really understand is ombox. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 16:30, 9 July 2021 (UTC)
:The only interaction I don't really understand is ombox. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 16:30, 9 July 2021 (UTC)
::Secondly, these should definitely be loaded via the module and should have names like so, like perhaps [[Module:Message box/ambox.css]]. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 16:31, 9 July 2021 (UTC)
::Secondly, these should definitely be loaded via the module and should have names like so, like perhaps [[Module:Message box/ambox.css]]. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 16:31, 9 July 2021 (UTC)
:::In&nbsp;that&nbsp;case, how&nbsp;about: <!-- --><table class="wikitable"><!-- --><tr><!-- --><th scope="col" colspan="2">Page</th><!-- --><th scope="col">Description</th><!-- --></tr><!-- --><tr><!-- --><th scope="row" style="text-align:left">Base styles</th><!-- --><td><!-- -->[[Module:Message box/core.css]] (my&nbsp;preference)<br/><!-- -->or [[Module:Message box/styles.css]]<!-- --></td><!-- --><td>Contains the base {{inline-code|lang=css|.mbox}} styles.</td><!-- --></tr><!-- --><tr><!-- --><th scope="row" style="text-align:left">Per-namespace styles</th><!-- --><td> {{Unbulleted list<!-- -->|[[Module:Message box/ambox.css]]<!-- -->|[[Module:Message box/cmbox.css]]<!-- -->|[[Module:Message box/fmbox.css]]<!-- -->|[[Module:Message box/imbox.css]]<!-- -->|[[Module:Message box/ombox.css]]<!-- -->|[[Module:Message box/tmbox.css]]<!-- -->}}</td><!-- --><td>Contains the specialised per-namespace message box styles.</td><!-- --></tr><!-- --><tr><!-- --><th scope="row" style="text-align:left">Base styles</th><!-- --><td>[[Module:Message box/small.css]]</td><!-- --><td>What [[Template:Mbox/small.css]] currently contains.</td><!-- --></tr><!-- --></table> —&nbsp;[[User:ExE&nbsp;Boss|ExE&nbsp;Boss]] ([[User&nbsp;talk:ExE&nbsp;Boss|<span class="signature-talk" style="white-space:nowrap">{{int:talkpagelinktext}}</span>]]) 13:40, 10 July 2021 (UTC)
:::In&nbsp;that&nbsp;case, how&nbsp;about: <!--
::::Right, I really don't think or want in reality to have the base styles separate from each of the per-namespace pages. As I said, the ambox ".ambox + .ambox" rule is a PITA to have to deal with when you have TemplateStyles (see what I had to do for [[Module:Navbox/styles.css]]). While none of the others have it, that becomes enough to just say 'have the per-namespace styles' with the duplication and then go from there.
--><table class="wikitable"><!--
::::I also have a mind to making the names nice for the abusefilter on Wikidata which prevents the creation of items for styles pages, which requires pagenames like "/styles.css", so not sure if there's a nice way to fit that into things. Probably not.... [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 02:14, 11 July 2021 (UTC)
--><tr><!--
--><th scope="col" colspan="2">Page</th><!--
--><th scope="col">Description</th><!--
--></tr><!--
--><tr><!--
--><th scope="row" style="text-align:left">Base styles</th><!--
--><td><!--
-->[[Module:Message box/core.css]] (my&nbsp;preference)<br/><!--
-->or [[Module:Message box/styles.css]]<!--
--></td><!--
--><td>Contains the base {{inline-code|lang=css|.mbox}} styles.</td><!--
--></tr><!--
--><tr><!--
--><th scope="row" style="text-align:left">Per-namespace styles</th><!--
--><td> {{Unbulleted list<!--
-->|[[Module:Message box/ambox.css]]<!--
-->|[[Module:Message box/cmbox.css]]<!--
-->|[[Module:Message box/fmbox.css]]<!--
-->|[[Module:Message box/imbox.css]]<!--
-->|[[Module:Message box/ombox.css]]<!--
-->|[[Module:Message box/tmbox.css]]<!--
-->}}</td><!--
--><td>Contains the specialised per-namespace message box styles.</td><!--
--></tr><!--
--><tr><!--
--><th scope="row" style="text-align:left">Base styles</th><!--
--><td>[[Module:Message box/small.css]]</td><!--
--><td>What [[Template:Mbox/small.css]] currently contains.</td><!--
--></tr><!--
--></table> —&nbsp;[[User:ExE&nbsp;Boss|ExE&nbsp;Boss]] ([[User&nbsp;talk:ExE&nbsp;Boss|<span class="signature-talk" style="white-space:nowrap">{{int:talkpagelinktext}}</span>]]) 13:40, 10 July 2021 (UTC)

Revision as of 02:14, 11 July 2021

Code direction

Hello. Codes in rtl languages like Persian are broken because the right-to-left structure is applied to them. By adding this command, you can prevent the codes from being right-aligned so that their readability is not lost:

pre, code {
  direction: ltr
}

Thanks. Alireza Ivaz (talk) 07:35, 10 September 2020 (UTC)Reply

The above code won’t work. ResourceLoader “helps” by flipping directions in right-to-left languages, so the above code will be transformed into direction: rtl if the user interface language is RTL. This function can be disabled, luckily:
pre, code {
	/* @noflip */
	direction: ltr;
}
—Tacsipacsi (talk) 11:27, 13 September 2020 (UTC)Reply

Last to TemplateStyles: mbox and MediaWiki:Gadget-enwp-boxes.css

Just starting a section here for working space. I can see they've been split on template lines to templatestyles but these really should be loaded from Module:Message box. Just need to sort out... how? What the actual split should be for the generic styles? Izno (talk) 23:22, 7 July 2021 (UTC)Reply

I’ve already done some work on this on the Meta‑Wiki, in the order of loading:
  1. m:Template:Mbox/styles.css
    Used by all Message Box templates.
  2. m:Template:[A|C|F|I|O|T]mbox/styles.css
    Used by the relevant Message Box subclass.
  3. m:Template:Mbox/small.css (also in: Template:Mbox/small.css)
    Used when |small= is set to a truthy value.
Note that these aren’t currently used outside of my userpage, which is so that the “in other projects” box displays correctly on wikis that don’t include MediaWiki:Gadget-enwp-boxes.css in their MediaWiki:Common.css. — ExE Boss (talk) 01:30, 8 July 2021 (UTC)Reply
Yeah, splitting Mbox and small to separate sheets isn't great because to get the ambox negative margin rules to work is a PITA in conjunction with per-ambox TStyles. My inclination is to add those to each of the kinds of box sheets, which are mostly used mutually exclusively to a specific page/namespace (i.e. we won't be loading multiple of the same styles regardless, even if there were a lot of styles to duplicate).
The only interaction I don't really understand is ombox. Izno (talk) 16:30, 9 July 2021 (UTC)Reply
Secondly, these should definitely be loaded via the module and should have names like so, like perhaps Module:Message box/ambox.css. Izno (talk) 16:31, 9 July 2021 (UTC)Reply
In that case, how about:
PageDescription
Base stylesModule:Message box/core.css (my preference)
or Module:Message box/styles.css
Contains the base .mbox styles.
Per-namespace styles Contains the specialised per-namespace message box styles.
Base stylesModule:Message box/small.cssWhat Template:Mbox/small.css currently contains.
— ExE Boss (talk) 13:40, 10 July 2021 (UTC)Reply
Right, I really don't think or want in reality to have the base styles separate from each of the per-namespace pages. As I said, the ambox ".ambox + .ambox" rule is a PITA to have to deal with when you have TemplateStyles (see what I had to do for Module:Navbox/styles.css). While none of the others have it, that becomes enough to just say 'have the per-namespace styles' with the duplication and then go from there.
I also have a mind to making the names nice for the abusefilter on Wikidata which prevents the creation of items for styles pages, which requires pagenames like "/styles.css", so not sure if there's a nice way to fit that into things. Probably not.... Izno (talk) 02:14, 11 July 2021 (UTC)Reply