2023年政策修订增补工作正在进行中,欢迎参与!
  • Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

MediaWiki討論:Gadget-site-styles.css

萌娘百科,萬物皆可萌的百科全書!轉載請標註來源頁面的網頁連結,並聲明引自萌娘百科。內容不可商用。
跳至導覽 跳至搜尋

編輯請求 - Func

由Func提出的編輯請求:

狀態:   完成

將以下內容:

padding: 20px 30px;

修改為:

margin: 0px -1px;

默認的padding現在已經寫在element.style裏面,並且為更合理的1em,故去除。

加margin可以在{{人物信息}}等模板里的顯示更美觀。

—— Func討論·貢獻) 2020年6月20日 (六) 22:14 (CST)

並沒有寫入在模板內。——From AnnAngela the Temporary Bureaucrat (Talk) 2020年6月24日 (三) 09:04 (CST)
啊這,padding樣式是通過MediaWiki:Gadget-Tabs.js寫入的吧。(另外MediaWiki:Gadget-Tabs.js第88行初始化的時候有個textPadding沒有和前面的幾種預設統一)--Func討論·貢獻) 2020年6月24日 (三) 22:46 (CST)
{{Tabs/core}}默認不使用預設樣式,不能依賴預設樣式解決問題(可以先思考一下用戶指定值、用戶指定主題樣式值、js默認值、css默認值之間的優先級關係)。——From AnnAngela the Temporary Bureaucrat (Talk) 2020年6月25日 (四) 09:07 (CST)
啊,目前{{Tabs/core}}不加預設的默認padding確實是20px 30px,不是說依賴預設樣式,而是希望默認的表現能在padding上與預設一致……目前padding會被css和js分別寫兩次,所以我圖方便這樣申請,如果不合適,還請考慮只加上margin……還是說應該限制在td裏面……--Func討論·貢獻) 2020年6月25日 (四) 11:46 (CST)
margin也沒那麼美觀_(:зゝ∠)_——From AnnAngela the Temporary Bureaucrat (Talk) 2020年6月25日 (四) 22:22 (CST)
來了來了,因為要作用於TabContent啊……Special:固定連結/4096610Special:固定連結/4096632,不同圖片大小下的效果。--Func討論·貢獻) 2020年6月25日 (四) 23:32 (CST)
Help:沙盒/styles.css(TabLabel也一同選上效果更佳),不過我愣是沒看懂在Gadget-Tabs.css里.tab怎麼選擇到.Tabs的……--Func討論·貢獻) 2020年6月25日 (四) 23:40 (CST)
Done. 因為.tab是放在body上的。——From AnnAngela the Temporary Bureaucrat (Talk) 2020年6月26日 (五) 21:08 (CST)

編輯請求 - Bhsd - 2020.10.03

由Bhsd提出的編輯請求:

狀態:   完成

將以下內容:

body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off {
    transition: color .13s linear;
    color: #BA0000;
}

修改為:

body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu:hover .new {
    transition: color .13s linear;
    color: #BA0000;
}

添加一行選擇器,以解決提問求助區反饋的bug。這個編輯申請我有點猶豫,因為黑幕里的紅鏈不太看得清……是否要考慮對body:not(.heimu_toggle_on) .heimu:hover .new單獨換一個淺一點的紅色?——移動版用戶 Bhsd討論) 2020年10月3日 (六) 20:01 (CST)

Done.——From AnnAngela the Temporary Bureaucrat (Talk) 2020年10月3日 (六) 20:54 (CST)

編輯請求 - Leranjun - 2020.10.13

撤回的編輯請求

由Leranjun提出的編輯請求:

狀態:   撤回

將以下內容:

body:not(.heimu_toggle_on) .heimu:hover a,
body:not(.heimu_toggle_on) a:hover .heimu,
body:not(.heimu_toggle_on) .heimu.off a,
body:not(.heimu_toggle_on) a:hover .heimu.off {
    transition: color .13s linear;
    color: lightblue;
}
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu:hover .new {
    transition: color .13s linear;
    color: #BA0000;
}
修改為:
body:not(.heimu_toggle_on) .heimu:hover > a,
body:not(.heimu_toggle_on) a:hover > .heimu,
body:not(.heimu_toggle_on) .heimu.off > a,
body:not(.heimu_toggle_on) a:hover > .heimu.off {
    transition: color .13s linear;
    color: lightblue;
}
body:not(.heimu_toggle_on) .heimu.off > .new,
body:not(.heimu_toggle_on) .heimu.off > .new:hover,
body:not(.heimu_toggle_on) .new:hover > .heimu.off,
body:not(.heimu_toggle_on) .heimu.off > .new,
body:not(.heimu_toggle_on) .heimu.off > .new:hover,
body:not(.heimu_toggle_on) .new:hover > .heimu.off {
    transition: color .13s linear;
    color: #BA0000;
}
body:not(.heimu_toggle_on) .heimu:hover > .new {
    transition: color .13s linear;
    color: #FC494E;
}

添加>限制黑幕連結僅顯示一層。嘗試解決公版上提到的雙層黑幕的問題。順便改一下黑幕紅鏈的顏色。--ZhMGP:~ Leranjun$用戶頁討論頁貢獻乙方|33 2020年10月13日 (二) 20:17 (CST)

這個處理有點問題。即使黑幕里不額外定製內容,ruby裏面也可能會由於語言設置再套一層span。——移動版用戶 Bhsd討論) 2020年10月13日 (二) 21:03 (CST)
@Bhsd 啊,會嗎?公版上的那幾個黑幕好像都是沒問題的誒(包括ruby)。您方便給個沙盒連結嗎XD--ZhMGP:~ Leranjun$用戶頁討論頁貢獻工具人|11 2020年10月13日 (二) 21:14 (CST)
那是因為那幾個例子的ruby沒加語言參數。——移動版用戶 Bhsd討論) 2020年10月13日 (二) 21:36 (CST)
Symbol Circle OK.svg 了解 看來比我想像的麻煩啊(半惱)
那我先暫時撤回請求,在沙盒測試完畢後再回來申請。--ZhMGP:~ Leranjun$用戶頁討論頁貢獻優編|20 2020年10月13日 (二) 21:41 (CST)

由Leranjun提出的編輯請求:

狀態:   拒絕

將以下內容:

.heimu,
.heimu a,
a .heimu,
.heimu a.new {
    background-color: #252525;
    color: #252525;
    text-shadow: none;
}
body:not(.heimu_toggle_on) .heimu:hover,
body:not(.heimu_toggle_on) .heimu:active,
body:not(.heimu_toggle_on) .heimu.off {
    transition: color .13s linear;
    color: white;
}
body:not(.heimu_toggle_on) .heimu:hover a,
body:not(.heimu_toggle_on) a:hover .heimu,
body:not(.heimu_toggle_on) .heimu.off a,
body:not(.heimu_toggle_on) a:hover .heimu.off {
    transition: color .13s linear;
    color: lightblue;
}
body:not(.heimu_toggle_on) .heimu.off .new,
body:not(.heimu_toggle_on) .heimu.off .new:hover,
body:not(.heimu_toggle_on) .new:hover .heimu.off,
body:not(.heimu_toggle_on) .heimu:hover .new {
    transition: color .13s linear;
    color: #BA0000;
}

修改為:

.heimu,
.heimu a,
a .heimu,
.heimu a.new,
.heimu rt {
    background-color: #252525;
    color: #252525;
    text-shadow: none;
}

body:not(.heimu_toggle_on) .heimu:hover,
body:not(.heimu_toggle_on) .heimu:active,
body:not(.heimu_toggle_on) .heimu.off,
body:not(.heimu_toggle_on) .heimu rt:hover,
body:not(.heimu_toggle_on) .heimu.off rt {
    transition: color .13s linear;
    color: white;
}

body:not(.heimu_toggle_on) .heimu:hover>a,
body:not(.heimu_toggle_on) a:hover>.heimu,
body:not(.heimu_toggle_on) .heimu.off>a,
body:not(.heimu_toggle_on) a:hover>.heimu.off,
body:not(.heimu_toggle_on) .heimu:hover>span[lang]>a,
body:not(.heimu_toggle_on) .heimu rt:hover>a,
body:not(.heimu_toggle_on) .heimu rt:hover>span[lang]>a,
body:not(.heimu_toggle_on) .heimu rb:hover>a,
body:not(.heimu_toggle_on) .heimu:hover rb>a {
    transition: color .13s linear;
    color: lightblue;
}

body:not(.heimu_toggle_on) .heimu.off>.new,
body:not(.heimu_toggle_on) .heimu.off>.new:hover,
body:not(.heimu_toggle_on) .new:hover>.heimu.off,
body:not(.heimu_toggle_on) .heimu.off>.new,
body:not(.heimu_toggle_on) .heimu.off>.new:hover,
body:not(.heimu_toggle_on) .new:hover>.heimu.off {
    transition: color .13s linear;
    color: #BA0000;
}

body:not(.heimu_toggle_on) .heimu:hover>.new,
body:not(.heimu_toggle_on) .heimu:hover>span[lang]>.new,
body:not(.heimu_toggle_on) .heimu rt:hover>.new,
body:not(.heimu_toggle_on) .heimu rt:hover>span[lang]>.new,
body:not(.heimu_toggle_on) .heimu rb:hover>.new,
body:not(.heimu_toggle_on) .heimu:hover rb>.new {
    transition: color .13s linear;
    color: #FC494E;
}

再次嘗試修復黑幕的萬年坑。改動的地方包括對ruby及語言模板的處理、對嵌套黑幕的處理、以及黑幕中紅鏈的顏色等。

這段代碼通過了部分{{黑幕}}、{{lj}}和{{ruby}}的排列組合測試,見User:Leranjun/sandbox/heimu

如果採用的話,同時需要修改MediaWiki:Gadget-heimu-toggle.css以適應。

啊不行了我眼花了(滑稽哭)--ZhMGP:~ Leranjun$用戶頁討論頁貢獻優編|1 2020年10月13日 (二) 22:47 (CST)

(-)反對 萌百{{黑幕}}用量太大,不可能逐一檢查參數有無定製更多HTML結構,沒道理為了嵌套黑幕這一本就不提倡的用法冒風險修改CSS。——移動版用戶 Bhsd討論) 2020年10月13日 (二) 23:01 (CST)
如果一定要改的話,可以使用下面的思路(以下的代碼僅用作示例:
.heimu:hover {
  color:inherit;
  background:inherit;
}
.heimu:not(:hover) {
  color:transparent;
  background:black;
}
.heimu:hover a {
  color:#0645ad;
}
.heimu:not(:hover) a {
  color:transparent;
}
.heimu:hover .new {
  color:#ba0000;
}
.heimu:not(:hover) .new {
  color:transparent;
}

重點是保證:not(:hover)的優先級更高,比如這裏通過放在:hover之後實現。——移動版用戶 Bhsd討論) 2020年10月14日 (三) 04:59 (CST)

我不認為我們需要耗費精力在錯誤的模板使用上,尤其是這麼做還會引入後續的持續維護需求。如果發現有錯誤的黑幕模板用法,建議直接修改頁面。——From AnnAngela the Temporary Bureaucrat (Talk) 2020年10月14日 (三) 12:52 (CST)
@BhsdAnnAngela Symbol Circle OK.svg 了解 Face-smile.svg感謝 那至少可以把紅鏈顏色改一下嗎QAQ--ZhMGP:~ Leranjun$用戶頁討論頁貢獻EnMGP|28 2020年10月14日 (三) 13:07 (CST)
我已經在全站js里添加了對應代碼。——From AnnAngela the Temporary Bureaucrat (Talk) 2020年10月14日 (三) 13:17 (CST)

編輯請求 - MJH - 2021.08.03

由MJH提出的對MediaWiki:Gadget-site-styles.css的編輯請求:

狀態:   完成

增加以下內容:

.noconvins > .mw-charinsert-item::before{
	content: '-{';
}
.noconvins > .mw-charinsert-item::after{
	content: '}-';
}

MediaWiki:Edittools的編輯請求聯動,預期將能夠正確顯示插入「-{}-」的按鈕。在User:MJH/Sandbox#char有測試例子。

也算是完成紅夢子的一個夙願了。——拒絕互膜的M.Maya. J.Judge my soul. H.Heritage.【乾】{{#forargs:}} is evil! 2021年8月3日 (二) 14:55 (CST)

Done.——From AnnAngela the Bureaucrat (Talk) 2021年8月3日 (二) 19:19 (CST)

有一個屬性沒有用上

第252行(討論發出時的版本)關於locl的註釋,想法是很好的,最開始也是起到了作用的。可惜2019年4月13日的修改導致所有帶有lang屬性的span的字體都只能用initial(默認值),也就是說永遠用不了思源黑體以及其他可能的字體了,font-feature-settings: "locl" on;加了個寂寞。 あめろ 討論 2021年9月26日 (日) 03:22 (CST)

編輯請求-Ericliu1912-2021-12-09

由Ericliu1912提出的對MediaWiki:Gadget-site-styles.css的編輯請求:

狀態:   拒絕

增加以下內容:

cite {
    font-style: normal;
}

解決cite定位內文字顯示為斜體的問題。—— Eric Liu 創造は生命(留言 2021年12月9日 (四) 02:03 (CST)

(-)不支持 cite標籤斜體是瀏覽器默認行為,未見添加到全站CSS的必要性。——移動版用戶 Bhsd 2021年12月9日 (四) 02:12 (CST)
若確有令cite系列模板內文字非斜體需要,請嘗試改進模塊:Citation/CS1。—— ほしみ 2021年12月9日 (四) 02:32 (CST)
這套標準大概並不是為非拉丁文字設計的,看看該模組第五百五十行左右就明白了。斜體應用在本站常用的某些語言上真的很醜,考慮到語言常用程度,優先程度應當倒轉;但是讓中文斜體跟讓外文正體比起來,本站竟然打算選擇讓中文斜體?算了不多說了,裸ref了事,反正也沒多少人真的用Cite模板。—— Eric Liu 創造は生命(留言 2021年12月9日 (四) 23:29 (CST)
(+)支持 意大利體是西文排版的概念,Bhsd所謂的默認行為也是因為是標準按照西方的習慣制定的。但這裏是中文站點,中文排版裏面並沒有意大利體這個概念,強行把字傾斜只會增加閱讀難度。 あめろ 討論 2021年12月9日 (四) 23:35 (CST)

編輯請求 - あめろ - 2022.03.17

由あめろ提出的對MediaWiki:Gadget-site-styles.css的編輯請求:

狀態:   拒絕

增加以下內容:

.mw-parser-output span:target, span:target+.mw-headline {
	background: rgba(66,31,255,.2);
	border-radius: .2em;
	animation: bg-fade 1.3s ease-in .7s forwards;
}
@keyframes bg-fade {
	to {
		background: rgba(66,31,255,0);
	}
}

添加章節錨點、手動錨點跳轉時的提示效果。效果見Special:固定連結/5746213

.mw-parser-output限制效果僅在文章中,避免誤傷。rgba(66,31,255,0)不能改成transparent,因為不同瀏覽器行為不一致。—— あめろ 討論 2022年3月17日 (四) 22:24 (CST)

Done.—— 屠麟傲血討論) 2022年3月17日 (四) 22:30 (CST)
有需要可以修改自己的CSS。 —— ほしみ 2022年3月17日 (四) 22:35 (CST)

編輯請求 - BITSALLEE - 2022.04.14

由BITSALLEE提出的對MediaWiki:Gadget-site-styles.css的編輯請求:

狀態:   拒絕

將以下內容:

font-feature-settings: "locl"on; -webkit-font-feature-settings: "locl"on;

修改為:

font-feature-settings: "locl"=on; -webkit-font-feature-settings: "locl"=on;

在251行和252行可能存在錯誤——小狸卡討論) 2022年4月14日 (四) 19:43 (CST)

你認真的嗎? —— ほしみ 2022年4月14日 (四) 19:49 (CST)