Repository navigation
Release 1.4.0 - #270
Merged
Merged
Release 1.4.0#270
Conversation
Every element of a render tree got its ::before and ::after cascaded and its specified style built, though most have no generated content and the specified style is rarely read (#262). - Cascade a pseudo-element only if a rule that may match it declares its content; rules such as *::before { display: inline } of the default sheet alone do not give it a box - Build the specified style of a render node on first read, from the one its parent had when it was built; it is published atomically - Add tests for the declared content, the reading order, rendering again below a parent, and concurrent first reads
Build the parts of the render tree only when needed
GetInnerText computed the styles itself, apart from the render tree, so both had to be optimized (#262). It now walks a render tree of the element, which is only built as far as it is read. - Build the children of a partial render node on first read, and its ::before and ::after only when all children are read - Walk the element's own children, as the spec does: the shadow tree of a host is left out, and its light children count if they are slotted - Add GetInnerText for a render node, e.g. of an existing render tree - Add tests for shadow hosts, generated content, completing a partial tree, and concurrent first reads
…-tree Get the inner text from a partial render tree
A complete render node is back to the fields it had before #267: the children field holds either the children or, in a partial render tree, what builds them on first read.
Read the quirks mode without reflection
…dren Keep the pending children of a render node in its children field
This was referenced Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of Changes
Prerequisites
Please make sure you can check the following two boxes:
Contribution Type
What types of changes does your code introduce? Put an
xin all the boxes that apply:Description
This pull request introduces the 1.4.0 release of the AngleSharp.Css library, focusing on significant improvements to rendering efficiency, standards compliance, and script API completeness. The changes include enhancements to render tree construction, better handling of presentational hints and shadow DOM, expanded CSSOM/script property access, new pseudo-element support, and a comprehensive suite of new and improved tests to validate these features.
Key highlights:
::selectionandselector()in supports conditions.Important: Requires AngleSharp 1.10.0 to be released first.