金箔金命是什么意思| 雌二醇低吃什么补得快| 母仪天下什么意思| 7月27日什么星座| 晕车药叫什么名字| 势不可挡是什么意思| 调节是什么意思| 斩金念什么| 手腕疼痛是什么原因| 什么的水流| 枸橼酸西地那非片是什么药| 什么是回避型依恋人格| 高血压饮食上注意什么| 神经系统是由什么组成的| 一个均一个金念什么| 什么叫色弱| 失眠睡不着是什么病| 皮蛋是什么蛋| 重庆有什么特产| 吃多种维生素有什么好处和坏处| 牙龈萎缩是什么样子| 举世无双什么意思| 纸上谈兵是什么生肖| 眼角流泪是什么原因| 氯雷他定片主治什么病| 1973属什么生肖| 谁也不知道下一秒会发生什么| 人为什么要喝酒| 文静是什么意思| 总是失眠是什么原因| 弯的直的什么意思| 身上老是痒是什么原因| klf是什么意思| 食用植物油是什么油| 脑残是什么意思| 浑身出汗是什么原因| 榴莲什么时候吃最好| 2037年是什么年| 对药物过敏是什么症状| 凤毛麟角什么意思| 上大便出血是什么原因| 鲱鱼为什么那么臭| 没脑子是什么意思| 工科和理科有什么区别| 人工受孕和试管婴儿有什么区别| 0m是什么意思| 开边珠牛皮是什么意思| 轻度脑萎缩是什么意思| 就坡下驴什么意思| 日光性皮炎用什么药膏| 冬瓜有什么功效| 唐氏综合征是什么原因造成的| 口干舌燥是什么病| 招待是什么意思| 刺史相当于现在什么官| 小厮是什么意思| 肺气不足吃什么食物可以补肺气| 脑多普勒检查什么| 为什么老打哈欠| 哺乳期抽烟对宝宝有什么影响| 微量元素六项是什么检查| 什么宽带网速快又便宜| 肠道肿瘤有什么症状| 虚是什么意思| 痞闷什么意思| 什么是刷酸| 心阳虚吃什么中成药| 肝血不足吃什么食补最快| 大便青黑色是什么原因| 牙齿为什么会掉| 做什么能快速赚钱| 10.31什么星座| 今期难过美人关是什么生肖| bbc是什么意思| 久卧伤气是什么意思| 海豚吃什么食物| 蚧壳虫用什么药| 7月14日是什么日子| 世交是什么意思| 男人本色是什么意思| 怀孕吃什么水果最好| 21年是什么生肖年| 血管瘤是什么引起的| 降尿酸什么药最好| 睾丸潮湿是什么原因| 安逸什么意思| 1900年属什么生肖| 腿上起水泡是什么原因| 什么动物寿命最短| 什么是逆向思维| 打扰是什么意思| 什么是沉香| 指甲空了是什么原因| 下水道井盖为什么是圆的| 臆想是什么意思| hf是什么| 张家界为什么叫张家界| 如履薄冰是什么意思| 胎位loa是什么位置| 刚怀孕初期吃什么好呢| 不老实是什么意思| 细菌性阴道炎是什么原因引起的| 赡养是什么意思| 伤感是什么意思| 手经常抖是什么原因| 吃什么对卵巢好| 腔梗是什么意思| 梦见戴帽子是什么预兆| 做什么动作可以长高| 冠冕堂皇是什么意思| 六月二十四是什么星座| 尿偏红色是什么原因| 铜绿是什么| 牛肉饺子馅配什么蔬菜好吃| 儿童便秘吃什么最快排便| 脸上为什么会长痣| 早上7点到9点是什么时辰| 风寒感冒吃什么药| 为什么单位不愿意申请工伤| 人体缺硒会有什么症状| 团长转业到地方是什么职务| 什么茶助眠| 肝火旺盛吃什么药好| 主任是什么意思| national是什么牌子| 皮角是什么病| 六味地黄丸的功效是什么| 喝什么茶叶减肥效果最好| no2是什么| 紫苏泡酒有什么功效| 电饼铛什么牌子好| 矢的意思是什么| 眼睛流眼泪用什么眼药水| 牛犇是什么意思| 本科二批是什么意思| 户口分户需要什么条件| 双侧颈部淋巴结可见是什么意思| 糖尿病人早餐吃什么| 口腔溃疡吃什么药好| 贞洁是什么意思| 沙龙是什么| 朋友妻不可欺是什么意思| 画饼什么意思| 开水烫伤用什么方法好的最快| 信手拈来是什么意思| 2月8号什么星座| 什么网站可以看黄片| 嫌恶是什么意思| 激素六项什么时间查最好| 褪黑素有什么用| 素来是什么意思| 血压低有什么症状| 坤造是什么意思| 纳入是什么意思| 大便潜血弱阳性是什么原因| 小腹痛吃什么药| 为什么会低血糖| 花中君子是什么| 脚踝肿什么原因| 沄字五行属什么| 大熊猫吃什么| 什么是行政处罚| 皮革胃是什么意思| fda什么意思| 盗汗挂什么科| 木牛流马是什么意思| 夫妻分床睡意味着什么| 眼泪多是什么原因| 淋巴细胞数高说明什么| 型男是什么意思| 玻璃五行属什么| 眼皮发黑是什么原因| 白萝卜什么时候种| 985211大学是什么意思| 爿是什么意思| 什么是中医| 乳头瘤有什么症状| 有所作为的意思是什么| 什么数字最听话| 一千年前是什么朝代| 九月二十四号是什么星座| 经常流鼻血什么原因| 幽门螺旋杆菌吃什么药| 藏红花和什么一起泡水喝效果好| 啤酒加生鸡蛋一起喝有什么效果| 蚯蚓中药叫什么| 真菌性龟头炎用什么药| def是什么意思| 山东属于什么气候| 格林巴利综合症是什么| 什么是民间故事| nm是什么单位| 嗓子干痒咳嗽吃什么药| 猪蹄和什么一起炖好吃| 为什么会得炎症| 输液葡萄糖有什么作用| bpd是胎儿的什么| 农历八月是什么月| bull是什么意思| 女性内分泌失调有什么症状| 出的汗是凉的什么原因| 糖尿病人吃什么水果最好| 入睡难是什么原因| 440分能上什么大学| 子宫痒是什么原因| 牛欢喜是什么| 2013属什么生肖| 南方的粽子一般是什么口味| 婴儿什么时候长牙| 为什么空调外机会滴水| 洗衣机什么牌子好| 人活一辈子到底为了什么| 谨记是什么意思| 为什么青蛙跳的比树高| 益生菌的食物是什么| 芝柏手表什么档次| 典狱长是什么意思| 什么叫cta检查| 黄金有什么作用| 花椒有什么功效| 判处死刑缓期二年执行是什么意思| 随大流什么意思| 护理假是什么意思| 红景天有什么功效| 补钙吃什么维生素| 为什么用英语怎么说| 75b是什么罩杯| 左手麻木什么原因| 小肠是干什么的| 1948年属什么生肖| 2007属什么生肖| 入职体检前要注意什么| nct是什么意思| 痢疾吃什么药最有效| 军士长是什么军衔| 阴虚内热吃什么中成药| 樱桃跟车厘子有什么区别| 窦性心动过缓吃什么药| 霉菌性阴道炎用什么栓剂| 吃醋有什么好处| 欧米茄什么意思| 特应性皮炎是什么| 长歌怀采薇是什么意思| 男生13厘米属于什么水平| 下面瘙痒用什么药| 一喝酒就脸红是什么原因| 心率用什么字母表示| 肝多发小囊肿什么意思| 头皮软绵绵的什么原因| happy halloween是什么意思| 为什么会高血压| 干性皮肤适合什么牌子的护肤品| 小鸡仔吃什么| 盛是什么意思| amiri是什么牌子| 什么是回避型依恋人格| 21三体临界风险是什么意思| 孕酮什么意思| 肠鸣吃什么药| 脑供血不足吃什么药好| 做什么菜好吃又简单| 什么是水印照片| 色戒讲的什么| 减肥吃什么| 百度

什么得什么造句

PD Note: When you edit this page, you agree to release your contribution under the CC0. See Public Domain Help Pages for more info. PD
百度 日常工作生活中,时常用党规党纪量一量自己的言行,扫一扫身上的尘土,不断检视身心、修正行为,及时涤荡思想之尘,祛除行为之垢,坚决抵制一切迷惘迟疑的观点、及时行乐的思想和贪图私利的行为,带头严守党的政治纪律、组织纪律、廉洁纪律、群众纪律、工作纪律、生活纪律,并管好家属、子女和身边工作人员,不踩“红线”、不闯“雷区”,做到手握戒尺、心存敬畏,遵规守纪、廉洁自律,树立党员领导干部良好形象。

TemplateStyles enables the complex behavioral and aesthetic styling of templates through the use of referenced external CSS files that are wiki pages themselves. Notably, the ability to create/modify the CSS files is included in the default permissions for autoconfirmed users and so doesn't require involving someone with interface administrator privileges.

How does it work?

Editors can add <templatestyles src="[some page]" /> to a page and the contents of the referenced page will be parsed as CSS, sanitized and loaded on pages where the ?<templatestyles> tag is used (either directly, or transcluded by a template in use on the page).

[some page] must have the sanitized-css (Sanitized CSS) content model, which is the default for subpages in the Template namespace that end with .css. The recommended usage pattern is to store the styles for Template:Foo in a subpage of the template they're most impactful upon, such as Template:Foo/styles.css. If [some page] lacks a namespace prefix, it defaults to the Template namespace. Thus, for example, <templatestyles src="Foo/styles.css" /> will load Template:Foo/styles.css.

The ?<templatestyles> tag should be placed before the content that is styled, ideally at the top of the template or as close to there as possible, to avoid a potential flash of unstyled content if the page becomes initially visible while still only partially rendered.

What problems does it solve?

TemplateStyles allows editors to associate style rules to specific pages, provides the full power of CSS stylesheets while filtering dangerous constructs, and works with preview/debug tools (such as TemplateSandbox ) as expected.

Lowering the access and maintainability barrier will hopefully result in more innovation in the way templates are visually designed, less maintenance overhead, and better adaptability to screen options (especially with mobile devices constituting more than half of Wikipedia pageviews even as of March 2016).

Traditionally, there were two ways to style templates (or any other content) on MediaWiki pages, with neither approach working especially well any of the following:

  • Using inline styles (that is, raw HTML code with added attributes like style="margin: 10px;")
  • Using certain special system messages such as MediaWiki:Common.css

For inline styling

  • There is no separation of content and presentation. In cases where the content does not come from a template (e.g. tables in articles), that will result in article wikitext that's unintelligible for most editors.
  • Since styles are mixed with wikitext, syntax highlighting and other forms of CSS editing support are difficult or impossible.
  • Styles have to be repeated for each HTML element they apply to, which results in lots of copy-pasting and code that is hard to read and maintain.
  • Style attributes are limited to a subset of CSS. Most importantly, @media rules needed for responsive design do not work so it's impossible to make templates that work well over a wide range of screen sizes. Furthermore, inline styles take precedence over CSS stylesheets so user-, skin- or device-specific customizations become more difficult.

For system pages (MediaWiki:*.css)

  • Editing is limited to interface administrators , which is a major barrier to participation.
  • Editing restrictions cannot be lifted as there is no way to limit what CSS rules can be used, and some of them could be abused to track readers' IP addresses or even execute scripts in some older browsers.
  • Changes are impossible to test without saving first. T112474
  • All stylesheets must be loaded on all pages (whether they actually use the page or not), which wastes bandwidth and makes debugging style rules harder.

Is it safe?

Yes! TemplateStyles includes a full-fledged CSS parser that reads, re-serializes and escapes all code and removes CSS rules which it does not recognize. The parser is sufficiently fine-grained to reject remote resources (such as background images) but allow local ones. CSS selectors are rewritten so that they cannot refer to elements outside article content. (Visually modifying areas outside article content by displacing parts of the article, e.g. via absolute positioning, is not prevented at this time. This is no change from the status quo, as such a thing was already possible with wikitext and inline styles.)

Allowed CSS properties and rules

As of 5 March 2025, TemplateStyles accepts no fewer than 331 CSS properties and aliases, including the vast majority of those most often used on the modern internet with official support by one or more major web browser. Beyond simple rules, @media, @page, @supports, @keyframe, @font-face/@font-feature-values at-rules are also supported (with font-face restricted to fonts whose name starts with TemplateStyles, for security reasons).


How can I target mobile/desktop resolutions?

Media queries allow you to target elements at mobile resolution and desktop resolution. Some advise making your styles mobile friendly by default and wrapping desktop styles within the media query. Note, MediaWiki has standardised on 640px and 1120px breakpoints to represent tablet and desktop.

How can I target specific skins?

MediaWiki provides various classes on the html and body elements, including one that indicates which skin is in use. These can be targeted by including a simple selector for the html or body element including the needed classes, followed by a space (or in CSS terms, the descendant combinator).

Generally, this technique should be used for design consistency, rather than targeting mobile and desktop as all skins can be used in both mobile and desktop resolutions. See also #How can I target mobile/desktop resolutions?.

/* Elements with class 'foo' will have red text in all skins. */
.foo { color: red; }

/* Override that element's color to green for the Vector skin only. */
body.skin-vector .foo { color: green; }

/* Add a red border if the browser doesn't have JavaScript enabled. */
html.client-nojs .foo { border: 1px solid red; }

/* Declare that same border as green for the Vector skin. */
html.client-nojs body.skin-vector .foo { border-color: green; }
/* This does not work; the 'body' element must be selected! */
.skin-vector .foo { background: orange; }

/* These do not work, either; the descendant combinator must be used. */
body.skin-vector > .foo { background: orange; }
body.skin-vector ~ .foo { background: orange; }
html.client-nojs > body.skin-vector .foo { background: orange; }

How do I use styles in MediaWiki messages?

To prevent a malicious user from messing with the parts of the document outside the main content area, all CSS rules automatically get prefixed by the mw-parser-output CSS class. If you use a TemplateStyles-based template outside of the content area (e.g. in the sitenotice ), you need to provide that class yourself, by wrapping the template in something like <div class="mw-parser-output"></div>.

In which order do CSS styles override?

Which CSS rule takes effect is controlled by specificity (roughly, the complexity of the selector - e.g. div.foo { margin: 10px } is more specific than .foo { margin: 5px }). In case of equal specificity, CSS styles that come later in the document override earlier styles.

MediaWiki:Common.css, other site scripts, user scripts and gadgets are loaded in the ?<head> section of the page. TemplateStyles stylesheets are loaded in the ?<body>, so they override site/user script and gadget rules with equal specificity, and in the case of two TemplateStyles rules, the second overrides the first. (Note though that TemplateStyles rules are deduplicated: if the same stylesheet is referenced multiple times on the page, it is only inserted the first time.

Note also that "later" has to do with document position, not load order. Gadgets add their CSS after the page has fully loaded, by manipulating the page with JavaScript; some add it on-demand when the user does some action such as clicking a button. Nevertheless, they add it to the head, so equally-specific CSS rules in the body get precedence over it.)

How can Lua modules interact with styles?

TemplateStyles can be called from a Lua module using frame:extensionTag.

Example code is the following:

local p = {};

function p.templateStyle( frame, src )
    return frame:extensionTag( 'templatestyles', '', { src = src } );
end

return p;

What anti-abuse features are provided?

The design choice to store CSS in separate pages was made in part to make integration with the standard anti-abuse toolset easy. TemplateStyles CSS pages have their own content model (sanitized-css) so changes to them can be tracked or controlled with Extension:AbuseFilter , using the new_content_model variable.

CSS inclusion is tracked the same way as template transclusion, so you can see where a stylesheet is used via the "What links here" option, see what stylesheets are used on a page under "Page information" (and possibly on the edit screen, depending on what editor you use), and see what recent changes might be affecting a page using "Related changes".

TemplateStyles also leaves identifying information in the HTML code; to find out where a specific rule comes from, look at the page source, and the enclosing ?<style> tag will have an attribute like data-mw-deduplicate="TemplateStyles:r123456", where 123456 is the revision ID of the stylesheet (viewable with Special:Diff, for example).

How were the decisions around TemplateStyles made?

The idea of including CSS with templates was proposed and accepted in a request for comments. Technical details were pinned down in a second RfC and workflow details were expanded through a user consultation.

Who is working on TemplateStyles?

TemplateStyles was originally a project of the Wikimedia Reading Infrastructure team (preceded by exploratory work Coren did as a volunteer), consisting of Brad Jorsch (developer), Bryan Davis (manager) and Gerg? Tisza (developer) at the time. People and responsibilities have since moved around; see the maintainers page for current ownership.

Where do I report errors / ask for features?

Please file tasks under the TemplateStyles component in Phabricator.

Where can I see it in action?

You can look at some curated examples.

The feature is enabled on all Wikimedia sites.

See also

航班号是什么 玉的主要成分是什么 大姨妈每个月提前来是什么原因 中元节又叫什么节 小猫不能吃什么食物
难过美人关是什么生肖 酸梅汤与什么相克 月经周期变短是什么原因 这厮是什么意思 1938年属什么生肖属相
等字五行属什么 11月4号是什么星座 五色土有什么风水作用 晰字五行属什么 十一月底是什么星座
尿素是什么 乳头发黑是什么原因 磁共振和ct有什么区别 235是什么意思 黄药是什么
扁桃体结石吃什么药hcv8jop2ns3r.cn 舌面上有裂纹是什么病sscsqa.com 肚子疼腹泻是什么原因hcv9jop4ns7r.cn 9月20日什么星座hcv8jop5ns4r.cn 西瓜有什么营养hcv8jop1ns4r.cn
全麻后需要注意什么hcv9jop1ns2r.cn 拔完智齿后需要注意什么hcv8jop7ns9r.cn 梦见塌方是什么预兆hcv8jop4ns2r.cn 宁夏有什么特产bjhyzcsm.com 老生常谈是什么意思youbangsi.com
饿死是什么感觉hcv8jop7ns2r.cn 女人吃什么对卵巢和子宫好yanzhenzixun.com playboy什么意思hcv8jop7ns0r.cn 小孩突然抽搐失去意识是什么原因hcv8jop3ns1r.cn 印度人属于什么人种hcv8jop7ns0r.cn
柿子是什么颜色hcv8jop2ns2r.cn 圆脸适合什么发型女hcv9jop7ns1r.cn 宁夏有什么特产zhiyanzhang.com 什么奶粉比较好wzqsfys.com 菱角是什么意思hcv9jop5ns9r.cn
百度