Jump to content
Wikipedia The Free Encyclopedia

Help talk:Cascading Style Sheets

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This help page does not require a rating on Wikipedia's content assessment scale.
It is of interest to the following WikiProjects:
WikiProject icon This page is within the scope of the Wikipedia Help Project , a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.Wikipedia HelpWikipedia:Help ProjectTemplate:Wikipedia Help ProjectHelp
Mid This page has been rated as Mid-importance on the project's importance scale.

Archives
[edit ]

These redirect to Phabricator, and not, as far a I can see, in a useful way.

All the best: Rich Farmbrough , 17:09, 17 March 2016 (UTC).[reply ]

Yeah, links like common/shared.css seem to have been obsolete since around 2014 – shared.css has been deleted for bugzilla:69277, aka phab:T71277, see commit b1dea1d (Move mediawiki.legacy.* modules from skins/common/ to resources/, 2014年08月28日).
I'm not even sure what would be useful to link on the section MediaWiki core style-sheets. Some file in repository git:mediawiki/skins/Vector, perhaps? Because git:mediawiki/skins/shared doesn't have much, only one PHP file. —⁠andrybak (talk) 21:46, 21 July 2024 (UTC) [reply ]
It seems that the related page Wikipedia:Catalogue of CSS classes is suffering as well, see Special:Diff/1100015725 and Special:Diff/1147963014. —⁠andrybak (talk) 21:49, 21 July 2024 (UTC) [reply ]

Define CSS classes (or otherwise define general CSS) on specific page

[edit ]

Hi,

On da:wiki we have a number of pages, mostly portal pages, which are formatted using HTML and CSS. These pages often have a lot of HTML elements like

 <element style="....">...</element>

where all (or almost all) the same elements (e.g. all the <td>) have the same style, making it somewhat tedious to make changes to the styles - as you then have to change a (large) number of identical style-attributes.

Now in plain HTML you can fix this by having a <style> section in the <head> or by including a CSS file - But not of these seems to be an option in wiki.

Is there some way to define a block of CSS tags or classes in a single wikipedia page - to avoid having to repeat the same style attribute over and over ?

--Honymand (talk) 18:50, 20 November 2016 (UTC) [reply ]

Not for single pages. Where a style (or group of styles) is in use across a wide range of pages, we can set up suitable classes in MediaWiki:Common.css - for example the various rules for the .hlist class that was added a few years ago. --Redrose64 (talk) 23:50, 20 November 2016 (UTC) [reply ]
Since 2018 it's now possible to add custom CSS to individual pages using Wikipedia:TemplateStyles. —⁠andrybak (talk) 21:31, 21 July 2024 (UTC) [reply ]

AltStyle によって変換されたページ (->オリジナル) /