Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341{ "format": 1, "function": "height", "sections": [ "https://www.w3.org/TR/CSS21/visudet.html#normal-block", "https://www.w3.org/TR/CSS21/visudet.html#root-height", "https://www.w3.org/TR/CSS21/visudet.html#min-max-heights", "https://www.w3.org/TR/CSS21/visuren.html#block-formatting", "https://www.w3.org/TR/CSS21/visuren.html#dis-pos-flo" ], "inputs": [ { "name": "height", "type": "f64", "source": { "kind": "computed-style", "property": "height", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "min_height", "type": "f64", "source": { "kind": "computed-style", "property": "min-height", "of": "self" }, "why": "If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'." }, { "name": "max_height", "type": "f64", "source": { "kind": "computed-style", "property": "max-height", "of": "self" }, "why": "If this tentative height is greater than 'max-height', the rules above are applied again, but this time using the value of 'max-height' as the computed value for 'height'." }, { "name": "overflow_x", "type": "bool", "source": { "kind": "computed-style", "property": "overflow-x", "of": "self" }, "why": "Block boxes with 'overflow' other than 'visible' (except when that value has been propagated to the viewport) establish new block formatting contexts for their contents." }, { "name": "overflow_y", "type": "bool", "source": { "kind": "computed-style", "property": "overflow-y", "of": "self" }, "why": "Block boxes with 'overflow' other than 'visible' (except when that value has been propagated to the viewport) establish new block formatting contexts for their contents." }, { "name": "display", "type": "String", "source": { "kind": "computed-style", "property": "display", "of": "self" }, "why": "Otherwise, the remaining 'display' property values apply as specified." }, { "name": "position", "type": "String", "source": { "kind": "computed-style", "property": "position", "of": "self" }, "why": "Otherwise, if 'position' has the value 'absolute' or 'fixed', the box is absolutely positioned" }, { "name": "float", "type": "String", "source": { "kind": "computed-style", "property": "float", "of": "self" }, "why": "Otherwise, if 'float' has a value other than 'none', the box is floated and 'display' is set according to the table below." }, { "name": "box_sizing", "type": "bool", "source": { "kind": "computed-style", "property": "box-sizing", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "padding_top", "type": "f64", "source": { "kind": "computed-style", "property": "padding-top", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "padding_bottom", "type": "f64", "source": { "kind": "computed-style", "property": "padding-bottom", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "border_top_width", "type": "f64", "source": { "kind": "computed-style", "property": "border-top-width", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "border_bottom_width", "type": "f64", "source": { "kind": "computed-style", "property": "border-bottom-width", "of": "self" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "margin_top", "type": "f64", "source": { "kind": "computed-style", "property": "margin-top", "of": "self" }, "why": "If 'margin-top', or 'margin-bottom' are 'auto', their used value is 0." }, { "name": "margin_bottom", "type": "f64", "source": { "kind": "computed-style", "property": "margin-bottom", "of": "self" }, "why": "If 'margin-top', or 'margin-bottom' are 'auto', their used value is 0." }, { "name": "children_display", "type": "Vec<String>", "source": { "kind": "computed-style", "property": "display", "of": "children" }, "why": "If 'height' is 'auto', the height depends on whether the element has any block-level children and whether it has padding or borders" }, { "name": "children_position", "type": "Vec<String>", "source": { "kind": "computed-style", "property": "position", "of": "children" }, "why": "Only children in the normal flow are taken into account (i.e., floating boxes and absolutely positioned boxes are ignored, and relatively positioned boxes are considered without their offset)." }, { "name": "children_float", "type": "Vec<String>", "source": { "kind": "computed-style", "property": "float", "of": "children" }, "why": "Only children in the normal flow are taken into account (i.e., floating boxes and absolutely positioned boxes are ignored, and relatively positioned boxes are considered without their offset)." }, { "name": "children_margin_top", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "margin-top", "of": "children" }, "why": "the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin does not collapse with the element's bottom margin" }, { "name": "children_margin_bottom", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "margin-bottom", "of": "children" }, "why": "the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin does not collapse with the element's bottom margin" }, { "name": "children_border_top_width", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "border-top-width", "of": "children" }, "why": "the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin" }, { "name": "children_border_bottom_width", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "border-bottom-width", "of": "children" }, "why": "the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin" }, { "name": "children_padding_top", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "padding-top", "of": "children" }, "why": "the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin" }, { "name": "children_padding_bottom", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "padding-bottom", "of": "children" }, "why": "the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin" }, { "name": "children_box_sizing", "type": "Vec<bool>", "source": { "kind": "computed-style", "property": "box-sizing", "of": "children" }, "why": "the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin" }, { "name": "in_flow_children_height", "type": "Vec<f64>", "source": { "kind": "measured", "of": "in-flow-children", "metric": "height" }, "why": "the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin does not collapse with the element's bottom margin" }, { "name": "in_flow_children_offset_y", "type": "Vec<f64>", "source": { "kind": "measured", "of": "in-flow-children", "metric": "offset-y" }, "why": "the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, if the child's bottom margin does not collapse with the element's bottom margin" }, { "name": "floating_descendants_height", "type": "Vec<f64>", "source": { "kind": "measured", "of": "floating-descendants", "metric": "height" }, "why": "if the element has any floating descendants whose bottom margin edge is below the element's bottom content edge, then the height is increased to include those edges" }, { "name": "floating_descendants_offset_y", "type": "Vec<f64>", "source": { "kind": "measured", "of": "floating-descendants", "metric": "offset-y" }, "why": "if the element has any floating descendants whose bottom margin edge is below the element's bottom content edge, then the height is increased to include those edges" }, { "name": "floating_descendants_margin_bottom", "type": "Vec<f64>", "source": { "kind": "computed-style", "property": "margin-bottom", "of": "floating-descendants" }, "why": "if the element has any floating descendants whose bottom margin edge is below the element's bottom content edge, then the height is increased to include those edges" }, { "name": "line_count", "type": "f64", "source": { "kind": "measured", "of": "self", "metric": "line-count" }, "why": "the bottom edge of the last line box, if the box establishes a inline formatting context with one or more lines" }, { "name": "line_heights", "type": "Vec<f64>", "source": { "kind": "measured", "of": "self", "metric": "line-heights" }, "why": "the bottom edge of the last line box, if the box establishes a inline formatting context with one or more lines" } ], "outputs": [ { "name": "content_height", "type": "f64", "why": "The element's height is the distance from its top content edge to the first applicable of the following: the bottom edge of the last line box, the bottom edge of the bottom (possibly collapsed) margin of its last in-flow child, the bottom border edge of the last in-flow child whose top margin doesn't collapse with the element's bottom margin, or zero, otherwise." } ]}