diff --git a/tr/algorithms/CSS21.json b/tr/algorithms/CSS2.json similarity index 65% rename from tr/algorithms/CSS21.json rename to tr/algorithms/CSS2.json index 3d5157bf2fab..efa84dc842ec 100644 --- a/tr/algorithms/CSS21.json +++ b/tr/algorithms/CSS2.json @@ -9,19 +9,19 @@ "rationale": "parse", "steps": [ { - "html": "Parse the source document and create a document tree." + "html": "Parse the source document and create a document tree." }, { - "html": "Identify the target media type." + "html": "Identify the target media type." }, { - "html": "Retrieve all style sheets associated with the document that are\nspecified for the target media type." + "html": "Retrieve all style sheets associated with the document that are\nspecified for the target media type." }, { - "html": "Annotate every element of the document tree by assigning a single\nvalue to every property that is\napplicable to the target media type.\nProperties are assigned values according to the mechanisms described\nin the section on cascading and\ninheritance. \n\n

Part of the calculation of values depends on the formatting\nalgorithm appropriate for the target media\ntype. For example, if the target medium is the screen, user agents\napply the visual formatting model. \n\n

" + "html": "Annotate every element of the document tree by assigning a single\nvalue to every property that is\napplicable to the target media type.\nProperties are assigned values according to the mechanisms described\nin the section on cascading and\ninheritance. \n\n

Part of the calculation of values depends on the formatting\nalgorithm appropriate for the target media\ntype. For example, if the target medium is the screen, user agents\napply the visual formatting model. \n\n

" }, { - "html": "From the annotated document tree, generate a \n\nformatting\nstructure. Often, the formatting structure closely\nresembles the document tree, but it may also differ significantly,\nnotably when authors make use of pseudo-elements and generated content.\nFirst, the formatting structure need not be \"tree-shaped\" at all -- the\nnature of the structure depends on the implementation. Second, the\nformatting structure may contain more or less information than the\ndocument tree. For instance, if an element in the document tree has a\nvalue of 'none' for the 'display' property, that element will\ngenerate nothing in the formatting structure. A list element, on the\nother hand, may generate more information in the formatting structure:\nthe list element's content and list style information (e.g., a bullet\nimage).\n\n

Note that the CSS user agent does not alter the document tree\nduring this phase. In particular, content generated due to style\nsheets is not fed back to the document language processor (e.g., for\nreparsing).\n\n

" + "html": "From the annotated document tree, generate a \n\nformatting\nstructure. Often, the formatting structure closely\nresembles the document tree, but it may also differ significantly,\nnotably when authors make use of pseudo-elements and generated content.\nFirst, the formatting structure need not be \"tree-shaped\" at all -- the\nnature of the structure depends on the implementation. Second, the\nformatting structure may contain more or less information than the\ndocument tree. For instance, if an element in the document tree has a\nvalue of 'none' for the 'display' property, that element will\ngenerate nothing in the formatting structure. A list element, on the\nother hand, may generate more information in the formatting structure:\nthe list element's content and list style information (e.g., a bullet\nimage).\n\n

Note that the CSS user agent does not alter the document tree\nduring this phase. In particular, content generated due to style\nsheets is not fed back to the document language processor (e.g., for\nreparsing).\n\n

" }, { "html": "Transfer the formatting structure to the target medium (e.g., print\nthe results, display them on the screen, render them as speech,\netc.)." @@ -33,19 +33,19 @@ "rationale": "for", "steps": [ { - "html": "It must recognize one or more of the CSS 2.1 media types." + "html": "It must recognize one or more of the CSS 2.1 media types." }, { "html": "For each source document, it must attempt to retrieve all\nassociated style sheets that are appropriate for the recognized media\ntypes. If it cannot retrieve all associated style sheets (for instance,\nbecause of network errors), it must display the document using those\nit can retrieve." }, { - "html": "It must parse the style sheets according to this specification.\nIn particular, it must recognize all at-rules, blocks, declarations,\nand selectors (see the grammar of CSS 2.1).\nIf a user agent encounters a property that applies for a supported\nmedia type, the user agent must parse the value according to the property\ndefinition. This means that the user agent must accept all valid\nvalues and must\nignore declarations with\ninvalid values. User\nagents must ignore\nrules that apply to unsupported media\ntypes." + "html": "It must parse the style sheets according to this specification.\nIn particular, it must recognize all at-rules, blocks, declarations,\nand selectors (see the grammar of CSS 2.1).\nIf a user agent encounters a property that applies for a supported\nmedia type, the user agent must parse the value according to the property\ndefinition. This means that the user agent must accept all valid\nvalues and must\nignore declarations with\ninvalid values. User\nagents must ignore\nrules that apply to unsupported media\ntypes." }, { - "html": "For each element in a document tree, it\nmust assign a value for every property according to the\nproperty's definition and the rules of cascading and inheritance." + "html": "For each element in a document tree, it\nmust assign a value for every property according to the\nproperty's definition and the rules of cascading and inheritance." }, { - "html": "If the source document comes with alternate style sheet sets (such as\nwith the \"alternate\" keyword in HTML 4 [HTML4]), the UA must\nallow the user to select which style sheet set the UA should apply." + "html": "If the source document comes with alternate style sheet sets (such as\nwith the \"alternate\" keyword in HTML 4 [HTML4]), the UA must\nallow the user to select which style sheet set the UA should apply." }, { "html": "The UA must allow the user to turn off the influence of author style sheets." @@ -57,10 +57,10 @@ "rationale": "if", "steps": [ { - "html": "If the cascade results in a value, use it." + "html": "If the cascade results in a value, use it." }, { - "html": "Otherwise, if the property is inherited and the element is not the root of the document tree, use the computed value of the parent element." + "html": "Otherwise, if the property is inherited and the element is not the root of the document tree, use the computed value of the parent element." }, { "html": "Otherwise use the property's initial value. The initial value of each property is indicated in the property's definition." @@ -72,7 +72,7 @@ "rationale": "find", "steps": [ { - "html": "Find all declarations that apply to the element and property in\n question, for the target media type.\n Declarations apply if the associated selector matches the element in question and the\n target medium matches the media list on all @media rules\n containing the declaration and on all links on the path through\n which the style sheet was reached." + "html": "Find all declarations that apply to the element and property in\n question, for the target media type.\n Declarations apply if the associated selector matches the element in question and the\n target medium matches the media list on all @media rules\n containing the declaration and on all links on the path through\n which the style sheet was reached." }, { "html": "Sort according to importance (normal or important)\nand origin (author, user, or user agent). In ascending order of\nprecedence:", @@ -81,7 +81,7 @@ ] }, { - "html": "Sort rules with the same importance and origin by specificity \n of selector: more specific\n selectors will override more general ones. Pseudo-elements and\n pseudo-classes are counted as normal elements and classes,\n respectively." + "html": "Sort rules with the same importance and origin by specificity \n of selector: more specific\n selectors will override more general ones. Pseudo-elements and\n pseudo-classes are counted as normal elements and classes,\n respectively." }, { "html": "Finally, sort by order specified: if two declarations have the\n same weight, origin and specificity, the latter specified wins.\n Declarations in imported style sheets are considered to be before any\n declarations in the style sheet itself." @@ -93,22 +93,22 @@ "rationale": "if", "steps": [ { - "html": "The left outer edge of a\nleft-floating box may not be to the left of the left edge of its containing block. An\nanalogous rule holds for right-floating elements." + "html": "The left outer edge of a\nleft-floating box may not be to the left of the left edge of its containing block. An\nanalogous rule holds for right-floating elements." }, { - "html": "If the current box is left-floating, and there are any left-floating \nboxes generated by elements earlier in the source document,\nthen for each such earlier box, either the left outer edge of the current box must be\nto the right of the right outer edge\nof the earlier box, or its top must be lower than the bottom of the\nearlier box. Analogous rules hold for right-floating boxes." + "html": "If the current box is left-floating, and there are any left-floating \nboxes generated by elements earlier in the source document,\nthen for each such earlier box, either the left outer edge of the current box must be\nto the right of the right outer edge\nof the earlier box, or its top must be lower than the bottom of the\nearlier box. Analogous rules hold for right-floating boxes." }, { - "html": "The right outer edge of a\nleft-floating box may not be to the right of the left outer edge of any right-floating\nbox that is next to it. Analogous rules hold for\nright-floating elements." + "html": "The right outer edge of a\nleft-floating box may not be to the right of the left outer edge of any right-floating\nbox that is next to it. Analogous rules hold for\nright-floating elements." }, { - "html": "A floating box's outer top\nmay not be higher than the top of its containing block.\nWhen the float occurs between two collapsing margins, the\nfloat is positioned as if it had an otherwise empty anonymous block parent taking part in\nthe flow. The position of such a parent is defined by the rules in the section on margin\ncollapsing." + "html": "A floating box's outer top\nmay not be higher than the top of its containing block.\nWhen the float occurs between two collapsing margins, the\nfloat is positioned as if it had an otherwise empty anonymous block parent taking part in\nthe flow. The position of such a parent is defined by the rules in the section on margin\ncollapsing." }, { - "html": "The outer top of a floating box\nmay not be higher than the outer top of any block or floated box generated by an element\nearlier in the source document." + "html": "The outer top of a floating box\nmay not be higher than the outer top of any block or floated box generated by an element\nearlier in the source document." }, { - "html": "The outer top of an element's\nfloating box may not be higher than the top of any line-box containing a box\ngenerated by an element earlier in the source document." + "html": "The outer top of an element's\nfloating box may not be higher than the top of any line-box containing a box\ngenerated by an element earlier in the source document." }, { "html": "A left-floating box that has another left-floating box to its left\nmay not have its right outer edge to the right of its containing\nblock's right edge. (Loosely: a left float may not stick out at the\nright edge, unless it is already as far to the left as possible.) An\nanalogous rule holds for right-floating elements." @@ -122,14 +122,14 @@ ] }, { - "html": "The three properties that affect box generation and layout — \n'display', \n'position', and \n'float' — interact as follows:", + "html": "The three properties that affect box generation and layout — \n'display', \n'position', and \n'float' — interact as follows:", "rationale": "if", "steps": [ { - "html": "If 'display'\nhas the value 'none', then \n'position' and\n'float' do not apply. \nIn this case, the element generates no box." + "html": "If 'display'\nhas the value 'none', then \n'position' and\n'float' do not apply. \nIn this case, the element generates no box." }, { - "html": "Otherwise, if 'position'\nhas the value 'absolute' or 'fixed', the box is absolutely positioned, \nthe computed\nvalue of 'float' is 'none', \nand display is set according to the table below. \nThe position of the box will be determined by the 'top', 'right', 'bottom' and 'left' properties and the box's \ncontaining block." + "html": "Otherwise, if 'position'\nhas the value 'absolute' or 'fixed', the box is absolutely positioned, \nthe computed\nvalue of 'float' is 'none', \nand display is set according to the table below. \nThe position of the box will be determined by the 'top', 'right', 'bottom' and 'left' properties and the box's \ncontaining block." }, { "html": "Otherwise, if 'float' has a value other than 'none', the box is\nfloated and 'display' is set according to the table below." @@ -138,7 +138,7 @@ "html": "Otherwise, if the element is the root element, \n'display' is set according to the table below, except that it is\nundefined in CSS 2.1 whether a specified value of 'list-item'\nbecomes a computed value of 'block' or 'list-item'." }, { - "html": "Otherwise, the remaining 'display' property values apply\nas specified." + "html": "Otherwise, the remaining 'display' property values apply\nas specified." } ] }, @@ -148,13 +148,13 @@ "rationale": "for", "steps": [ { - "html": "The containing block in which the root\nelement lives is a rectangle called the initial containing block. For continuous\nmedia, it has the dimensions of the viewport and is anchored at the\ncanvas origin; it is the page area\nfor paged media. The 'direction' property of the initial\ncontaining block is the same as for the root element." + "html": "The containing block in which the root\nelement lives is a rectangle called the initial containing block. For continuous\nmedia, it has the dimensions of the viewport and is anchored at the\ncanvas origin; it is the page area\nfor paged media. The 'direction' property of the initial\ncontaining block is the same as for the root element." }, { - "html": "For other elements, if the element's position is 'relative' or 'static',\nthe containing block is formed by the content edge of the nearest\nblock container ancestor box." + "html": "For other elements, if the element's position is 'relative' or 'static',\nthe containing block is formed by the content edge of the nearest\nblock container ancestor box." }, { - "html": "If the element has 'position: fixed', the containing block is\nestablished by the viewport\nin the case of continuous media or the page area in the case of paged media." + "html": "If the element has 'position: fixed', the containing block is\nestablished by the viewport\nin the case of continuous media or the page area in the case of paged media." }, { "html": "If the element has 'position: absolute', the containing block is\nestablished by the nearest ancestor with a 'position' of 'absolute', 'relative'\nor 'fixed', in the following way:", @@ -164,87 +164,87 @@ "html": "In the case that the ancestor is an inline element, the containing\nblock is the bounding box around the padding boxes of the first and\nthe last inline boxes\ngenerated for that element. In CSS 2.1, if the inline\nelement is split\nacross multiple lines, the containing block is undefined." }, { - "html": "Otherwise, the containing block\nis formed by the padding edge of\n\nthe ancestor." + "html": "Otherwise, the containing block\nis formed by the padding edge of\n\nthe ancestor." } ] } ] }, { - "html": "In this case, section 10.3.7\napplies up through and including the constraint equation, but the rest\nof section 10.3.7 is replaced by\nthe following rules:", + "html": "In this case, section 10.3.7\napplies up through and including the constraint equation, but the rest\nof section 10.3.7 is replaced by\nthe following rules:", "rationale": "if", "steps": [ { - "html": "The used value of 'width' is\ndetermined as for inline replaced\nelements.\nIf 'margin-left' or 'margin-right' is specified as\n'auto' its used value is determined by the rules below." + "html": "The used value of 'width' is\ndetermined as for inline replaced\nelements.\nIf 'margin-left' or 'margin-right' is specified as\n'auto' its used value is determined by the rules below." }, { - "html": "If both 'left' and 'right' have the value 'auto', then if\nthe 'direction' property of the element establishing the\nstatic-position containing block is 'ltr', set 'left' to\nthe static position; else if 'direction' is 'rtl', set 'right' to the static position." + "html": "If both 'left' and 'right' have the value 'auto', then if\nthe 'direction' property of the element establishing the\nstatic-position containing block is 'ltr', set 'left' to\nthe static position; else if 'direction' is 'rtl', set 'right' to the static position." }, { - "html": "If 'left' or 'right' are 'auto', replace any 'auto'\non 'margin-left' or 'margin-right' with '0'." + "html": "If 'left' or 'right' are 'auto', replace any 'auto'\non 'margin-left' or 'margin-right' with '0'." }, { - "html": "If at this point both 'margin-left' and 'margin-right' are still 'auto',\nsolve the equation under the extra constraint that the two margins\nmust get equal values, unless this would make them negative, in which\ncase when the direction of the containing block is 'ltr' ('rtl'), set\n'margin-left' ('margin-right') to zero and solve\nfor 'margin-right' ('margin-left')." + "html": "If at this point both 'margin-left' and 'margin-right' are still 'auto',\nsolve the equation under the extra constraint that the two margins\nmust get equal values, unless this would make them negative, in which\ncase when the direction of the containing block is 'ltr' ('rtl'), set\n'margin-left' ('margin-right') to zero and solve\nfor 'margin-right' ('margin-left')." }, { "html": "If at this point there is an 'auto' left, solve the equation \nfor that value." }, { - "html": "If at this point the values are over-constrained, ignore the value\nfor either 'left' (in case the\n'direction' property of the\ncontaining block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for\nthat value." + "html": "If at this point the values are over-constrained, ignore the value\nfor either 'left' (in case the\n'direction' property of the\ncontaining block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for\nthat value." } ] }, { - "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'width' property:", + "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'width' property:", "rationale": "if", "steps": [ { - "html": "The tentative used width is calculated (without 'min-width' and 'max-width') following the rules\nunder \"Calculating widths and\nmargins\" above." + "html": "The tentative used width is calculated (without 'min-width' and 'max-width') following the rules\nunder \"Calculating widths and\nmargins\" above." }, { - "html": "If the tentative used width is greater than 'max-width', the rules above are applied again, but\nthis time using the computed value of 'max-width' as the computed value\nfor 'width'." + "html": "If the tentative used width is greater than 'max-width', the rules above are applied again, but\nthis time using the computed value of 'max-width' as the computed value\nfor 'width'." }, { - "html": "If the resulting width is smaller than 'min-width', the rules above are applied again, but\nthis time using the value of 'min-width' as the computed value\nfor 'width'." + "html": "If the resulting width is smaller than 'min-width', the rules above are applied again, but\nthis time using the value of 'min-width' as the computed value\nfor 'width'." } ] }, { - "html": "This situation is similar to the previous one, except that the\nelement has an intrinsic height. The\nsequence of substitutions is now:", + "html": "This situation is similar to the previous one, except that the\nelement has an intrinsic height. The\nsequence of substitutions is now:", "rationale": "if", "steps": [ { - "html": "The used value of 'height' is determined as for inline replaced elements.\nIf 'margin-top' or 'margin-bottom' is specified as 'auto' its used\nvalue is determined by the rules below." + "html": "The used value of 'height' is determined as for inline replaced elements.\nIf 'margin-top' or 'margin-bottom' is specified as 'auto' its used\nvalue is determined by the rules below." }, { - "html": "If both 'top' and 'bottom' have the value 'auto', replace\n'top' with the element's static position." + "html": "If both 'top' and 'bottom' have the value 'auto', replace\n'top' with the element's static position." }, { - "html": "If 'bottom' is 'auto',\nreplace any 'auto' on 'margin-top' or 'margin-bottom' with '0'." + "html": "If 'bottom' is 'auto',\nreplace any 'auto' on 'margin-top' or 'margin-bottom' with '0'." }, { - "html": "If at this point both 'margin-top' and 'margin-bottom' are still\n'auto', solve the equation under the extra constraint that the two\nmargins must get equal values." + "html": "If at this point both 'margin-top' and 'margin-bottom' are still\n'auto', solve the equation under the extra constraint that the two\nmargins must get equal values." }, { "html": "If at this point there is only one 'auto' left, solve the equation \nfor that value." }, { - "html": "If at this point the values are over-constrained, ignore the value\nfor 'bottom' and solve for that\nvalue." + "html": "If at this point the values are over-constrained, ignore the value\nfor 'bottom' and solve for that\nvalue." } ] }, { - "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'height' property:", + "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'height' property:", "rationale": "if", "steps": [ { - "html": "The tentative used height is calculated (without 'min-height' and 'max-height') following the rules\nunder \"Calculating heights and\nmargins\" above." + "html": "The tentative used height is calculated (without 'min-height' and 'max-height') following the rules\nunder \"Calculating heights and\nmargins\" above." }, { - "html": "If this tentative height is greater than 'max-height', the rules above are applied again, but\nthis time using the value of 'max-height' as the computed value\nfor 'height'." + "html": "If this tentative height is greater than 'max-height', the rules above are applied again, but\nthis time using the value of 'max-height' as the computed value\nfor 'height'." }, { - "html": "If the resulting height is smaller than 'min-height', the rules above are applied again, but\nthis time using the value of 'min-height' as the computed value\nfor 'height'." + "html": "If the resulting height is smaller than 'min-height', the rules above are applied again, but\nthis time using the value of 'min-height' as the computed value\nfor 'height'." } ] }, @@ -382,10 +382,10 @@ "rationale": "/^otherwise(\\,| )/i", "steps": [ { - "html": "A column element with a value other than 'auto' for the 'width' property sets the width for\n that column." + "html": "A column element with a value other than 'auto' for the 'width' property sets the width for\n that column." }, { - "html": "Otherwise, a cell in the first row with a value other than\n 'auto' for the 'width' property\n determines the width for that column. If the cell spans more than\n one column, the width is divided over the columns." + "html": "Otherwise, a cell in the first row with a value other than\n 'auto' for the 'width' property\n determines the width for that column. If the cell spans more than\n one column, the width is divided over the columns." }, { "html": "Any remaining columns equally divide the remaining horizontal\n table space (minus borders or cell spacing)." @@ -397,10 +397,10 @@ "rationale": "for", "steps": [ { - "html": "

Calculate the minimum content width (MCW) of each cell: the\n formatted content may span any number of lines but may not overflow\n the cell box. If the specified 'width' (W) of the cell is greater\n than MCW, W is the minimum cell width. A value of 'auto' means that\n MCW is the minimum cell width.\n\n

Also, calculate the \"maximum\" cell width of each cell: formatting\n the content without breaking lines other than where explicit line\n breaks occur.\n\n

" + "html": "

Calculate the minimum content width (MCW) of each cell: the\n formatted content may span any number of lines but may not overflow\n the cell box. If the specified 'width' (W) of the cell is greater\n than MCW, W is the minimum cell width. A value of 'auto' means that\n MCW is the minimum cell width.\n\n

Also, calculate the \"maximum\" cell width of each cell: formatting\n the content without breaking lines other than where explicit line\n breaks occur.\n\n

" }, { - "html": "

For each column, determine a maximum and minimum column width\n from the cells that span only that column. The minimum is that\n required by the cell with the largest minimum cell width (or the\n column 'width', whichever is\n larger). The maximum is that required by the cell with the largest\n maximum cell width (or the column 'width', whichever is larger).\n\n

" + "html": "

For each column, determine a maximum and minimum column width\n from the cells that span only that column. The minimum is that\n required by the cell with the largest minimum cell width (or the\n column 'width', whichever is\n larger). The maximum is that required by the cell with the largest\n maximum cell width (or the column 'width', whichever is larger).\n\n

" }, { "html": "

For each cell that spans more than one column, increase the\n minimum widths of the columns it spans so that together, they are at\n least as wide as the cell. Do the same for the maximum widths. If\n possible, widen all spanned columns by approximately the same\n amount.\n\n

" @@ -415,7 +415,7 @@ "rationale": "if", "steps": [ { - "html": "If the 'table' or 'inline-table' element's 'width' property has a computed value\n (W) other than 'auto', the used width is\n the greater of W, CAPMIN, and the minimum width required by all the\n columns plus cell spacing or borders (MIN). If the used width is\n greater than MIN, the\n extra width should be distributed over the columns." + "html": "If the 'table' or 'inline-table' element's 'width' property has a computed value\n (W) other than 'auto', the used width is\n the greater of W, CAPMIN, and the minimum width required by all the\n columns plus cell spacing or borders (MIN). If the used width is\n greater than MIN, the\n extra width should be distributed over the columns." }, { "html": "If the 'table' or 'inline-table' element has 'width: auto',\n the used width is the greater of the table's containing block width,\n CAPMIN, and MIN. However, if either CAPMIN or the maximum width\n required by the columns plus cell spacing or borders (MAX) is less\n than that of the containing block, use max(MAX, CAPMIN)." @@ -445,13 +445,13 @@ "rationale": "if", "steps": [ { - "html": "Borders with the 'border-style' of 'hidden' take\n precedence over all other conflicting borders. Any border with this\n value suppresses all borders at this location." + "html": "Borders with the 'border-style' of 'hidden' take\n precedence over all other conflicting borders. Any border with this\n value suppresses all borders at this location." }, { "html": "Borders with a style of 'none' have the lowest priority. Only if\n the border properties of all the elements meeting at this edge are\n 'none' will the border be omitted (but note that 'none' is the\n default value for the border style.)" }, { - "html": "If none of the styles are 'hidden' and at least one of them is\n not 'none', then narrow borders are discarded in favor of wider\n ones. If several have the same 'border-width' then styles are\n preferred in this order: 'double', 'solid', 'dashed', 'dotted',\n 'ridge', 'outset', 'groove', and the lowest: 'inset'." + "html": "If none of the styles are 'hidden' and at least one of them is\n not 'none', then narrow borders are discarded in favor of wider\n ones. If several have the same 'border-width' then styles are\n preferred in this order: 'double', 'solid', 'dashed', 'dotted',\n 'ridge', 'outset', 'groove', and the lowest: 'inset'." }, { "html": "If border styles differ only in color, then a style set on a\n cell wins over one on a row, which wins over a row group, column,\n column group and, lastly, table. When two elements of the same type\n conflict, then the one further to the left (if the table's\n 'direction' is 'ltr'; right, if it is 'rtl') and further to the top\n wins." @@ -560,10 +560,10 @@ "rationale": "if", "steps": [ { - "html": "If the 'direction' is\n'ltr', the top and left of the containing block are the top and left\npadding edges of the first box generated by the ancestor, and the\nbottom and right are the bottom and right padding edges of the last\nbox of the ancestor." + "html": "If the 'direction' is\n'ltr', the top and left of the containing block are the top and left\npadding edges of the first box generated by the ancestor, and the\nbottom and right are the bottom and right padding edges of the last\nbox of the ancestor." }, { - "html": "If the 'direction' is\n'rtl', the top and right are the top and right padding edges of the\nfirst box generated by the ancestor, and the bottom and left are the\nbottom and left padding edges of the last box of the ancestor." + "html": "If the 'direction' is\n'rtl', the top and right are the top and right padding edges of the\nfirst box generated by the ancestor, and the bottom and left are the\nbottom and left padding edges of the last box of the ancestor." } ] } @@ -590,7 +590,7 @@ ] }, { - "html": "The painting order for the descendants of an element generating\n a stacking context (see the 'z-index' property) is:", + "html": "The painting order for the descendants of an element generating\n a stacking context (see the 'z-index' property) is:", "rationale": "if", "steps": [ { @@ -628,7 +628,7 @@ "rationale": "jump", "steps": [ { - "html": "Jump to 7.2.1 for the\n\t box(es) of the element in that line box (in tree order)." + "html": "Jump to 7.2.1 for the\n\t box(es) of the element in that line box (in tree order)." } ] } @@ -673,7 +673,7 @@ ] }, { - "html": "

Otherwise, jump to 7.2.1 for that\n\t\t\t element.\n\t\t\t

" + "html": "

Otherwise, jump to 7.2.1 for that\n\t\t\t element.\n\t\t\t

" } ] } @@ -696,12 +696,12 @@ ] }, { - "html": "

Optionally, the outline of the element (see 10 below).\n\t

" + "html": "

Optionally, the outline of the element (see 10 below).\n\t

" } ] }, { - "html": "

Optionally, if the element is block-level, the outline\n\t of the element (see 10 below).\n\t

" + "html": "

Optionally, if the element is block-level, the outline\n\t of the element (see 10 below).\n\t

" } ] }, diff --git a/tr/algorithms/CSS22.json b/tr/algorithms/CSS22.json deleted file mode 100644 index 960711635f0e..000000000000 --- a/tr/algorithms/CSS22.json +++ /dev/null @@ -1,608 +0,0 @@ -{ - "spec": { - "title": "Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification", - "url": "https://www.w3.org/TR/CSS22/" - }, - "algorithms": [ - { - "html": "In this model, a user agent processes a source\nby going through the following steps:", - "rationale": "parse", - "steps": [ - { - "html": "Parse the source document and create a document tree." - }, - { - "html": "Identify the target media type." - }, - { - "html": "Retrieve all style sheets associated with the document that are\nspecified for the target media type." - }, - { - "html": "Annotate every element of the document tree by assigning a single\nvalue to every property that is\napplicable to the target media type.\nProperties are assigned values according to the mechanisms described\nin the section on cascading and\ninheritance. \n\n

Part of the calculation of values depends on the formatting\nalgorithm appropriate for the target media\ntype. For example, if the target medium is the screen, user agents\napply the visual formatting model. \n\n

" - }, - { - "html": "From the annotated document tree, generate a \n\nformatting\nstructure. Often, the formatting structure closely\nresembles the document tree, but it may also differ significantly,\nnotably when authors make use of pseudo-elements and generated content.\nFirst, the formatting structure need not be \"tree-shaped\" at all -- the\nnature of the structure depends on the implementation. Second, the\nformatting structure may contain more or less information than the\ndocument tree. For instance, if an element in the document tree has a\nvalue of 'none' for the 'display' property, that element will\ngenerate nothing in the formatting structure. A list element, on the\nother hand, may generate more information in the formatting structure:\nthe list element's content and list style information (e.g., a bullet\nimage).\n\n

Note that the CSS user agent does not alter the document tree\nduring this phase. In particular, content generated due to style\nsheets is not fed back to the document language processor (e.g., for\nreparsing).\n\n

" - }, - { - "html": "Transfer the formatting structure to the target medium (e.g., print\nthe results, display them on the screen, render them as speech,\netc.)." - } - ] - }, - { - "html": "In general, the following points must be observed by a user agent\nclaiming conformance to this specification:", - "rationale": "for", - "steps": [ - { - "html": "It must recognize one or more of the CSS 2.2 media types." - }, - { - "html": "For each source document, it must attempt to retrieve all \nassociated style sheets that are appropriate for the recognized media\ntypes. If it cannot retrieve all associated style sheets (for instance,\nbecause of network errors), it must display the document using those\nit can retrieve." - }, - { - "html": "It must parse the style sheets according to this specification.\nIn particular, it must recognize all at-rules, blocks, declarations,\nand selectors (see the grammar of CSS 2.2).\nIf a user agent encounters a property that applies for a supported\nmedia type, the user agent must parse the value according to the property\ndefinition. This means that the user agent must accept all valid\nvalues and must \nignore declarations with\ninvalid values. User\nagents must ignore\nrules that apply to unsupported media\ntypes." - }, - { - "html": "For each element in a document tree, it\nmust assign a value for every property according to the\nproperty's definition and the rules of cascading and inheritance." - }, - { - "html": "If the source document comes with alternate style sheet sets (such as\nwith the \"alternate\" keyword in HTML 4 [HTML4]), the UA must\nallow the user to select which style sheet set the UA should apply." - }, - { - "html": "The UA must allow the user to turn off the influence of author style sheets." - } - ] - }, - { - "html": "User agents must first assign a specified value to each property based\non the following mechanisms (in order of precedence):", - "rationale": "if", - "steps": [ - { - "html": "If the cascade results in a value, use it.\nExcept that, if the value is 'inherit', the specified value is defined\nin “The 'inherit' value” below." - }, - { - "html": "Otherwise, if the property is inherited and the element is not the root of the document tree, use the computed value of the parent element." - }, - { - "html": "Otherwise use the property's initial value. The initial value of each property is indicated in the property's definition." - } - ] - }, - { - "html": "To find the value for an element/property combination, user agents\nmust apply the following sorting order:", - "rationale": "find", - "steps": [ - { - "html": "Find all declarations that apply to the element and property in\n question, for the target media type.\n Declarations apply if the associated selector matches the element in question and the\n target medium matches the media list on all @media rules\n containing the declaration and on all links on the path through\n which the style sheet was reached." - }, - { - "html": "Sort according to importance (normal or important)\nand origin (author, user, or user agent). In ascending order of\nprecedence:", - "ignored": [ - "user agent declarations user normal declarations author normal declarations author important declarations user important declarations" - ] - }, - { - "html": "Sort rules with the same importance and origin by specificity \n of selector: more specific\n selectors will override more general ones. Pseudo-elements and\n pseudo-classes are counted as normal elements and classes,\n respectively." - }, - { - "html": "Finally, sort by order specified: if two declarations have the\n same weight, origin and specificity, the latter specified wins.\n Declarations in imported style sheets are considered to be before any\n declarations in the style sheet itself." - } - ] - }, - { - "html": "Here are the precise rules that\ngovern the behavior of floats:", - "rationale": "if", - "steps": [ - { - "html": "The left outer edge of a\nleft-floating box may not be to the left of the left edge of its containing block. An\nanalogous rule holds for right-floating elements." - }, - { - "html": "If the current box is left-floating, and there are any left-floating \nboxes generated by elements earlier in the source document,\nthen for each such earlier box, either the left outer edge of the current box must be\nto the right of the right outer edge\nof the earlier box, or its top must be lower than the bottom of the\nearlier box. Analogous rules hold for right-floating boxes." - }, - { - "html": "The right outer edge of a\nleft-floating box may not be to the right of the left outer edge of any right-floating\nbox that is next to it. Analogous rules hold for\nright-floating elements." - }, - { - "html": "A floating box's outer top\nmay not be higher than the top of its containing block.\nWhen the float occurs between two collapsing margins, the\nfloat is positioned as if it had an otherwise empty anonymous block parent taking part in\nthe flow. The position of such a parent is defined by the rules in the section on margin\ncollapsing." - }, - { - "html": "The outer top of a floating box\nmay not be higher than the outer top of any block or floated box generated by an element\nearlier in the source document." - }, - { - "html": "The outer top of an element's\nfloating box may not be higher than the top of any line-box containing a box\ngenerated by an element earlier in the source document." - }, - { - "html": "A left-floating box that has another left-floating box to its left\nmay not have its right outer edge to the right of its containing\nblock's right edge. (Loosely: a left float may not stick out at the\nright edge, unless it is already as far to the left as possible.) An\nanalogous rule holds for right-floating elements." - }, - { - "html": "A floating box must be placed as high as possible." - }, - { - "html": "A left-floating box must be put as far to the left as\npossible, a right-floating box as far to the right as possible. A\nhigher position is preferred over one that is further to the\nleft/right." - } - ] - }, - { - "html": "The three properties that affect box generation and layout — \n'display', \n'position', and \n'float' — interact as follows:", - "rationale": "if", - "steps": [ - { - "html": "If 'display'\nhas the value 'none', then \n'position' and\n'float' do not apply. \nIn this case, the element generates no box." - }, - { - "html": "Otherwise, if 'position'\nhas the value 'absolute' or 'fixed', the box is absolutely positioned, \nthe computed\nvalue of 'float' is 'none', \nand display is set according to the table below. \nThe position of the box will be determined by the 'top', 'right', 'bottom' and 'left' properties and the box's \ncontaining block." - }, - { - "html": "Otherwise, if 'float' has a value other than 'none', the box is\nfloated and 'display' is set according to the table below." - }, - { - "html": "Otherwise, if the element is the root element, \n'display' is set according to the table below, except that it is\nundefined in CSS 2.2 whether a specified value of 'list-item'\nbecomes a computed value of 'block' or 'list-item'." - }, - { - "html": "Otherwise, the remaining 'display' property values apply\nas specified." - } - ] - }, - { - "name": "containing block", - "html": "The position and size of an element's box(es) are sometimes\ncalculated relative to a certain rectangle, called the containing\nblock of the element. The containing block of an element\nis defined as follows:", - "rationale": "for", - "steps": [ - { - "html": "The containing block in which the root\nelement lives is a rectangle called the initial containing block. For continuous\nmedia, it has the dimensions of the viewport and is anchored at the\ncanvas origin; it is the page area\nfor paged media. The 'direction' property of the initial\ncontaining block is the same as for the root element." - }, - { - "html": "For other elements, if the element's position is 'relative' or 'static',\nthe containing block is formed by the content edge of the nearest\nancestor box that is a block\ncontainer or which establishes a formatting context." - }, - { - "html": "If the element has 'position: fixed', the containing block is\nestablished by the viewport\nin the case of continuous media or the page area in the case of paged media." - }, - { - "html": "If the element has 'position: absolute', the containing block is\nestablished by the nearest ancestor with a 'position' of 'absolute', 'relative'\nor 'fixed', in the following way:", - "rationale": "/^otherwise(\\,| )/i", - "steps": [ - { - "html": "In the case that the ancestor is an inline element, the containing\nblock is the bounding box around the padding boxes of the first and\nthe last inline boxes\ngenerated for that element. In CSS 2.2, if the inline\nelement is split\nacross multiple lines, the containing block is undefined." - }, - { - "html": "Otherwise, the containing block\nis formed by the padding edge of\n\nthe ancestor." - } - ] - } - ] - }, - { - "html": "In this case, section 10.3.7\napplies up through and including the constraint equation, but the rest\nof section 10.3.7 is replaced by\nthe following rules:", - "rationale": "if", - "steps": [ - { - "html": "The used value of 'width' is\ndetermined as for inline replaced\nelements.\nIf 'margin-left' or 'margin-right' is specified as\n'auto' its used value is determined by the rules below." - }, - { - "html": "If both 'left' and 'right' have the value 'auto', then if\nthe 'direction' property of the element establishing the\nstatic-position containing block is 'ltr', set 'left' to\nthe static position; else if 'direction' is 'rtl', set 'right' to the static position." - }, - { - "html": "If 'left' or 'right' are 'auto', replace any 'auto'\non 'margin-left' or 'margin-right' with '0'." - }, - { - "html": "If at this point both 'margin-left' and 'margin-right' are still 'auto',\nsolve the equation under the extra constraint that the two margins\nmust get equal values, unless this would make them negative, in which\ncase when the direction of the containing block is 'ltr' ('rtl'), set\n'margin-left' ('margin-right') to zero and solve\nfor 'margin-right' ('margin-left')." - }, - { - "html": "If at this point there is an 'auto' left, solve the equation \nfor that value." - }, - { - "html": "If at this point the values are over-constrained, ignore the value\nfor either 'left' (in case the\n'direction' property of the\ncontaining block is 'rtl') or 'right' (in case 'direction' is 'ltr') and solve for\nthat value." - } - ] - }, - { - "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'width' property:", - "rationale": "if", - "steps": [ - { - "html": "The tentative used width is calculated (without 'min-width' and 'max-width') following the rules\nunder \"Calculating widths and\nmargins\" above." - }, - { - "html": "If the tentative used width is greater than 'max-width', the rules above are applied again, but\nthis time using the computed value of 'max-width' as the computed value\nfor 'width'." - }, - { - "html": "If the resulting width is smaller than 'min-width', the rules above are applied again, but\nthis time using the value of 'min-width' as the computed value\nfor 'width'." - } - ] - }, - { - "html": "This situation is similar to the previous one, except that the\nelement has an intrinsic height. The\nsequence of substitutions is now:", - "rationale": "if", - "steps": [ - { - "html": "The used value of 'height' is determined as for inline replaced elements.\nIf 'margin-top' or 'margin-bottom' is specified as 'auto' its used\nvalue is determined by the rules below." - }, - { - "html": "If both 'top' and 'bottom' have the value 'auto', replace\n'top' with the element's static position." - }, - { - "html": "If 'bottom' is 'auto',\nreplace any 'auto' on 'margin-top' or 'margin-bottom' with '0'." - }, - { - "html": "If at this point both 'margin-top' and 'margin-bottom' are still\n'auto', solve the equation under the extra constraint that the two\nmargins must get equal values." - }, - { - "html": "If at this point there is only one 'auto' left, solve the equation \nfor that value." - }, - { - "html": "If at this point the values are over-constrained, ignore the value\nfor 'bottom' and solve for that\nvalue." - } - ] - }, - { - "html": "The following algorithm describes how the two properties influence\nthe used value\nof the 'height' property:", - "rationale": "if", - "steps": [ - { - "html": "The tentative used height is calculated (without 'min-height' and 'max-height') following the rules\nunder \"Calculating heights and\nmargins\" above." - }, - { - "html": "If this tentative height is greater than 'max-height', the rules above are applied again, but\nthis time using the value of 'max-height' as the computed value\nfor 'height'." - }, - { - "html": "If the resulting height is smaller than 'min-height', the rules above are applied again, but\nthis time using the value of 'min-height' as the computed value\nfor 'height'." - } - ] - }, - { - "html": "The size of the image is calculated from the following rules:", - "rationale": "if", - "steps": [ - { - "html": "If the image has an intrinsic width and height, the used width and\nheight are the intrinsic width and height." - }, - { - "html": "Otherwise, if the image has an intrinsic ratio and either an\nintrinsic width or an intrinsic height, the used width/height is the\nsame as the provided intrinsic width/height, and the used value of the\nmissing dimension is calculated from the provided dimension and the\nratio." - }, - { - "html": "Otherwise, if the image has an intrinsic ratio, the used width is\n1em and the used height is calculated from this width and the\nintrinsic ratio. If this would produce a height larger than 1em, then\nthe used height is instead set to 1em and the used width is calculated\nfrom this height and the intrinsic ratio." - }, - { - "html": "Otherwise, the image's used width is its intrinsic width if it has\none, or else 1em. The image's used height is its intrinsic height if\nit has one, or else 1em." - } - ] - }, - { - "html": "Because there is no accepted, universal taxonomy of font\nproperties, matching of properties to font faces must be done\ncarefully. The properties are matched in a well-defined order to\ninsure that the results of this matching process are as consistent as\npossible across UAs (assuming that the same library of font faces is\npresented to each of them).", - "rationale": "if", - "steps": [ - { - "html": "The User Agent makes (or accesses) a database of relevant CSS 2.2\nproperties of all the fonts of which the UA is aware.\nIf there are two fonts with exactly the same properties, the user\nagent selects one of them." - }, - { - "html": "At a given element and for each character in that element, the UA\nassembles the font properties applicable to that element. Using the\ncomplete set of properties, the UA uses the 'font-family' property to\nchoose a tentative font family. The remaining properties are tested\nagainst the family according to the matching criteria described with\neach property. If there are matches for all the remaining properties,\nthen that is the matching font face for the given element or character." - }, - { - "html": "If there is no matching font face within the 'font-family' being\nprocessed by step 2, and if there is a next alternative 'font-family'\nin the font set, then repeat step 2 with the next alternative\n'font-family'." - }, - { - "html": "If there is a matching font face, but it does not contain a glyph\nfor the current character, and if there is a next alternative\n'font-family' in the font sets, then repeat step 2 with the next\nalternative 'font-family'." - }, - { - "html": "If there is no font within the family selected in 2, then use a\n UA-dependent default 'font-family' and repeat step 2, using the best\n match that can be obtained within the default font. If a particular\n character cannot be displayed using this font, then the UA may use other\n means to determine a suitable font for that character. The UA should map\n each character for which it has no suitable font to a visible symbol\n chosen by the UA, preferably a \"missing character\" glyph from one of the\n font faces available to the UA." - } - ] - }, - { - "html": "For each inline element (including anonymous inline elements), the\nfollowing steps are performed, treating bidi formatting characters as if\nthey were not there:", - "rationale": "if", - "steps": [ - { - "html": "Each tab (U+0009), carriage return (U+000D), or space (U+0020) \ncharacter surrounding a linefeed (U+000A) character is removed if \n'white-space' is set to 'normal', 'nowrap', or 'pre-line'." - }, - { - "html": "If 'white-space' is set to 'pre' or 'pre-wrap', any sequence of\n spaces (U+0020) unbroken by an element boundary is treated as a\n sequence of non-breaking spaces. However, for 'pre-wrap', a line breaking\n opportunity exists at the end of the sequence." - }, - { - "html": "If 'white-space' is set to 'normal' or 'nowrap', linefeed\n characters are transformed for rendering purpose into one of the\n following characters: a space character, a zero width space\n character (U+200B), or no character (i.e., not rendered),\n according to UA-specific algorithms based on the content script." - }, - { - "html": "If 'white-space' is set to 'normal', 'nowrap', or 'pre-line',", - "ignored": [ - "every tab (U+0009) is converted to a space (U+0020) any space (U+0020) following another space (U+0020) — even a space before the inline, if that space also has 'white-space' set to 'normal', 'nowrap' or 'pre-line' — is removed." - ] - } - ] - }, - { - "html": "As each line is laid out,", - "rationale": "if", - "steps": [ - { - "html": "If a space (U+0020) at the beginning of a line has 'white-space'\n set to 'normal', 'nowrap', or 'pre-line', it is removed." - }, - { - "html": "All tabs (U+0009) are rendered as a horizontal shift that lines\n up the start edge of the next glyph with the next tab stop. Tab\n stops occur at points that are multiples of 8 times the width of\n a space (U+0020) rendered in the block's font from the block's\n starting content edge." - }, - { - "html": "If a space (U+0020) at the end of a line has 'white-space' set to\n 'normal', 'nowrap', or 'pre-line', it is also removed." - }, - { - "html": "If spaces (U+0020) or tabs (U+0009) at the end of a line have\n 'white-space' set to 'pre-wrap', UAs may visually collapse them." - } - ] - }, - { - "html": "The following steps are performed in three stages.", - "rationale": "remove", - "steps": [ - { - "html": "Remove irrelevant boxes:", - "rationale": "if", - "steps": [ - { - "html": "All child boxes of a 'table-column' parent are treated as if\n they had 'display: none'." - }, - { - "html": "If a child C of a 'table-column-group' parent is\n not a 'table-column' box, then it is treated as if it had\n 'display: none'." - }, - { - "html": "If a child C of a tabular container P\n is an anonymous inline box that contains only white space,\n and its immediately preceding and following siblings, if\n any, are proper table descendants of P and are\n either 'table-caption' or internal table boxes, then it is\n treated as if it had 'display: none'. A box D is\n a proper table descendant of A if D\n can be a descendant of A without causing the\n generation of any intervening 'table' or 'inline-table'\n boxes." - }, - { - "html": "If a box B is an anonymous inline containing only\n white space, and is between two immediate siblings each of\n which is either an internal table box or a 'table-caption'\n box then B is treated as if it had 'display:\n none'." - } - ] - }, - { - "html": "Generate missing child wrappers:", - "rationale": "if", - "steps": [ - { - "html": "If a child C of a 'table' or 'inline-table' box\n is not a proper table child, then generate an anonymous\n 'table-row' box around C and all consecutive\n siblings of C that are not proper table children." - }, - { - "html": "If a child C of a row group box is not a\n 'table-row' box, then generate an anonymous 'table-row' box\n around C and all consecutive siblings\n of C that are not 'table-row' boxes." - }, - { - "html": "If a child C of a 'table-row' box is not a\n 'table-cell', then generate an anonymous 'table-cell' box\n around C and all consecutive siblings\n of C that are not 'table-cell' boxes." - } - ] - }, - { - "html": "Generate missing parents:", - "rationale": "for", - "steps": [ - { - "html": "For each 'table-cell' box C in a sequence of\n consecutive internal table and 'table-caption' siblings,\n if C's parent is not a 'table-row' then generate\n an anonymous 'table-row' box around C and all\n consecutive siblings of C that are 'table-cell'\n boxes." - }, - { - "html": "For each proper table child C in a sequence of\n consecutive proper table children, if C is\n misparented then generate an anonymous 'table' or\n 'inline-table' box T around C and all\n consecutive siblings of C that are proper table\n children. (If C's parent is an 'inline' box,\n then T must be an 'inline-table' box; otherwise\n it must be a 'table' box.)\n " - } - ] - } - ] - }, - { - "html": "In the fixed table layout algorithm, the width of each column is\ndetermined as follows:", - "rationale": "/^otherwise(\\,| )/i", - "steps": [ - { - "html": "A column element with a value other than 'auto' for the 'width' property sets the width for\n that column." - }, - { - "html": "Otherwise, a cell in the first row with a value other than\n 'auto' for the 'width' property\n determines the width for that column. If the cell spans more than\n one column, the width is divided over the columns." - }, - { - "html": "Any remaining columns equally divide the remaining horizontal\n table space (minus borders or cell spacing)." - } - ] - }, - { - "html": "Column widths are determined as follows:", - "rationale": "for", - "steps": [ - { - "html": "

Calculate the minimum content width (MCW) of each cell: the\n formatted content may span any number of lines but may not overflow\n the cell box. If the specified 'width' (W) of the cell is greater\n than MCW, W is the minimum cell width. A value of 'auto' means that\n MCW is the minimum cell width.\n\n

Also, calculate the \"maximum\" cell width of each cell: formatting\n the content without breaking lines other than where explicit line\n breaks occur.\n\n

" - }, - { - "html": "

For each column, determine a maximum and minimum column width\n from the cells that span only that column. The minimum is that\n required by the cell with the largest minimum cell width (or the\n column 'width', whichever is\n larger). The maximum is that required by the cell with the largest\n maximum cell width (or the column 'width', whichever is larger).\n\n

" - }, - { - "html": "

For each cell that spans more than one column, increase the\n minimum widths of the columns it spans so that together, they are at\n least as wide as the cell. Do the same for the maximum widths. If\n possible, widen all spanned columns by approximately the same\n amount.\n\n

" - }, - { - "html": "

For each column group element with a 'width' other than\n 'auto', increase the minimum widths of the columns it spans, so that\n together they are at least as wide as the column group's 'width'.\n\n

" - } - ] - }, - { - "html": "Column and caption\nwidths influence the final table width as follows:", - "rationale": "if", - "steps": [ - { - "html": "If the 'table' or 'inline-table' element's 'width' property has a computed value\n (W) other than 'auto', the used width is\n the greater of W, CAPMIN, and the minimum width required by all the\n columns plus cell spacing or borders (MIN). If the used width is\n greater than MIN, the\n extra width should be distributed over the columns." - }, - { - "html": "If the 'table' or 'inline-table' element has 'width: auto',\n the used width is the greater of the table's containing block width,\n CAPMIN, and MIN. However, if either CAPMIN or the maximum width\n required by the columns plus cell spacing or borders (MAX) is less\n than that of the containing block, use max(MAX, CAPMIN)." - } - ] - }, - { - "html": "To avoid ambiguous situations, the alignment of cells proceeds in\nthe following order:", - "rationale": "if", - "steps": [ - { - "html": "First the cells that are aligned on their baseline are\n positioned. This will establish the baseline of the row. Next the\n cells with 'vertical-align: top' are positioned." - }, - { - "html": "The row now has a top, possibly a baseline, and a provisional\n height, which is the distance from the top to the lowest bottom of\n the cells positioned so far. (See conditions on the cell padding\n below.)" - }, - { - "html": "If any of the remaining cells, those aligned at the bottom or\n the middle, have a height that is larger than the current height of\n the row, the height of the row will be increased to the maximum of\n those cells, by lowering the bottom." - }, - { - "html": "Finally the remaining cells are positioned." - } - ] - }, - { - "html": "The following rules determine which border style \"wins\" in case of\na conflict:", - "rationale": "if", - "steps": [ - { - "html": "Borders with the 'border-style' of 'hidden' take\n precedence over all other conflicting borders. Any border with this\n value suppresses all borders at this location." - }, - { - "html": "Borders with a style of 'none' have the lowest priority. Only if\n the border properties of all the elements meeting at this edge are\n 'none' will the border be omitted (but note that 'none' is the\n default value for the border style.)" - }, - { - "html": "If none of the styles are 'hidden' and at least one of them is\n not 'none', then narrow borders are discarded in favor of wider\n ones. If several have the same 'border-width' then styles are\n preferred in this order: 'double', 'solid', 'dashed', 'dotted',\n 'ridge', 'outset', 'groove', and the lowest: 'inset'." - }, - { - "html": "If border styles differ only in color, then a style set on a\n cell wins over one on a row, which wins over a row group, column,\n column group and, lastly, table. When two elements of the same type\n conflict, then the one further to the left (if the table's\n 'direction' is 'ltr'; right, if it is 'rtl') and further to the top\n wins." - } - ] - }, - { - "rationale": "if", - "steps": [ - { - "html": "If the cascade results in a value use it. Except that,\n if the value is 'inherit', the specified value is defined in “The 'inherit' value”\n below" - } - ] - }, - { - "rationale": "for", - "steps": [ - { - "html": "[…]" - }, - { - "html": "For other elements, if the element's position is 'relative'\n or 'static', the containing block is formed by the content edge\n of the nearest ancestor box that is a block container\n ancestor box or which establishes a formatting\n context." - } - ] - }, - { - "html": "The painting order for the descendants of an element generating\n a stacking context (see the 'z-index' property) is:", - "rationale": "if", - "steps": [ - { - "html": "

If the element is a root element:\n\t

", - "ignored": [ - "background color of element over the entire canvas. background image of element, over the entire canvas, anchored at the origin that would be used if it was painted for the root element." - ] - }, - { - "html": "

If the element is a block, list-item, or other block\n\tequivalent:\n\t

\n\n\t

Otherwise, if the element is a block level table:\n\t

", - "ignored": [ - "background color of element unless it is the root element. background image of element unless it is the root element. border of element.", - "table backgrounds (color then image) unless it is the root element. column group backgrounds (color then image). column backgrounds (color then image). row group backgrounds (color then image). row backgrounds (color then image). cell backgrounds (color then image). all table borders (in tree order for separated borders)." - ] - }, - { - "html": "

Stacking contexts formed by positioned descendants with\n\tnegative z-indices (excluding 0) in z-index order (most\n\tnegative first) then tree order.\n\n

" - }, - { - "html": "

For all its in-flow, non-positioned, block-level\n\tdescendants in tree order: If the element is a block,\n\tlist-item, or other block equivalent:\n\t

\n\n\t

Otherwise, the element is a table:\n\t

", - "ignored": [ - "background color of element. background image of element. border of element.", - "table backgrounds (color then image). column group backgrounds (color then image). column backgrounds (color then image). row group backgrounds (color then image). row backgrounds (color then image). cell backgrounds (color then image). all table borders (in tree order for separated borders)." - ] - }, - { - "html": "

All non-positioned floating descendants, in tree order. For\n\teach one of these, treat the element as if it created a new\n\tstacking context, but any positioned descendants and\n\tdescendants which actually create a new stacking context\n\tshould be considered part of the parent stacking context, not\n\tthis new one.\n\n

" - }, - { - "html": "If the element is an inline element that generates a\n\tstacking context, then:", - "rationale": "for", - "steps": [ - { - "html": "For each line box that the element is in:", - "rationale": "jump", - "steps": [ - { - "html": "Jump to 7.2.1 for the\n\t box(es) of the element in that line box (in tree order)." - } - ] - } - ] - }, - { - "html": "Otherwise: first for the element, then for all its in-flow,\n\tnon-positioned, block-level descendants in tree order:", - "rationale": "if", - "steps": [ - { - "html": "

If the element is a block-level replaced element, then:\n\t the replaced content, atomically.\n\n\t

" - }, - { - "html": "Otherwise, for each line box of that element:", - "rationale": "for", - "steps": [ - { - "html": "For each box that is a child of that element, in\n\t\tthat line box, in tree order:", - "rationale": "for", - "steps": [ - { - "html": "

background color of element.\n\t\t

" - }, - { - "html": "

background image of element.\n\t\t

" - }, - { - "html": "

border of element.\n\t\t

" - }, - { - "html": "For inline elements:", - "rationale": "for", - "steps": [ - { - "html": "For all the element's in-flow,\n\t\t\tnon-positioned, inline-level children that are\n\t\t\tin this line box, and all runs of text inside\n\t\t\tthe element that is on this line box, in tree\n\t\t\torder:", - "rationale": "if", - "steps": [ - { - "html": "

If this is a run of text, then:\n\t\t\t

", - "ignored": [ - "any underlining affecting the text of the element, in tree order of the elements applying the underlining (such that the deepest element's underlining, if any, is painted topmost and the root element's underlining, if any, is drawn bottommost). any overlining affecting the text of the element, in tree order of the elements applying the overlining (such that the deepest element's overlining, if any, is painted topmost and the root element's overlining, if any, is drawn bottommost). the text. any line-through affecting the text of the element, in tree order of the elements applying the line-through (such that the deepest element's line-through, if any, is painted topmost and the root element's line-through, if any, is drawn bottommost)." - ] - }, - { - "html": "

Otherwise, jump to 7.2.1 for that\n\t\t\t element.\n\t\t\t

" - } - ] - } - ], - "additional": [ - { - "html": "For inline-block and inline-table elements:", - "rationale": "for", - "steps": [ - { - "html": "For each one of these, treat the element as\n\t\t if it created a new stacking context, but any\n\t\t positioned descendants and descendants which\n\t\t actually create a new stacking context should be\n\t\t considered part of the parent stacking context,\n\t\t not this new one." - } - ] - } - ], - "ignored": [ - "the replaced content, atomically." - ] - } - ] - }, - { - "html": "

Optionally, the outline of the element (see 10 below).\n\t

" - } - ] - }, - { - "html": "

Optionally, if the element is block-level, the outline\n\t of the element (see 10 below).\n\t

" - } - ] - }, - { - "html": "

All positioned descendants with 'z-index: auto' or\n\t'z-index: 0', in tree order. For those with 'z-index: auto',\n\ttreat the element as if it created a new stacking context, but\n\tany positioned descendants and descendants which actually\n\tcreate a new stacking context should be considered part of the\n\tparent stacking context, not this new one. For those with\n\t'z-index: 0', treat the stacking context generated atomically.\n\n

" - }, - { - "html": "

Stacking contexts formed by positioned descendants with\n\tz-indices greater than or equal to 1 in z-index order\n\t(smallest first) then tree order.\n\n

" - }, - { - "html": "

Finally, implementations that do not draw outlines in steps\n\tabove must draw outlines from this stacking context at this\n\tstage. (It is recommended to draw outlines in this step and\n\tnot in the steps above.)\n

" - } - ] - } - ] -} \ No newline at end of file diff --git a/tr/css/CSS.json b/tr/css/CSS.json index e28abbcadf1c..3d6e40cc54ea 100644 --- a/tr/css/CSS.json +++ b/tr/css/CSS.json @@ -1,12 +1,12 @@ { "spec": { - "title": "Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification", - "url": "https://www.w3.org/TR/CSS22/" + "title": "Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification", + "url": "https://www.w3.org/TR/CSS21/" }, "properties": [ { "name": "margin-top", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-margin-top", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-margin-top", "value": " | inherit", "initial": "0", "appliesTo": "all elements except elements with table display types other than table-caption, table and inline-table", @@ -21,7 +21,7 @@ }, { "name": "margin-bottom", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-margin-bottom", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-margin-bottom", "value": " | inherit", "initial": "0", "appliesTo": "all elements except elements with table display types other than table-caption, table and inline-table", @@ -36,7 +36,7 @@ }, { "name": "margin-right", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-margin-right", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-margin-right", "value": " | inherit", "initial": "0", "appliesTo": "all elements except elements with table display types other than table-caption, table and inline-table", @@ -51,7 +51,7 @@ }, { "name": "margin-left", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-margin-left", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-margin-left", "value": " | inherit", "initial": "0", "appliesTo": "all elements except elements with table display types other than table-caption, table and inline-table", @@ -66,7 +66,7 @@ }, { "name": "margin", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-margin", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-margin", "value": "{1,4} | inherit", "initial": "see individual properties", "appliesTo": "all elements except elements with table display types other than table-caption, table and inline-table", @@ -80,7 +80,7 @@ }, { "name": "padding-top", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-padding-top", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-padding-top", "value": " | inherit", "initial": "0", "appliesTo": "all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column", @@ -95,7 +95,7 @@ }, { "name": "padding-right", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-padding-right", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-padding-right", "value": " | inherit", "initial": "0", "appliesTo": "all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column", @@ -110,7 +110,7 @@ }, { "name": "padding-bottom", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-padding-bottom", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-padding-bottom", "value": " | inherit", "initial": "0", "appliesTo": "all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column", @@ -125,7 +125,7 @@ }, { "name": "padding-left", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-padding-left", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-padding-left", "value": " | inherit", "initial": "0", "appliesTo": "all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column", @@ -140,7 +140,7 @@ }, { "name": "padding", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-padding", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-padding", "value": "{1,4} | inherit", "initial": "see individual properties", "appliesTo": "all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column", @@ -154,7 +154,7 @@ }, { "name": "border-top-width", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-top-width", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-top-width", "value": " | inherit", "initial": "medium", "appliesTo": "all elements", @@ -169,7 +169,7 @@ }, { "name": "border-right-width", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-right-width", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-right-width", "value": " | inherit", "initial": "medium", "appliesTo": "all elements", @@ -184,7 +184,7 @@ }, { "name": "border-bottom-width", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-bottom-width", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-bottom-width", "value": " | inherit", "initial": "medium", "appliesTo": "all elements", @@ -199,7 +199,7 @@ }, { "name": "border-left-width", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-left-width", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-left-width", "value": " | inherit", "initial": "medium", "appliesTo": "all elements", @@ -214,7 +214,7 @@ }, { "name": "border-width", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-width", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-width", "value": "{1,4} | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -229,7 +229,7 @@ }, { "name": "border-top-color", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-top-color", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-top-color", "value": " | transparent | inherit", "initial": "the value of the 'color' property", "appliesTo": "all elements", @@ -244,7 +244,7 @@ }, { "name": "border-right-color", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-right-color", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-right-color", "value": " | transparent | inherit", "initial": "the value of the 'color' property", "appliesTo": "all elements", @@ -259,7 +259,7 @@ }, { "name": "border-bottom-color", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-bottom-color", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-bottom-color", "value": " | transparent | inherit", "initial": "the value of the 'color' property", "appliesTo": "all elements", @@ -274,7 +274,7 @@ }, { "name": "border-left-color", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-left-color", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-left-color", "value": " | transparent | inherit", "initial": "the value of the 'color' property", "appliesTo": "all elements", @@ -289,7 +289,7 @@ }, { "name": "border-color", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-color", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-color", "value": "[ | transparent ]{1,4} | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -304,7 +304,7 @@ }, { "name": "border-top-style", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-top-style", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-top-style", "value": " | inherit", "initial": "none", "appliesTo": "all elements", @@ -319,7 +319,7 @@ }, { "name": "border-right-style", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-right-style", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-right-style", "value": " | inherit", "initial": "none", "appliesTo": "all elements", @@ -334,7 +334,7 @@ }, { "name": "border-bottom-style", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-bottom-style", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-bottom-style", "value": " | inherit", "initial": "none", "appliesTo": "all elements", @@ -349,7 +349,7 @@ }, { "name": "border-left-style", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-left-style", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-left-style", "value": " | inherit", "initial": "none", "appliesTo": "all elements", @@ -364,7 +364,7 @@ }, { "name": "border-style", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-style", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-style", "value": "{1,4} | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -379,7 +379,7 @@ }, { "name": "border-top", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-top", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-top", "value": "[ || || <'border-top-color'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -394,7 +394,7 @@ }, { "name": "border-right", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-right", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-right", "value": "[ || || <'border-top-color'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -409,7 +409,7 @@ }, { "name": "border-bottom", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-bottom", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-bottom", "value": "[ || || <'border-top-color'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -424,7 +424,7 @@ }, { "name": "border-left", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border-left", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border-left", "value": "[ || || <'border-top-color'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -439,7 +439,7 @@ }, { "name": "border", - "href": "https://www.w3.org/TR/CSS22/box.html#propdef-border", + "href": "https://www.w3.org/TR/CSS2/box.html#propdef-border", "value": "[ || || <'border-top-color'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -453,7 +453,7 @@ }, { "name": "display", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-display", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-display", "value": "inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit", "initial": "inline", "appliesTo": "all elements", @@ -467,7 +467,7 @@ }, { "name": "position", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-position", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-position", "value": "static | relative | absolute | fixed | inherit", "initial": "static", "appliesTo": "all elements", @@ -481,7 +481,7 @@ }, { "name": "top", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-top", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-top", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "positioned elements", @@ -495,7 +495,7 @@ }, { "name": "right", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-right", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-right", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "positioned elements", @@ -509,7 +509,7 @@ }, { "name": "bottom", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-bottom", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-bottom", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "positioned elements", @@ -523,7 +523,7 @@ }, { "name": "left", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-left", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-left", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "positioned elements", @@ -537,7 +537,7 @@ }, { "name": "float", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-float", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-float", "value": "left | right | none | inherit", "initial": "none", "appliesTo": "all, but see 9.7", @@ -551,7 +551,7 @@ }, { "name": "clear", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-clear", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-clear", "value": "none | left | right | both | inherit", "initial": "none", "appliesTo": "block-level elements", @@ -565,7 +565,7 @@ }, { "name": "z-index", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-z-index", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-z-index", "value": "auto | | inherit", "initial": "auto", "appliesTo": "positioned elements", @@ -580,7 +580,7 @@ }, { "name": "direction", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-direction", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-direction", "value": "ltr | rtl | inherit", "initial": "ltr", "appliesTo": "all elements, but see prose", @@ -594,7 +594,7 @@ }, { "name": "unicode-bidi", - "href": "https://www.w3.org/TR/CSS22/visuren.html#propdef-unicode-bidi", + "href": "https://www.w3.org/TR/CSS2/visuren.html#propdef-unicode-bidi", "value": "normal | embed | bidi-override | inherit", "initial": "normal", "appliesTo": "all elements, but see prose", @@ -609,7 +609,7 @@ }, { "name": "width", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-width", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-width", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "all elements but non-replaced inline elements, table rows, and row groups", @@ -623,7 +623,7 @@ }, { "name": "min-width", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-min-width", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-min-width", "value": " | | inherit", "initial": "0", "appliesTo": "all elements but non-replaced inline elements, table rows, and row groups", @@ -638,7 +638,7 @@ }, { "name": "max-width", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-max-width", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-max-width", "value": " | | none | inherit", "initial": "none", "appliesTo": "all elements but non-replaced inline elements, table rows, and row groups", @@ -653,21 +653,21 @@ }, { "name": "height", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-height", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-height", "value": " | | auto | inherit", "initial": "auto", "appliesTo": "all elements but non-replaced inline elements, table columns, and column groups", "inherited": "no", "percentages": "see prose", "media": "visual", - "computed value": "the percentage or 'auto' (as specified) or the absolute length", + "computed value": "the percentage or 'auto' (see prose under ) or the absolute length", "styleDeclaration": [ "height" ] }, { "name": "min-height", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-min-height", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-min-height", "value": " | | inherit", "initial": "0", "appliesTo": "all elements but non-replaced inline elements, table columns, and column groups", @@ -682,7 +682,7 @@ }, { "name": "max-height", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-max-height", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-max-height", "value": " | | none | inherit", "initial": "none", "appliesTo": "all elements but non-replaced inline elements, table columns, and column groups", @@ -697,7 +697,7 @@ }, { "name": "line-height", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-line-height", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height", "value": "normal | | | | inherit", "initial": "normal", "appliesTo": "all elements", @@ -712,7 +712,7 @@ }, { "name": "vertical-align", - "href": "https://www.w3.org/TR/CSS22/visudet.html#propdef-vertical-align", + "href": "https://www.w3.org/TR/CSS2/visudet.html#propdef-vertical-align", "value": "baseline | sub | super | top | text-top | middle | bottom | text-bottom | | | inherit", "initial": "baseline", "appliesTo": "inline-level and 'table-cell' elements", @@ -727,10 +727,10 @@ }, { "name": "overflow", - "href": "https://www.w3.org/TR/CSS22/visufx.html#propdef-overflow", + "href": "https://www.w3.org/TR/CSS2/visufx.html#propdef-overflow", "value": "visible | hidden | scroll | auto | inherit", "initial": "visible", - "appliesTo": "block containers and boxes that establish a formatting context", + "appliesTo": "block containers", "inherited": "no", "percentages": "N/A", "media": "visual", @@ -741,7 +741,7 @@ }, { "name": "clip", - "href": "https://www.w3.org/TR/CSS22/visufx.html#propdef-clip", + "href": "https://www.w3.org/TR/CSS2/visufx.html#propdef-clip", "value": " | auto | inherit", "initial": "auto", "appliesTo": "absolutely positioned elements", @@ -755,7 +755,7 @@ }, { "name": "visibility", - "href": "https://www.w3.org/TR/CSS22/visufx.html#propdef-visibility", + "href": "https://www.w3.org/TR/CSS2/visufx.html#propdef-visibility", "value": "visible | hidden | collapse | inherit", "initial": "visible", "appliesTo": "all elements", @@ -769,7 +769,7 @@ }, { "name": "content", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-content", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-content", "value": "normal | none | [ | | | attr() | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit", "initial": "normal", "appliesTo": ":before and :after pseudo-elements", @@ -783,7 +783,7 @@ }, { "name": "quotes", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-quotes", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-quotes", "value": "[ ]+ | none | inherit", "initial": "depends on user agent", "appliesTo": "all elements", @@ -797,7 +797,7 @@ }, { "name": "counter-reset", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-counter-reset", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-counter-reset", "value": "[ ? ]+ | none | inherit", "initial": "none", "appliesTo": "all elements", @@ -812,7 +812,7 @@ }, { "name": "counter-increment", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-counter-increment", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-counter-increment", "value": "[ ? ]+ | none | inherit", "initial": "none", "appliesTo": "all elements", @@ -827,7 +827,7 @@ }, { "name": "list-style-type", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-list-style-type", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-type", "value": "disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | lower-alpha | upper-alpha | none | inherit", "initial": "disc", "appliesTo": "elements with 'display: list-item'", @@ -842,7 +842,7 @@ }, { "name": "list-style-image", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-list-style-image", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-image", "value": " | none | inherit", "initial": "none", "appliesTo": "elements with 'display: list-item'", @@ -857,7 +857,7 @@ }, { "name": "list-style-position", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-list-style-position", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-position", "value": "inside | outside | inherit", "initial": "outside", "appliesTo": "elements with 'display: list-item'", @@ -872,7 +872,7 @@ }, { "name": "list-style", - "href": "https://www.w3.org/TR/CSS22/generate.html#propdef-list-style", + "href": "https://www.w3.org/TR/CSS2/generate.html#propdef-list-style", "value": "[ <'list-style-type'> || <'list-style-position'> || <'list-style-image'> ] | inherit", "initial": "see individual properties", "appliesTo": "elements with 'display: list-item'", @@ -887,7 +887,7 @@ }, { "name": "page-break-before", - "href": "https://www.w3.org/TR/CSS22/page.html#propdef-page-break-before", + "href": "https://www.w3.org/TR/CSS2/page.html#propdef-page-break-before", "value": "auto | always | avoid | left | right | inherit", "initial": "auto", "appliesTo": "block-level elements (but see text)", @@ -902,7 +902,7 @@ }, { "name": "page-break-after", - "href": "https://www.w3.org/TR/CSS22/page.html#propdef-page-break-after", + "href": "https://www.w3.org/TR/CSS2/page.html#propdef-page-break-after", "value": "auto | always | avoid | left | right | inherit", "initial": "auto", "appliesTo": "block-level elements (but see text)", @@ -917,7 +917,7 @@ }, { "name": "page-break-inside", - "href": "https://www.w3.org/TR/CSS22/page.html#propdef-page-break-inside", + "href": "https://www.w3.org/TR/CSS2/page.html#propdef-page-break-inside", "value": "avoid | auto | inherit", "initial": "auto", "appliesTo": "block-level elements (but see text)", @@ -932,7 +932,7 @@ }, { "name": "orphans", - "href": "https://www.w3.org/TR/CSS22/page.html#propdef-orphans", + "href": "https://www.w3.org/TR/CSS2/page.html#propdef-orphans", "value": " | inherit", "initial": "2", "appliesTo": "block container elements", @@ -946,7 +946,7 @@ }, { "name": "widows", - "href": "https://www.w3.org/TR/CSS22/page.html#propdef-widows", + "href": "https://www.w3.org/TR/CSS2/page.html#propdef-widows", "value": " | inherit", "initial": "2", "appliesTo": "block container elements", @@ -960,7 +960,7 @@ }, { "name": "color", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-color", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-color", "value": " | inherit", "initial": "depends on user agent", "appliesTo": "all elements", @@ -974,7 +974,7 @@ }, { "name": "background-color", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background-color", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background-color", "value": " | transparent | inherit", "initial": "transparent", "appliesTo": "all elements", @@ -989,7 +989,7 @@ }, { "name": "background-image", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background-image", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background-image", "value": " | none | inherit", "initial": "none", "appliesTo": "all elements", @@ -1004,7 +1004,7 @@ }, { "name": "background-repeat", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background-repeat", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background-repeat", "value": "repeat | repeat-x | repeat-y | no-repeat | inherit", "initial": "repeat", "appliesTo": "all elements", @@ -1019,7 +1019,7 @@ }, { "name": "background-attachment", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background-attachment", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background-attachment", "value": "scroll | fixed | inherit", "initial": "scroll", "appliesTo": "all elements", @@ -1034,7 +1034,7 @@ }, { "name": "background-position", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background-position", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background-position", "value": "[ [ | | left | center | right ] [ | | top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit", "initial": "0% 0%", "appliesTo": "all elements", @@ -1049,7 +1049,7 @@ }, { "name": "background", - "href": "https://www.w3.org/TR/CSS22/colors.html#propdef-background", + "href": "https://www.w3.org/TR/CSS2/colors.html#propdef-background", "value": "[<'background-color'> || <'background-image'> || <'background-repeat'> || <'background-attachment'> || <'background-position'>] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -1063,8 +1063,8 @@ }, { "name": "font-family", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font-family", - "value": "[[ | ] [, [ | ] ]* ] | inherit", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font-family", + "value": "[[ | ] [, | ]* ] | inherit", "initial": "depends on user agent", "appliesTo": "all elements", "inherited": "yes", @@ -1078,7 +1078,7 @@ }, { "name": "font-style", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font-style", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font-style", "value": "normal | italic | oblique | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1093,7 +1093,7 @@ }, { "name": "font-variant", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font-variant", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font-variant", "value": "normal | small-caps | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1108,7 +1108,7 @@ }, { "name": "font-weight", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font-weight", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight", "value": "normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1123,7 +1123,7 @@ }, { "name": "font-size", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font-size", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font-size", "value": " | | | | inherit", "initial": "medium", "appliesTo": "all elements", @@ -1138,7 +1138,7 @@ }, { "name": "font", - "href": "https://www.w3.org/TR/CSS22/fonts.html#propdef-font", + "href": "https://www.w3.org/TR/CSS2/fonts.html#propdef-font", "value": "[ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -1152,7 +1152,7 @@ }, { "name": "text-indent", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-text-indent", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-text-indent", "value": " | | inherit", "initial": "0", "appliesTo": "block containers", @@ -1167,7 +1167,7 @@ }, { "name": "text-align", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-text-align", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-text-align", "value": "left | right | center | justify | inherit", "initial": "a nameless value that acts as 'left' if 'direction' is 'ltr', 'right' if 'direction' is 'rtl'", "appliesTo": "block containers", @@ -1182,7 +1182,7 @@ }, { "name": "text-decoration", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-text-decoration", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-text-decoration", "value": "none | [ underline || overline || line-through || blink ] | inherit", "initial": "none", "appliesTo": "all elements", @@ -1197,7 +1197,7 @@ }, { "name": "letter-spacing", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-letter-spacing", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-letter-spacing", "value": "normal | | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1212,7 +1212,7 @@ }, { "name": "word-spacing", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-word-spacing", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-word-spacing", "value": "normal | | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1227,7 +1227,7 @@ }, { "name": "text-transform", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-text-transform", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-text-transform", "value": "capitalize | uppercase | lowercase | none | inherit", "initial": "none", "appliesTo": "all elements", @@ -1242,7 +1242,7 @@ }, { "name": "white-space", - "href": "https://www.w3.org/TR/CSS22/text.html#propdef-white-space", + "href": "https://www.w3.org/TR/CSS2/text.html#propdef-white-space", "value": "normal | pre | nowrap | pre-wrap | pre-line | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1257,7 +1257,7 @@ }, { "name": "caption-side", - "href": "https://www.w3.org/TR/CSS22/tables.html#propdef-caption-side", + "href": "https://www.w3.org/TR/CSS2/tables.html#propdef-caption-side", "value": "top | bottom | inherit", "initial": "top", "appliesTo": "'table-caption' elements", @@ -1272,7 +1272,7 @@ }, { "name": "table-layout", - "href": "https://www.w3.org/TR/CSS22/tables.html#propdef-table-layout", + "href": "https://www.w3.org/TR/CSS2/tables.html#propdef-table-layout", "value": "auto | fixed | inherit", "initial": "auto", "appliesTo": "'table' and 'inline-table' elements", @@ -1287,7 +1287,7 @@ }, { "name": "border-collapse", - "href": "https://www.w3.org/TR/CSS22/tables.html#propdef-border-collapse", + "href": "https://www.w3.org/TR/CSS2/tables.html#propdef-border-collapse", "value": "collapse | separate | inherit", "initial": "separate", "appliesTo": "'table' and 'inline-table' elements", @@ -1302,7 +1302,7 @@ }, { "name": "border-spacing", - "href": "https://www.w3.org/TR/CSS22/tables.html#propdef-border-spacing", + "href": "https://www.w3.org/TR/CSS2/tables.html#propdef-border-spacing", "value": " ? | inherit", "initial": "0", "appliesTo": "'table' and 'inline-table' elements*", @@ -1317,7 +1317,7 @@ }, { "name": "empty-cells", - "href": "https://www.w3.org/TR/CSS22/tables.html#propdef-empty-cells", + "href": "https://www.w3.org/TR/CSS2/tables.html#propdef-empty-cells", "value": "show | hide | inherit", "initial": "show", "appliesTo": "'table-cell' elements", @@ -1332,7 +1332,7 @@ }, { "name": "cursor", - "href": "https://www.w3.org/TR/CSS22/ui.html#propdef-cursor", + "href": "https://www.w3.org/TR/CSS2/ui.html#propdef-cursor", "value": "[ [ ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit", "initial": "auto", "appliesTo": "all elements", @@ -1346,7 +1346,7 @@ }, { "name": "outline", - "href": "https://www.w3.org/TR/CSS22/ui.html#propdef-outline", + "href": "https://www.w3.org/TR/CSS2/ui.html#propdef-outline", "value": "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ] | inherit", "initial": "see individual properties", "appliesTo": "all elements", @@ -1360,7 +1360,7 @@ }, { "name": "outline-width", - "href": "https://www.w3.org/TR/CSS22/ui.html#propdef-outline-width", + "href": "https://www.w3.org/TR/CSS2/ui.html#propdef-outline-width", "value": " | inherit", "initial": "medium", "appliesTo": "all elements", @@ -1375,7 +1375,7 @@ }, { "name": "outline-style", - "href": "https://www.w3.org/TR/CSS22/ui.html#propdef-outline-style", + "href": "https://www.w3.org/TR/CSS2/ui.html#propdef-outline-style", "value": " | inherit", "initial": "none", "appliesTo": "all elements", @@ -1390,7 +1390,7 @@ }, { "name": "outline-color", - "href": "https://www.w3.org/TR/CSS22/ui.html#propdef-outline-color", + "href": "https://www.w3.org/TR/CSS2/ui.html#propdef-outline-color", "value": " | invert | inherit", "initial": "invert", "appliesTo": "all elements", @@ -1405,7 +1405,7 @@ }, { "name": "volume", - "href": "https://www.w3.org/TR/CSS22/aural.html#propdef-volume", + "href": "https://www.w3.org/TR/CSS2/aural.html#propdef-volume", "value": " | | silent | x-soft | soft | medium | loud | x-loud | inherit", "initial": "medium", "appliesTo": "all elements", @@ -1419,7 +1419,7 @@ }, { "name": "speak", - "href": "https://www.w3.org/TR/CSS22/aural.html#propdef-speak", + "href": "https://www.w3.org/TR/CSS2/aural.html#propdef-speak", "value": "normal | none | spell-out | inherit", "initial": "normal", "appliesTo": "all elements", @@ -1433,7 +1433,7 @@ }, { "name": "pause-before", - "href": "https://www.w3.org/TR/CSS22/aural.html#propdef-pause-before", + "href": "https://www.w3.org/TR/CSS2/aural.html#propdef-pause-before", "value": "