Content deleted Content added
0xDeadbeef (talk | contribs) + Tag: 2017 wikitext editor |
0xDeadbeef (talk | contribs) up Tag: 2017 wikitext editor |
||
(36 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
*[https://petscan.wmflabs.org/?psid=26653654] - GA <-> On this day - 10 sample [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&dir=prev&offset=20231212145156&limit=10 finished] |
|||
{{User sandbox}} |
|||
*[https://petscan.wmflabs.org/?psid=26653664] - FailedGA <-> DYK talk - 10 sample [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&dir=prev&offset=20231220081947&limit=10 finished] |
|||
<!-- EDIT BELOW THIS LINE --> |
|||
*:interesting [https://en.wikipedia.org/w/index.php?title=Talk:SS_Fort_Stikine&diff=prev&oldid=1190869238 example] - has both failedGA and GA |
|||
*[https://petscan.wmflabs.org/?psid=26653679] - Any ITN not folded in - 10 sample [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&offset=20231220101507&limit=10 finished] - open question as to whether we want to have AH without main status |
|||
*:[https://en.wikipedia.org/w/index.php?title=Talk:Brexit&diff=prev&oldid=1190869528 Example] - no main status for article history |
|||
*[https://petscan.wmflabs.org/?psid=26656796] - any old PR not folded in - 10 sample [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&dir=prev&offset=20231220095250&limit=10 finished] |
|||
*:[https://en.wikipedia.org/w/index.php?title=Wikipedia:Peer_review/Ambush_(ER)/archive1&action=history Example] for a PR that was actually reviewed within 3 edits - so we can't be sure that it is unreviewed even if it only has 3 edits. |
|||
*:[https://en.wikipedia.org/w/index.php?title=Talk:Warsaw_Uprising_(1794)&diff=prev&oldid=1190915392 logic error] - demoted FA don't retain their GA status |
|||
*[https://petscan.wmflabs.org/?psid=26656482] - existing AH talk pages that can fold in other infos - 10 sample [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&dir=prev&offset=20231220161108&limit=10 finished] |
|||
*:Old PR reviewed vs. not reviewed determination was supplied by me. |
|||
* Phase II of trial: random 50 sample of all treatable pages - [https://en.wikipedia.org/w/index.php?title=Special:Contributions/DeadbeefBot&target=DeadbeefBot&dir=prev&offset=20231220162729&limit=50 completed] |
|||
*:[https://en.wikipedia.org/w/index.php?title=Talk:Danuvius_guggenmosi&diff=prev&oldid=1190923829 error] was fixed, in both article and in bot code |
|||
*:Errors (probably needs human intervention, but bot could improve) are logged as below: |
|||
{{ctop}} |
|||
'''Cascading Style Sheets''' ('''CSS''') is a [[style sheet language]] used for describing the [[presentation semantics|presentation]] of a document written in a [[markup language]] such as [[HTML]] or [[XML]] (including XML dialects such as [[Scalable Vector Graphics|SVG]], [[MathML]] or [[XHTML]]).<ref>{{Cite web|title = CSS developer guide|url = https://developer.mozilla.org/en-US/docs/Web/Guide/CSS|website = MDN Web Docs|access-date = 2015-09-24|archive-url = https://web.archive.org/web/20150925133829/https://developer.mozilla.org/en-US/docs/Web/Guide/CSS|archive-date = 2015-09-25|url-status = live}}</ref> CSS is a cornerstone technology of the [[World Wide Web]], alongside HTML and [[JavaScript]].<ref>{{Cite book|last=Flanagan|first=David|url=https://www.worldcat.org/title/javascript-the-definitive-guide/oclc/686709345?referer=br&ht=edition|title=JavaScript: the definitive guide|date=18 April 2011|publisher=O'Reilly|isbn=978-1-4493-9385-4|location=Beijing; Farnham|page=1|language=English|oclc=686709345|quote=JavaScript is part of the triad of technologies that all Web developers must learn: HTML to specify the content of web pages, CSS to specify the presentation of web pages, and JavaScript to specify the behavior of web pages.}}</ref> |
|||
* Error while treating[[Talk:Jack White]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:J. W. Lonoaea]]: skipping, article doesn't have wp banner shell |
|||
CSS is designed to enable the [[separation of content and presentation]], including [[page layout|layout]], [[color]]s, and [[typeface|fonts]].<ref>{{cite web|title=What is CSS?|publisher=World Wide Web Consortium|url=https://www.w3.org/standards/webdesign/htmlcss#whatcss|access-date=2010-12-01|archive-url=https://web.archive.org/web/20101129081921/https://www.w3.org/standards/webdesign/htmlcss#whatcss|archive-date=2010-11-29|url-status=live}}</ref> This separation can improve content [[accessibility]]; provide more flexibility and control in the specification of presentation characteristics; enable multiple [[web page]]s to share formatting by specifying the relevant CSS in a separate .css file, which reduces complexity and repetition in the structural content; and enable the .css file to be [[Cache (computing)|cached]] to improve the page load speed between the pages that share the file and its formatting. |
|||
* Error while treating[[Talk:Maternal sensitivity]]: skipping, article doesn't have wp banner shell |
|||
* Error while treating[[Talk:2012 United States Senate election in Massachusetts]]: topic mismatch |
|||
Separation of formatting and content also makes it feasible to present the same markup page in different styles for different rendering methods, such as on-screen, in print, by voice (via speech-based browser or [[screen reader]]), and on [[Braille display|Braille-based]] tactile devices. CSS also has rules for alternate formatting if the content is accessed on a [[mobile device]].<ref>{{cite web|title=Web-based Mobile Apps of the Future Using HTML 5, CSS and JavaScript|date=23 July 2010|publisher=HTMLGoodies|url=https://www.htmlgoodies.com/beyond/article.php/3893911/Web-based-Mobile-Apps-of-the-Future-Using-HTML-5-CSS-and-JavaScript.htm|access-date=2014-10-16|archive-url=https://web.archive.org/web/20141020121735/https://www.htmlgoodies.com/beyond/article.php/3893911/Web-based-Mobile-Apps-of-the-Future-Using-HTML-5-CSS-and-JavaScript.htm|archive-date=2014-10-20|url-status=live}}</ref> |
|||
* Error while treating[[Talk:Zhu De]]: topic mismatch |
|||
* Error while treating[[Talk:Sex (book)]]: automatic determination of date is disabled |
|||
The name ''cascading'' comes from the specified priority scheme to determine which style rule applies if more than one rule matches a particular element. This cascading priority scheme is predictable. |
|||
* Error while treating[[Talk:Edmund the Martyr]]: unknown gar |
|||
* Error while treating[[Talk:Sandhikharka]]: skipping, article doesn't have wp banner shell |
|||
The CSS specifications are maintained by the [[World Wide Web Consortium]] (W3C). Internet media type ([[MIME media type|MIME type]]) <code>text/css</code> is registered for use with CSS by RFC 2318 (March 1998). The W3C operates a free [[W3C Markup Validation Service#CSS validation|CSS validation service]] for CSS documents.<ref>{{cite web | title = W3C CSS validation service | url = https://jigsaw.w3.org/css-validator/ | access-date = 2012-06-30 | archive-url = https://web.archive.org/web/20110214164625/https://jigsaw.w3.org/css-validator/ | archive-date = 2011-02-14 | url-status = live }}</ref> |
|||
* Error while treating[[Talk:List of Florida state parks]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:Jesé]]: can't determine if it was reviewed |
|||
In addition to HTML, other markup languages support the use of CSS including [[XHTML]], [[Plain Old XML|plain XML]], [[Scalable Vector Graphics|SVG]], and [[XUL]]. |
|||
* Error while treating[[Talk:Kwakiutl (statue)]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:Radio Caroline]]: can't determine if it was reviewed |
|||
==Syntax== |
|||
* Error while treating[[Talk:List of Holby City episodes]]: can't determine if it was reviewed |
|||
CSS has a simple [[syntax]] and uses a number of English keywords to specify the names of various style properties. |
|||
* Error while treating[[Talk:Ramón Iribarren]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:He-Man as a gay icon]]: multi-status is invalid: GA/FFAC |
|||
A style sheet consists of a list of ''rules''. Each rule or rule-set consists of one or more ''[[#Selector|selectors]]'', and a ''[[#Declaration block|declaration block]]''. |
|||
* Error while treating[[Talk:Presidential transition of John F. Kennedy]]: topic mismatch |
|||
* Error while treating[[Talk:Battle of Rossignol]]: skipping, article doesn't have wp banner shell |
|||
===Selector=== |
|||
* Error while treating[[Talk:Tsakhiagiin Elbegdorj]]: automatic determination of date is disabled |
|||
{{Redirect|CSS class|non-CSS use of element classes in HTML|class attribute (HTML)}} |
|||
* Error while treating[[Talk:Presbyterian Church in the United States of America]]: skipping, article doesn't have wp banner shell |
|||
* Error while treating[[Talk:Jackalope]]: automatic determination of date is disabled |
|||
In CSS, ''selectors'' declare which part of the markup a style applies to by matching tags and attributes in the markup itself. |
|||
* Error while treating[[Talk:Secret Mountain Fort Awesome]]: automatic determination of date is disabled |
|||
* Error while treating[[Talk:Matthias W. Day]]: no page |
|||
Selectors may apply to the following: |
|||
* Error while treating[[Talk:Shelly-Ann Fraser-Pryce]]: can't determine if it was reviewed |
|||
*all [[HTML element|elements]] of a specific type, e.g. the second-level headers [[HTML element#Basic text|h2]] |
|||
* Error while treating[[Talk:Chandos Scudamore Scudamore Stanhope]]: skipping, article doesn't have wp banner shell |
|||
*elements specified by [[HTML attribute|attribute]], in particular: |
|||
* Error while treating[[Talk:Fargo (season 2)]]: can't determine if it was reviewed |
|||
**''id'': an identifier unique within the document, denoted in the selector language by a [[number sign|hash]] prefix e.g. {{Code|code=#id}} |
|||
* Error while treating[[Talk:William McAndrew]]: can't determine if it was reviewed |
|||
**''class'': an identifier that can annotate multiple elements in a document, denoted by a [[period (punctuation)|dot]] prefix e.g. {{Code|code=.classname}} (the phrase "CSS class", although sometimes used, is a misnomer, as element classes—specified with the [[class attribute (HTML)|HTML class attribute]]—is a markup feature that is distinct from browsers' CSS subsystem and the related W3C/WHATWG standards work on document styles; see [[Resource Description Framework|RDF]] and [[microformat]]s for the origins of the "class" system of the Web content model) |
|||
* Error while treating[[Talk:List of Holby City episodes]]: can't determine if it was reviewed |
|||
*elements depending on how they are placed relative to others in the [[Document Object Model|document tree]]. |
|||
* Error while treating[[Talk:Iazyges]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:South Stoneham House]]: can't determine if it was reviewed |
|||
Classes and IDs are case-sensitive, start with letters, and can include alphanumeric characters, hyphens, and underscores. A class may apply to any number of instances of any element. An ID may only be applied to a single element. |
|||
* Error while treating[[Talk:Corps Altsachsen Dresden]]: automatic determination of date is disabled |
|||
* Error while treating[[Talk:Confederate States Congress]]: HTTP status client error (404 Not Found) for url (https://en.wikipedia.org/w/rest.php/v1/page/Wikipedia%3APeer_review%2FConfederate_States_Congress%2Farchive1/history/counts/edits) |
|||
''Pseudo-classes'' are used in CSS selectors to permit formatting based on information that is not contained in the document tree. One example of a widely used pseudo-class is {{code|lang=css|:hover}}, which identifies content only when the user "points to" the visible element, usually by holding the mouse cursor over it. It is appended to a selector as in {{code|lang=css|code=a:hover}} or {{code|lang=css|code=#elementid:hover}}. A pseudo-class classifies document elements, such as {{code|lang=css|code=:link}} or {{code|lang=css|code=:visited}}, whereas a ''pseudo-element'' makes a selection that may consist of partial elements, such as {{code|lang=css|code=::first-line}} or {{code|lang=css|code=::first-letter}}.<ref>{{cite web |url=https://www.w3.org/TR/CSS21/selector.html#pseudo-elements |title=W3C CSS2.1 specification for pseudo-elements and pseudo-classes |publisher=World Wide Web Consortium |date=7 June 2011 |access-date=30 April 2012 |archive-url=https://web.archive.org/web/20120430011514/https://www.w3.org/TR/CSS21/selector.html#pseudo-elements |archive-date=30 April 2012 |url-status=live }}</ref> Note the double-colon notation for pseudo-elements versus single-colon notation for pseudo-class. |
|||
* Error while treating[[Talk:Jean Joseph Marie Amiot]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:Paraguayan War]]: unknown field `note`, expected one of `1`, `date`, `oldid`, `subtopic`, `topic`, `small`, `page` |
|||
Selectors may be combined in many ways to achieve great specificity and flexibility.<ref>see [https://www.w3.org/TR/CSS21/selector.html the complete definition of selectors at the W3C Web site] {{Webarchive|url=https://web.archive.org/web/20060423174213/https://www.w3.org/TR/CSS21/selector.html |date=2006-04-23 }}.</ref> Multiple selectors may be joined in a spaced list to specify elements by location, element type, id, class, or any combination thereof. The order of the selectors is important. For example, <syntaxhighlight inline lang="css" class=nowrap> |
|||
* Error while treating[[Talk:Woman Seeking Dead Husband: Smokers Okay, No Pets]]: skipping, article doesn't have wp banner shell |
|||
div .myClass {color: red;}</syntaxhighlight> applies to all elements of class myClass that are inside div elements, whereas <syntaxhighlight inline lang="css" class=nowrap>.myClass div {color: red;}</syntaxhighlight> applies to all div elements that are inside elements of class myClass. This is not to be confused with concatenated identifiers such as <syntaxhighlight inline="" lang="css" class="nowrap"> |
|||
* Error while treating[[Talk:Triple Crown (snooker)]]: skipping, article doesn't have wp banner shell |
|||
div.myClass {color: red;}</syntaxhighlight> which applies to div elements of class myClass. |
|||
* Error while treating[[Talk:History of money]]: can't determine if it was reviewed |
|||
* Error while treating[[Talk:United Airlines]]: can't determine if it was reviewed |
|||
The following table provides a summary of selector syntax indicating usage and the version of CSS that introduced it.<ref>{{cite web |url=https://www.w3.org/TR/selectors/ |title=Selectors Level 3 |publisher=W3.org |access-date=2014-05-30 |archive-url=https://web.archive.org/web/20140603165900/https://www.w3.org/TR/selectors/ |archive-date=2014-06-03 |url-status=live }}</ref> |
|||
* Error while treating[[Talk:A. W. Piper]]: skipping, article doesn't have wp banner shell |
|||
{| class="wikitable" |
|||
* Error while treating[[Talk:Erforsche mich, Gott, und erfahre mein Herz, BWV 136]]: skipping, article doesn't have wp banner shell |
|||
|- |
|||
* Error while treating[[Talk:Lolita (Leah LaBelle song)]]: can't determine if it was reviewed |
|||
! Pattern !! Matches !! First defined<br/>in CSS level |
|||
* Error while treating[[Talk:Avalanche Studios Group]]: can't determine if it was reviewed |
|||
|- |
|||
* Error while treating[[Talk:Whip It (Devo song)]]: automatic determination of date is disabled |
|||
| {{code|2=css|1=E}} || an element of type E || 1 |
|||
* Error while treating[[Talk:Final Destination 3]]: unknown field `topic`, expected one of `archive`, `reviewedname`, `archivelink`, `ID`, `date` |
|||
|- |
|||
* Error while treating[[Talk:The Firebrand (Bradley novel)]]: HTTP status client error (404 Not Found) for url (https://en.wikipedia.org/w/rest.php/v1/page/Wikipedia%3APeer_review%2FThe_Firebrand_%28Bradley_novel%29%2Farchive1/history/counts/edits) |
|||
| {{code|2=css|1=E:link}} || an E element that is the source anchor of a hyperlink whose target is either not yet visited (:link) or already visited (:visited) || 1 |
|||
* Error while treating[[Talk:National Film Award for Best Actor]]: automatic determination of date is disabled |
|||
|- |
|||
* Error while treating[[Talk:Efren Reyes]]: can't determine if it was reviewed |
|||
| {{code|2=css|1=E:active}} || an E element during certain user actions || 1 |
|||
* Error while treating[[Talk:Star Wars: Jedi Arena]]: skipping, article doesn't have wp banner shell |
|||
|- |
|||
* Error while treating[[Talk:First circle of hell]]: can't determine if it was reviewed |
|||
| {{code|2=css|1=E::first-line}} || the first formatted line of an E element || 1 |
|||
* Error while treating[[Talk:Boots theory]]: skipping, article doesn't have wp banner shell |
|||
|- |
|||
* Error while treating[[Talk:Jack White]]: can't determine if it was reviewed |
|||
| {{code|2=css|1=E::first-letter}} || the first formatted letter of an E element || 1 |
|||
* Error while treating[[Talk:NDA (song)]]: can't determine if it was reviewed |
|||
|- |
|||
* Error while treating[[Talk:Vancouver]]: can't determine if it was reviewed |
|||
| {{code|2=css|1=.c}} || all elements with class="c" || 1 |
|||
* Error while treating[[Talk:Alexander Bullock]]: skipping, article doesn't have wp banner shell |
|||
|- |
|||
* Error while treating[[Talk:Baer's pochard]]: unknown field `image`, expected one of `1`, `2`, `3`, `entry`, `nompage`, `views` |
|||
| {{code|2=css|1=#myid}} || the element with id="myid" || 1 |
|||
* Error while treating[[Talk:Ng On-yee]]: can't determine if it was reviewed |
|||
|- |
|||
{{cbot}} |
|||
| {{code|2=css|1=E.warning}} || an E element whose class is "warning" (the document language specifies how class is determined) || 1 |
|||
|- |
|||
| {{code|2=css|1=E#myid}} || an E element with ID equal to "myid" || 1 |
|||
|- |
|||
| {{code|2=css|1=.c#myid}} || the element with class="c" and ID equal to "myid" || 1 |
|||
|- |
|||
| {{code|2=css|1=E F}} || an F element descendant of an E element || 1 |
|||
|- |
|||
| {{code|2=css|1=*}} || any element || 2 |
|||
|- |
|||
| {{code|2=css|1=E[foo]}} || an E element with a "foo" attribute || 2 |
|||
|- |
|||
| {{code|2=css|1=E[foo="bar"]}} || an E element whose "foo" attribute value is exactly equal to "bar" || 2 |
|||
|- |
|||
| {{code|2=css|1=E[foo~="bar"]}} || an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" || 2 |
|||
|- |
|||
| {{code|2=css|1=E<nowiki>[foo|="en"]</nowiki>}} || an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" || 2 |
|||
|- |
|||
| {{code|2=css|1=E:first-child}} || an E element, first child of its parent || 2 |
|||
|- |
|||
| {{code|2=css|1=E:lang(fr)}} || an element of type E in language "fr" (the document language specifies how language is determined) || 2 |
|||
|- |
|||
| {{code|2=css|1=E::before}} || generated content before an E element's content || 2 |
|||
|- |
|||
| {{code|2=css|1=E::after}} || generated content after an E element's content || 2 |
|||
|- |
|||
| {{code|2=css|1=E > F}} || an F element child of an E element || 2 |
|||
|- |
|||
| {{code|2=css|1=E + F}} || an F element immediately preceded by an E element || 2 |
|||
|- |
|||
| {{code|2=css|1=E[foo^="bar"]}} || an E element whose "foo" attribute value begins exactly with the string "bar" || 3 |
|||
|- |
|||
| {{code|2=css|1=E[foo$="bar"]}} || an E element whose "foo" attribute value ends exactly with the string "bar" || 3 |
|||
|- |
|||
| {{code|2=css|1=E[foo*="bar"]}} || an E element whose "foo" attribute value contains the substring "bar" || 3 |
|||
|- |
|||
| {{code|2=css|1=E:root}} || an E element, root of the document || 3 |
|||
|- |
|||
| {{code|2=css|1=E:nth-child(n)}} || an E element, the n-th child of its parent || 3 |
|||
|- |
|||
| {{code|2=css|1=E:nth-last-child(n)}} || an E element, the n-th child of its parent, counting from the last one || 3 |
|||
|- |
|||
| {{code|2=css|1=E:nth-of-type(n)}} || an E element, the n-th sibling of its type || 3 |
|||
|- |
|||
| {{code|2=css|1=E:nth-last-of-type(n)}} || an E element, the n-th sibling of its type, counting from the last one || 3 |
|||
|- |
|||
| {{code|2=css|1=E:last-child}} || an E element, last child of its parent || 3 |
|||
|- |
|||
| {{code|2=css|1=E:first-of-type}} || an E element, first sibling of its type || 3 |
|||
|- |
|||
| {{code|2=css|1=E:last-of-type}} || an E element, last sibling of its type || 3 |
|||
|- |
|||
| {{code|2=css|1=E:only-child}} || an E element, only child of its parent || 3 |
|||
|- |
|||
| {{code|2=css|1=E:only-of-type}} || an E element, only sibling of its type || 3 |
|||
|- |
|||
| {{code|2=css|1=E:empty}} || an E element that has no children (including text nodes) || 3 |
|||
|- |
|||
| {{code|2=css|1=E:target}} || an E element being the target of the referring URI || 3 |
|||
|- |
|||
| {{code|2=css|1=E:enabled}} || a user interface element E that is enabled || 3 |
|||
|- |
|||
| {{code|2=css|1=E:disabled}} || a user interface element E that is disabled || 3 |
|||
|- |
|||
| {{code|2=css|1=E:checked}} || a user interface element E that is checked (for instance a radio button or checkbox) || 3 |
|||
|- |
|||
| {{code|2=css|1=E:not(s)}} || an E element that does not match simple selector s || 3 |
|||
|- |
|||
| {{code|2=css|1=E ~ F}} || an F element preceded by an E element || 3 |
|||
|} |
|||
===Declaration block=== |
|||
A declaration block consists of a list of ''declarations'' in braces. Each declaration itself consists of a ''property'', a colon (<code>:</code>), and a ''value''. If there are multiple declarations in a block, a semi-colon (<code>;</code>) must be inserted to separate each declaration. An ''optional'' semi-colon after the last (or single) declaration may be used.<ref>{{cite web |url=https://www.w3.org/TR/CSS21/syndata.html#q10 |title=W3C CSS2.1 specification for rule sets, declaration blocks, and selectors |publisher=World Wide Web Consortium |date=7 June 2011 |access-date=2009-06-20 |archive-url=https://web.archive.org/web/20080328113605/https://www.w3.org/TR/CSS21/syndata.html#q10 |archive-date=28 March 2008 |url-status=live }}</ref> |
|||
Properties are specified in the CSS standard. Each property has a set of possible values. Some properties can affect any type of element, and others apply only to particular groups of elements.<ref>{{cite web |url=https://www.w3.org/TR/CSS2/propidx.html |title=Full property table |publisher=W3.org |access-date=2014-05-30 |archive-url=https://web.archive.org/web/20140530163211/https://www.w3.org/TR/CSS2/propidx.html |archive-date=2014-05-30 |url-status=live }}</ref><ref>{{Cite web|title=Index of CSS properties|url=https://www.w3.org/Style/CSS/all-properties.en.html|access-date=2020-08-09|website=www.w3.org}}</ref> |
|||
Values may be keywords, such as "center" or "inherit", or numerical values, such as {{code|code=200px|2=css}} (200 pixels), {{code|code=50vw|2=css}} (50 percent of the viewport width) or {{mono|80%}} (80 percent of the parent element's width). Color values can be specified with keywords (e.g. "{{code|code=red|2=css}}"), hexadecimal values (e.g. {{code|code=#FF0000|2=css}}, also abbreviated as {{code|code=#F00|2=css}}), RGB values on a 0 to 255 scale (e.g. <code>{{code|code=rgb(255, 0, 0)|2=css}}</code>), RGBA values that specify both color and alpha transparency (e.g. {{code|code=rgba(255, 0, 0, 0.8)|2=css}}), or HSL or HSLA values (e.g. {{code|code=hsl(000, 100%, 50%)|2=css}}, {{code|code=hsla(000, 100%, 50%, 80%)|2=css}}).<ref>{{cite web |url=https://developer.mozilla.org/en-US/docs/Web/CSS/color |title=CSS Color |publisher=MDN Web Docs |date=2016-06-28 |access-date=2016-08-23 |archive-url=https://web.archive.org/web/20160921111121/https://developer.mozilla.org/en-US/docs/Web/CSS/color |archive-date=2016-09-21 |url-status=live }}</ref> |
|||
====Length units==== |
|||
Non-zero numeric values representing linear measures must include a length unit, which is either an alphabetic code or abbreviation, as in <code>200px</code> or <code>50vw</code>; or a percentage sign, as in <code>80%</code>. Some units – <code>cm</code> ([[centimetre]]); <code>in</code> ([[inch]]); <code>mm</code> ([[millimetre]]); <code>pc</code> ([[Pica (typography)|pica]]); and <code>pt</code> ([[Point (typography)|point]]) – are ''absolute'', which means that the rendered dimension does not depend upon the structure of the page; others – <code>em</code> ([[Em (typography)|em]]); <code>ex</code> ([[Ex (typography)|ex]]) and <code>px</code> ([[pixel]]){{clarify|reason=This "such as" is carrying too much weight. The size of a px is relative not to the font size, but to screen resolution and viewing distance. Furthermore, in CSS 3 the "px" becomes the primordial absolute unit as the length units become anchored to it.|date=March 2022}} – are ''relative'', which means that factors such as the font size of a parent element can affect the rendered measurement. These eight units were a feature of CSS 1<ref>{{cite web |url=https://www.w3.org/TR/REC-CSS1-961217#length-units |title=6.1 Length units |work=Cascading Style Sheets, level 1 |date=17 December 1996 |access-date=20 June 2019 |archive-url=https://web.archive.org/web/20190614194847/https://www.w3.org/TR/REC-CSS1-961217#length-units |archive-date=14 June 2019 |url-status=live }}</ref> and retained in all subsequent revisions. The proposed CSS Values and Units Module Level 3 will, if adopted as a W3C Recommendation, provide seven further length units: <code>ch</code>; <code>Q</code>; <code>rem</code>; <code>vh</code>; <code>vmax</code>; <code>vmin</code>; and <code>vw</code>.<ref>{{cite web |url=https://www.w3.org/TR/2019/CR-css-values-3-20190606/#lengths |title=5. Distance Units: the <length> type |work=CSS Values and Units Module Level 3 |date=6 June 2019 |access-date=20 June 2019 |archive-url=https://web.archive.org/web/20190607171702/https://www.w3.org/TR/2019/CR-css-values-3-20190606/#lengths |archive-date=7 June 2019 |url-status=live }}</ref> |
|||
===Use=== |
|||
Before CSS, nearly all presentational attributes of HTML documents were contained within the HTML markup. All font colors, background styles, element alignments, borders, and sizes had to be explicitly described, often repeatedly, within the HTML. CSS lets authors move much of that information to another file, the style sheet, resulting in considerably simpler HTML. |
|||
For example, headings (<code>h1</code> elements), sub-headings (<code>h2</code>), sub-sub-headings (<code>h3</code>), etc., are defined structurally using HTML. In print and on the screen, choice of [[Typeface|font]], [[Point (typography)|size]], [[color]] and [[Emphasis (typography)|emphasis]] for these elements is ''presentational''. |
|||
Before CSS, document authors who wanted to assign such [[Typography|typographic]] characteristics to, say, all <code>h2</code> headings had to repeat HTML presentational markup for each occurrence of that heading type. This made documents more complex, larger, and more error-prone and difficult to maintain. CSS allows the separation of presentation from structure. CSS can define color, font, text alignment, size, borders, spacing, layout and many other typographic characteristics, and can do so independently for on-screen and printed views. CSS also defines non-visual styles, such as reading speed and emphasis for aural text readers. The [[W3C]] has now [[deprecation|deprecated]] the use of all presentational HTML markup.<ref>{{cite web|author=W3C HTML Working Group|title=HTML 5. A vocabulary and associated APIs for HTML and XHTML|url=https://www.w3.org/TR/html/introduction.html#presentational-markup|publisher=[[World Wide Web Consortium]]|access-date=28 June 2014|archive-url=https://web.archive.org/web/20140715001359/https://www.w3.org/TR/html/introduction.html#presentational-markup|archive-date=15 July 2014|url-status=live}}</ref> |
|||
For example, under pre-CSS HTML, a heading element defined with red text would be written as: |
|||
<syntaxhighlight lang="html5"> |
|||
<h1><font color="red">Chapter 1.</font></h1> |
|||
</syntaxhighlight> |
|||
Using CSS, the same element can be coded using style properties instead of HTML presentational attributes: |
|||
<syntaxhighlight lang="html4strict"> |
|||
<h1 style="color: red;">Chapter 1.</h1> |
|||
</syntaxhighlight> |
|||
The advantages of this may not be immediately clear but the power of CSS becomes more apparent when the style properties are placed in an internal style element or, even better, an external CSS file. For example, suppose the document contains the style element: |
|||
<syntaxhighlight lang="html5"> |
|||
<style> |
|||
h1 { |
|||
color: red; |
|||
} |
|||
</style> |
|||
</syntaxhighlight> |
|||
All <code>h1</code> elements in the document will then automatically become red without requiring any explicit code. If the author later wanted to make <code>h1</code> elements blue instead, this could be done by changing the style element to: |
|||
<syntaxhighlight lang="html5"> |
|||
<style> |
|||
h1 { |
|||
color: blue; |
|||
} |
|||
</style> |
|||
</syntaxhighlight> |
|||
rather than by laboriously going through the document and changing the color for each individual <code>h1</code> element. |
|||
The styles can also be placed in an external CSS file, as described below, and loaded using syntax similar to: |
|||
<syntaxhighlight lang="html5"> |
|||
<link href="path/to/file.css" rel="stylesheet" type="text/css"> |
|||
</syntaxhighlight> |
|||
This further decouples the styling from the HTML document and makes it possible to restyle multiple documents by simply editing a shared external CSS file. |
|||
===Sources=== |
|||
CSS information can be provided from various sources. These sources can be the web browser, the user, and the author. The information from the author can be further classified into inline, media type, importance, selector specificity, rule order, inheritance, and property definition. CSS style information can be in a separate document, or it can be embedded into an HTML document. Multiple style sheets can be imported. Different styles can be applied depending on the output device being used; for example, the screen version can be quite different from the printed version, so authors can tailor the presentation appropriately for each medium. |
|||
The style sheet with the highest priority controls the content display. Declarations not set in the highest priority source are passed on to a source of lower priority, such as the user agent style. The process is called ''cascading''. |
|||
One of the goals of CSS is to allow users greater [[Style sheet (web development)#Customization|control over presentation]]. Someone who finds red italic headings difficult to read may apply a different style sheet. Depending on the browser and the website, a user may choose from various style sheets provided by the designers, or may remove all added styles, and view the site using the browser's default styling, or may override just the red italic heading style without altering other attributes. Browser extensions like [[Stylish]] and [[Stylus (browser extension)|Stylus]] have been created to facilitate the management of such user style sheets. |
|||
{| class="wikitable" |
|||
|+ CSS priority scheme (highest to lowest) |
|||
|- |
|||
! Priority !! CSS source type !! Description |
|||
|- |
|||
| 1 || Importance || The "{{code|lang=css|code=!important}}" annotation overwrites the previous priority types |
|||
|- |
|||
| 2 || Inline || A style applied to an HTML element via HTML "style" attribute |
|||
|- |
|||
| 3 || Media Type || A property definition applies to all media types unless a media-specific CSS is defined |
|||
|- |
|||
| 4 || User defined || Most browsers have the accessibility feature: a user-defined CSS |
|||
|- |
|||
| 5 || Selector specificity || A specific contextual selector ({{code|lang=css|code=#heading p}}) overwrites generic definition |
|||
|- |
|||
| 6 || Rule order || Last rule declaration has a higher priority |
|||
|- |
|||
| 7 || Parent inheritance || If a property is not specified, it is inherited from a parent element |
|||
|- |
|||
| 8 || CSS property definition in HTML document || CSS rule or CSS inline style overwrites a default browser value |
|||
|- |
|||
| 9 || Browser default || The lowest priority: browser default value is determined by W3C initial value specifications |
|||
|} |
|||
===Specificity=== |
|||
''Specificity'' refers to the relative weights of various rules.<ref name="Cascading">{{Cite book | edition = 3rd | publisher = O'Reilly Media, Inc. | isbn = 0-596-52733-0 | last = Meyer | first = Eric A. | title = Cascading Style Sheets: The Definitive Guide | url = https://shop.oreilly.com/product/9781565926226.do | year = 2006 | access-date = 2014-02-16 | archive-url = https://web.archive.org/web/20140215041138/https://shop.oreilly.com/product/9781565926226.do | archive-date = 2014-02-15 | url-status = live }}</ref> It determines which styles apply to an element when more than one rule could apply. Based on the specification, a simple selector (e.g. H1) has a specificity of 1, class selectors have a specificity of 1,0, and ID selectors have a specificity of 1,0,0. Because the specificity values do not carry over as in the decimal system, commas are used to separate the "digits"<ref>{{cite web|url=https://www.w3.org/TR/CSS21/cascade.html#specificity|title=Assigning property values, Cascading, and Inheritance|access-date=2014-06-10|archive-url=https://web.archive.org/web/20140611010536/https://www.w3.org/TR/CSS21/cascade.html#specificity|archive-date=2014-06-11|url-status=live}}</ref> (a CSS rule having 11 elements and 11 classes would have a specificity of 11,11, not 121). |
|||
Thus the selectors of the following rule result in the indicated specificity: |
|||
{| class="wikitable" |
|||
|- |
|||
! Selectors !! Specificity |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>h1 {color: white;}</syntaxhighlight> || 0, 0, 0, 1 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>p em {color: green;}</syntaxhighlight> || 0, 0, 0, 2 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>.grape {color: red;}</syntaxhighlight> || 0, 0, 1, 0 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>p.bright {color: blue;}</syntaxhighlight> || 0, 0, 1, 1 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>p.bright em.dark {color: yellow;}</syntaxhighlight> || 0, 0, 2, 2 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>#id218 {color: brown;}</syntaxhighlight> || 0, 1, 0, 0 |
|||
|- |
|||
| <syntaxhighlight lang="css" inline>style=" "</syntaxhighlight> || 1, 0, 0, 0 |
|||
|} |
|||
====Examples==== |
|||
Consider this HTML fragment: |
|||
<syntaxhighlight lang="html5"> |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="utf-8"> |
|||
<style> |
|||
#xyz { color: blue; } |
|||
</style> |
|||
</head> |
|||
<body> |
|||
<p id="xyz" style="color: green;">To demonstrate specificity</p> |
|||
</body> |
|||
</html> |
|||
</syntaxhighlight> |
|||
In the above example, the declaration in the <code>style</code> attribute overrides the one in the <code><style></code> element because it has a higher specificity, and thus, the paragraph appears green: |
|||
<div class="html-box" style="min-width: 160pt; height: 80pt; background-color: white; border: 2pt solid #303030; padding: 5px; user-select: none;> |
|||
<p id="xyz" style="color: green;">To demonstrate specificity</p> |
|||
</div> |
|||
===Inheritance=== |
|||
Inheritance is a key feature in CSS; it relies on the ancestor-descendant relationship to operate. Inheritance is the mechanism by which properties are applied not only to a specified element but also to its descendants.<ref name="Cascading"/> Inheritance relies on the document tree, which is the hierarchy of [[XHTML]] elements in a page based on nesting. Descendant elements may inherit CSS property values from any ancestor element enclosing them. |
|||
In general, descendant elements inherit text-related properties, but their box-related properties are not inherited. Properties that can be inherited are color, font, letter spacing, line-height, list-style, text-align, text-indent, text-transform, visibility, white-space, and word-spacing. Properties that cannot be inherited are background, border, display, float and clear, height, and width, margin, min- and max-height and -width, outline, overflow, padding, position, text-decoration, vertical-align, and z-index. |
|||
Inheritance can be used to avoid declaring certain properties over and over again in a style sheet, allowing for shorter CSS. |
|||
Inheritance in CSS is not the same as [[Class-based programming#Inheritance|inheritance in class-based programming languages]], where it is possible to define class B as "like class A, but with modifications".<ref>{{Cite web|title = Can a CSS class inherit one or more other classes?|url = https://stackoverflow.com/questions/1065435/can-a-css-class-inherit-one-or-more-other-classes|website = StackOverflow|access-date = 2017-09-10|archive-url = https://web.archive.org/web/20171014054727/https://stackoverflow.com/questions/1065435/can-a-css-class-inherit-one-or-more-other-classes|archive-date = 2017-10-14|url-status = live}}</ref> With CSS, it is possible to style an ''element'' with "class A, but with modifications". However, it is not possible to define a CSS ''class'' B like that, which could then be used to style multiple elements without having to repeat the modifications. |
Revision as of 17:18, 20 December 2023
- [1] - GA <-> On this day - 10 sample finished
- [2] - FailedGA <-> DYK talk - 10 sample finished
- interesting example - has both failedGA and GA
- [3] - Any ITN not folded in - 10 sample finished - open question as to whether we want to have AH without main status
- Example - no main status for article history
- [4] - any old PR not folded in - 10 sample finished
- Example for a PR that was actually reviewed within 3 edits - so we can't be sure that it is unreviewed even if it only has 3 edits.
- logic error - demoted FA don't retain their GA status
- [5] - existing AH talk pages that can fold in other infos - 10 sample finished
- Old PR reviewed vs. not reviewed determination was supplied by me.
- Phase II of trial: random 50 sample of all treatable pages - completed
- error was fixed, in both article and in bot code
- Errors (probably needs human intervention, but bot could improve) are logged as below:
Extended content
|
---|
|