MediaWiki talk:Common.css

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
MediaWiki:Common.css forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to MediaWiki:Common.css, add {{Edit request}} to this talk page, followed by a description of your request.
This interface message or skin may be documented on mediawiki.org or translatewiki.net.
SpBot archives all sections tagged with {{Section resolved|1=~~~~}} after 3 days. For the archive overview, see Special:PrefixIndex/MediaWiki talk:Common.css/Archive.

Excesive padding for the Babel extension[edit]

I finally changed to Babel extension, but when placing them in my Userpage, it shows excessive margin in the left (see the screenshots bellow). I resolved them by removing the statements correspondients to the lines 925 and 927, as following:

@@ -922,9 +922,7 @@
 table.mw-babel-wrapper {
     margin:0em;
     margin-bottom:0.5em;
-    margin-left: 1em;
     background-color: transparent;
-    width:250px;
     border-spacing:2px;
 }

Then, in the line 394, reduce the widt of the cells form 238px to 232px:

@@ -931,7 +931,7 @@
 .mw-babel-notabox {
     margin-left: auto;
     margin-right: auto;
-    width: 232px;
+    width: 238px;
 }
 .mw-babel-box-level-N  {

This will result in more accurate Babel tables that will fit better inside user wikitables.

The following screenshots illustrates better that I try to explain:

Any comments are welcome. Amitie 10g (talk) 04:33, 1 August 2014 (UTC)[reply]

This is only true if you are using babel inside use boxes. If you use user boxes and babel as siblings, it looks like this, this, this, this, this, this and this. And I wonder whether there are users who filled their user page with text so if we remove the margin, they will end up with the text (nearly) running into the babel box. -- Rillke(q?) 08:58, 1 August 2014 (UTC)[reply]
Thanks. That's that I need. --Amitie 10g (talk) 19:18, 1 August 2014 (UTC)[reply]

As an anecdote, I'm here 3 years later because .mw-babel-notabox { margin-left: auto; margin-right: auto; } causes my global user page to render incorrectly on Commons. TheDragonFire (talk) 15:31, 27 April 2017 (UTC)[reply]

/Mboxes.css[edit]

What is the reason for MediaWiki:Common.css/Mboxes.css with this huge insert?? This classes are only 1:1 copy from the EnWP and have no really sense here. I have only recently installed a class there where they only makes sense. (@Adrignola: ) User: Perhelion (Commons: = crap?)  19:05, 23 June 2015 (UTC)[reply]

There is no net gain in placing .mbox classes in their own file, and then @importing it into Common.css. In fact, that only adds an extra HTTP request. Apparently, the devs disabled the use of @import, probably due to security risks. -- [[User:Edokter]] {{talk}} 11:21, 16 September 2015 (UTC)[reply]
Sorry, that was not what I meant, I mean the most classes per se are here completely pointless and unused (I've also talked with some other users concrete about this, like User:FDMS4).User: Perhelion (Commons: = crap?)  12:21, 16 September 2015 (UTC)[reply]
{{Mbox}}? --Steinsplitter (talk) 12:24, 16 September 2015 (UTC)[reply]
I self inserted the classes there (as linked above). So this seems the only exception.User: Perhelion (Commons: = crap?)  12:30, 16 September 2015 (UTC)[reply]
Next try (after 3 years): Commons:Village pump#Cleanup Common.css -- User: Perhelion 12:23, 5 February 2018 (UTC)[reply]

Cleaning up message box CSS[edit]

All this classes should now be converted to TemplateStyles, which are unfortunately the main part of this CSS. Compare en:MediaWiki talk:Common.css #Cleaning up message box CSS and phab:T228604 and #/Mboxes.css -- User: Perhelion 17:29, 19 August 2019 (UTC)[reply]

Wrap long strings in File history's "Comments" table cell[edit]

{{Edit request}}

Please add the following CSS:

/* Workaround for T270741 */
.filehistory td:last-child {
    word-break: break-word;
    min-width: 10em;
}
.listfiles td.TablePager_col_img_description {
    word-break: break-word;
    min-width: 10em;
}

Thanks, ᴀlbanɢeller (talk) 22:47, 21 May 2021 (UTC)[reply]

@Tacsipacsi: would this be OK? ᴀlbanɢeller (talk) 22:56, 21 May 2021 (UTC)[reply]
@Neveselbert (mobile): I hope so. (P.S. There’s no need to keep to edit requests open for the same request, so I deactivated the other one.) —Tacsipacsi (talk) 22:48, 22 May 2021 (UTC)[reply]
✓ Done Awesome! Thank you! 4nn1l2 (talk) 23:39, 23 May 2021 (UTC)[reply]

Protection warning[edit]

{{Edit request}}

Please add:

/* Remove bullets when there are multiple edit page warnings */
ul.permissions-errors > li {
	list-style: none none;
}

ul.permissions-errors {
	margin: 0;
}

It's about the cascade protected message. When it shows up when it's protected manually and also cascade protected, there's a bullet. أحمدمحمدرمضانسعيد (talk) 13:30, 15 July 2021 (UTC)[reply]

@أحمدمحمدرمضانسعيد:  Not done This was previously requested and declined because there was no clear reason for the change. I still don't see what this is supposed to fix. --AntiCompositeNumber (talk) 21:52, 16 February 2022 (UTC)[reply]

Fix jitteriness on iOS[edit]

{{Edit request}} See en:Wikipedia:Village pump (technical)#What is happening for a request from WMF developer Jdlrobson (at 17:18, 22 May 2022 (UTC)) to work around a bug related to responsive layout. DMacks (talk) 18:50, 22 May 2022 (UTC)[reply]

 Not done, it has been fixed now. -- CptViraj (talk) 03:10, 25 May 2022 (UTC)[reply]

hlist plainlist[edit]

Please add the following to allow plainlist and hlist to work together:

.hlist.plainlist dd:before, .hlist.plainlist dd:after,
.hlist.plainlist dt:before, .hlist.plainlist dt:after,
.hlist.plainlist li:before, .hlist.plainlist li:after {
	content: none;
}

Without it, there is no way to override the interpuncts in hlist, which is useful when unordered lists are used to make certain objects more accessible to screen readers. Ahecht (TALK
PAGE
) 18:29, 2 June 2022 (UTC)[reply]

Why would you do that? It may be useful for users of screen readers, but a list without any delimiters is not very usable for sighted users. plainlist is clearly delimited by the line breaks, hlist is clearly delimited by the interpuncts, but if neither of them is present, the list items are visually indistinguishable. —Tacsipacsi (talk) 07:34, 3 June 2022 (UTC)[reply]
 Not done no consensus. —‍Mdaniels5757 (talk • contribs) 03:57, 11 October 2022 (UTC)[reply]
If there is actually a use case for this, it would be better served with TemplateStyles instead of addming more to Common.css. AntiCompositeNumber (talk) 04:05, 11 October 2022 (UTC)[reply]

Change fixed width to automatic[edit]

{{Edit request}}

Please change to the following:

Line 999: Line 999:
.listfiles .TablePager_col_img_description { .listfiles .TablePager_col_img_description {
word-break: break-word; word-break: break-word;
min-width: 10em; min-width: auto;
} }

The fixed 10em width causes overflowing issues on narrower screens. ᴀlbanɢeller (talk) 16:27, 21 January 2023 (UTC)[reply]

✓ Done Awesome! Thank you! —‍Mdaniels5757 (talk • contribs) 23:16, 25 February 2023 (UTC)[reply]

adding alternance style for tables[edit]

Heya, there is an alternance style defined on some wikis (including the french one).
This allows for tables to be displayed with different value of grey.
This would allow to not manually mess with the color code of each line of the tables.
The discussion was risen in Commons:Bistro#Commons:Deceased_contributors_:_128_en_attente_en_page_de_discussion
The corresponding code is here Commons:Deceased_contributors/style.css.
Esby (talk) 10:10, 17 October 2023 (UTC)[reply]

You should use TemplateStyles these days. It doesn’t bloat CSS on all pages for a such rarely-used feature, and you can also create it yourself. —Tacsipacsi (talk) 21:06, 17 October 2023 (UTC)[reply]
That does not seems to work.
1 I am getting a Page Template:Deceased contributors/style.css has no content. error when attempting to use it on the given page.
2 created for that Template:Deceased_contributors_style.css
I tried to use <templatestyles src="Deceased_contributors_style.css" /> same error.
3 I cannot create Deceased_contributors/style.css for some reason it checks for the syntax of the template.
The documentation is saying subpage, but apparently, i cannot create a subpage without triggering the validation of the template ?
Esby (talk) 12:27, 19 October 2023 (UTC)[reply]

The documentation is saying subpage, but apparently, i cannot create a subpage without triggering the validation of the template ?

It’s because only template/module subpages ending with .css are treated as stylesheets by default. (Admins can change this for individual pages, making other pages stylesheets or these pages non-stylesheets.) And yes, validation runs for stylesheets to prevent accidental or malicious introduction of invalid syntax, selectors, rules etc. (If validation doesn’t run, it’s because the page you chose is not treated as a stylesheet, so you won’t be able to use it in <templatestyles>.) However, I don’t see anything in Commons:Deceased contributors/style.css that should be caught by the validation, what does it complain about? —Tacsipacsi (talk) 18:19, 19 October 2023 (UTC)[reply]
an error in french, "Liste de sélecteur non valide à la ligne 9, caractère 1." (list of selector not valid at line 9 - character 1)
which is corresponding to this line table:is(.alternance, .alternance2) > * > tr > th {
Esby (talk) 21:45, 24 October 2023 (UTC)[reply]
I think it’s the :is() that TemplateStyles doesn’t allow – it’s a relatively new thing, supported only by browsers released in the past 2-3 years, which is way less than what Wikimedia/MediaWiki normally supports. If you want to support both alternance and alternance2, you need to rewrite it as table.alternance > * > tr > th, table.alternance2 > * > tr > th {. —Tacsipacsi (talk) 22:24, 24 October 2023 (UTC)[reply]
now it is triggering the abuse filter. "Galleries with no gallery tag"... Esby (talk) 12:44, 26 October 2023 (UTC)[reply]
Because you tried to create it in the gallery (main) namespace. TemplateStyles pages don’t belong there; they belong in the template or module namespace. If you used the template namespace, the abuse filter wouldn’t catch you. —Tacsipacsi (talk) 22:17, 26 October 2023 (UTC)[reply]
✓ DoneThanks! It is working.
I modified the corresponding wiki page to use the css.
I also renamed it to Template:Table_Alternance/Style.css so it can be used else where if needed.
Esby (talk) 10:07, 27 October 2023 (UTC)[reply]

Remove text-align: justify;[edit]

{{Edit request}} A lot needs to be done about message boxes on Commons, but removing text-align: justify from the rules for .messagebox and .notice would be a good start: justified alignment is considered outdated in web design and looks ugly especially on small screens.

Compare:

You would need to remove

 text-align: justify;

from two lines. Thank you. Jack who built the house (talk) 10:29, 15 December 2023 (UTC)[reply]

P.S. Haha, it even made its way into my request. Terrible margins btw, but that's for another round. Jack who built the house (talk) 10:34, 15 December 2023 (UTC)[reply]
✓ Done https://bash.toolforge.org/quip/AU7VTh4a6snAnmqnK_oj --Lucas Werkmeister (talk) 17:25, 5 January 2024 (UTC)[reply]

Remove bullets when there are multiple edit page errors[edit]

It is requested that an edit or modification be made to this protected page.
Administrators: Please apply <nowiki> or {{Tl}} to the tag after the request is fulfilled.

2604:3D08:9476:BE00:20C9:491B:5951:7E35

When a page is both manually protected, and transcluded in a cascade-protected page at the same time, I see two bullets on the side of the MediaWiki:Cascadeprotected warning message. Also, the bullets destroy the formatting of MediaWiki:Blockedtext.

I suggest doing what some other Wikimedia wikis do: to "remove bullets when there are multiple edit page errors". Code: ul.permissions-errors{margin:0}, ul.permissions-errors > li {list-style:none}. 2604:3D08:9476:BE00:20C9:491B:5951:7E35 18:56, 28 March 2024 (UTC)[reply]