From b7bf86fd858ddba22781761437e11900b3f38a02 Mon Sep 17 00:00:00 2001 From: Karl Seguin Date: Thu, 19 Mar 2026 10:22:19 +0800 Subject: [PATCH] update comments to reflect preference-based bucketing --- src/browser/StyleManager.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/browser/StyleManager.zig b/src/browser/StyleManager.zig index 57fea65d..42813e34 100644 --- a/src/browser/StyleManager.zig +++ b/src/browser/StyleManager.zig @@ -478,11 +478,10 @@ const BucketKey = union(enum) { other, }; -/// Returns the bucket key for a compound selector, or null if the selector -/// ends with a dynamic pseudo-class that we should skip (hover, active, focus, etc.) +/// Returns the best bucket key for a compound selector, or null if it contains +/// a dynamic pseudo-class we should skip (hover, active, focus, etc.) +/// Priority: id > class > tag > other fn getBucketKey(compound: Selector.Compound) ?BucketKey { - // Iterate parts in reverse to find the most specific bucketing key - // Priority: id > class > tag > other var best_key: BucketKey = .other; for (compound.parts) |part| {