Skip to content

Reflect top-level CSS namespace rules #495

Closed

Description

@wieslawsoltes

Problem

The dynamic CSSOM compatibility layer explicitly rejects every top-level @namespace insertion with NotSupportedError and exposes no CSSNamespaceRule. This leaves CSS rule reflection incomplete even though grouping-rule hierarchy checks already recognize namespaces.

Unchanged Code OSS does not currently author @namespace, so this is a product-neutral completion slice under #239 rather than a release blocker by itself.

Scope

  • Expose CSSNamespaceRule, CSSRule.NAMESPACE_RULE, and type 10.
  • Parse/serialize top-level default and prefixed namespace rules using quoted strings or url(...).
  • Reflect immutable prefix and namespaceURI values with live parent sheet/detach behavior.
  • Enforce top-level ordering after imports/layer statements and before ordinary rules.
  • Continue rejecting namespace rules inside grouping or nested style rules.
  • Keep namespace-aware selector matching as a separate capability; this slice publishes the authored rule but does not claim selector namespace semantics.
  • Add browser-shaped CSSOM regression coverage.

Validation debt

Chromium/native API, mutation, performance, memory, lifecycle, exact package, and CI gates remain required before release promotion but are deferred under the current implementation-throughput directive.

Parent: #239. Coordination: #235.

Activity

  1. wieslawsoltes commented on Sep 18, 2026

    @wieslawsoltes
    CollaboratorAuthor

    Implemented and merged by PR #496 at 3781b0ba79e82667c9e5ef1320c9873bb598a904. Top-level namespace rule reflection is complete; selector namespace semantics remain explicitly unclaimed. CI tails were canceled; authored cross-realm coverage and cumulative CSSOM/browser/native/performance/memory/package validation remain debt under #239/#235.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions