MediaWiki talk:Common.css: Difference between revisions
Appearance
Latest comment: 3 years ago by Izno in topic Last to TemplateStyles: mbox and MediaWiki:Gadget-enwp-boxes.css
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 that case, how 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 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> — [[User:ExE Boss|ExE Boss]] ([[User talk:ExE Boss|<span class="signature-talk" style="white-space:nowrap">{{int:talkpagelinktext}}</span>]]) 13:40, 10 July 2021 (UTC) |
|||
:::In that case, how 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 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> — [[User:ExE Boss|ExE Boss]] ([[User talk:ExE 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
Archives
| |
---|---|
| |
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)
- 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:—Tacsipacsi (talk) 11:27, 13 September 2020 (UTC)pre, code { /* @noflip */ direction: ltr; }
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)
-
I’ve already done some work on this on the Meta‑Wiki, in the order of loading:
- m:Template:Mbox/styles.css
Used by all Message Box templates. - m:Template:[A|C|F|I|O|T]mbox/styles.css
Used by the relevant Message Box subclass. - m:Template:Mbox/small.css (also in: Template:Mbox/small.css)
Used when|small=
is set to a truthy value.
- 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)
- 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)
- In that case, how about:
— ExE Boss (talk) 13:40, 10 July 2021 (UTC)Page Description Base styles Module:Message box/core.css (my preference)
or Module:Message box/styles.cssContains the base .mbox
styles.Per-namespace styles Contains the specialised per-namespace message box styles. Base styles Module:Message box/small.css What Template:Mbox/small.css currently contains. - 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)
- In that case, how about:
- 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)
- m:Template:Mbox/styles.css