Skip to content

Enable layout.css.random.enabled #500

Closed

Description

Activity

  1. Loirooriol commented on Nov 11, 2026

    @Loirooriol
    CollaboratorAuthor

    OK, it's not as easy as enabling the pref:

    stylo/style/device/servo.rs

    Lines 151 to 154 in fa1019d

    pub fn document_random_hasher(&self) -> impl Hasher {
    // TODO: Implement a document-specific hasher (like Gecko in Bug 2081781).
    DefaultHasher::new()
    }

    Currently this is always 0.5638:

    <!DOCTYPE html>
    <div style="background-color: black; height: 100px; opacity: random(--foo, 0, 1)"></div>
    <script>console.log(getComputedStyle(document.querySelector("div")).opacity);</script>
  2. added a commit that references this issue on Nov 15, 2026
    f1e2aba
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