Jump to content

更新模板樣式CSS過濾器,允許在模板中使用較新的CSS (Community Wishlist/W350/zh)

Done
From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page Community Wishlist/W350 and the translation is 100% complete.

View all wishes.

Description

目前,模板樣式(TemplateStyles)不允許使用許多現代格式和樣式(CSS)技術,包括:

  • 現代單位如lh,維基模板能用它來適應不同外觀使用的不同行高值
  • var()的某些調用,讓模板適應深色模式的關鍵函數
  • width: fit-content,讓模板無需強制設有預設固定寬度或跨越頁面的完整寬度
  • 出現在MediaWiki CSS中的媒體查詢,例如@supports ( mask-image: none; ),如果我們想要覆寫某些核心CSS樣式(例如CategoryTree),就需要使用這些查詢。

對模板創建者和維護者而言,這極為令人沮喪,並導致以下兩種情況:一、創建權宜解決方案,這些方案無疑會在某些裝置/皮膚外觀失效;二、不得不在MediaWiki:Common.css中放置樣式,這不僅會增加頁面大小,更會加重維護負擔。

CSS過濾器應該要定期更新。

此外,為了避免浪費時間,我們需要在預覽時就看到過濾器警告,而非儲存後才出現。

Assigned focus area

Unassigned

Type of wish
I'm not sure or I don't know
Tags
Affected users

模板編輯者與維護者、(間接影響)介面管理員——以及最終受益於現代化、無障礙且自適應樣式設計的讀者們

Phabricator tasks
Other details
Voting

This wish currently has 1 supporter. Supporting this wish is currently disabled.

Supporters of this wish
Support This, that and the other (talk) 11:30, 9 January 2025