I'm not entirely certain where you came across that information, but elements with position: absolute
are indeed rendered (without question).
The rendering process involves two trees: the DOM and CSSOM. When combined, these trees generate the render tree responsible for constructing the visible page layout.
According to insights from Google Developers, while elements with display: none
will not be rendered, there is no definitive indication that elements with position: absolute
suffer the same fate.
Google Developers - Render-tree construction, layout, and
paint
A few crucial points highlighted in the article:
The combination of CSSOM and DOM trees results in a render tree used to determine the layout of every visible element, which then informs the painting process responsible for displaying content on screen. (emphasis added)
The merge of DOM and CSSOM trees forms the render tree that exclusively contains the necessary nodes to render the page effectively.
The initial browser step involves merging the DOM and CSSOM into a "render tree" which encompasses all visible DOM content on the page, alongside all associated CSSOM style details. (emphasis added)
To build the render tree, the browser broadly follows these steps:
Starting at the root of the DOM tree, iterate through each accessible node.
Certain nodes remain invisible (e.g., script tags, meta tags, etc.) and are excluded as they don't contribute to the final output.
Nodes hidden via CSS rules are also left out from the render tree – for instance, a span node featuring a display: none
rule won't be included.
For each visible node, apply the applicable CSSOM rules and incorporate them.
Emit visible nodes along with their content and computed styles.
The result is a render reflecting both the content and style specifications for all observable content on the display. (emphasis added)
For further reading, check out the complete article here: Render-tree construction, layout, and paint