diff --git a/src/browser/StyleManager.zig b/src/browser/StyleManager.zig index 0f8f8af9f..991863359 100644 --- a/src/browser/StyleManager.zig +++ b/src/browser/StyleManager.zig @@ -41,7 +41,7 @@ const String = lp.String; const Allocator = std.mem.Allocator; // Tracks the CSS properties the renderless layout acts on (display, visibility, -// opacity, pointer-events, overflow, width, height) from + + + +
hidden despite normal inline style
+
visible with important inline style
+
hidden by the earlier important layer
+ + diff --git a/src/testing.zig b/src/testing.zig index f2c578c9d..72619afd3 100644 --- a/src/testing.zig +++ b/src/testing.zig @@ -1014,6 +1014,14 @@ fn testHTTPHandler(req: *std.http.Server.Request) !void { }); } + if (std.mem.eql(u8, path, "/styles/important-cascade.css")) { + return req.respond(".no-js-flex { display: none !important; }", .{ + .extra_headers = &.{ + .{ .name = "Content-Type", .value = "text/css" }, + }, + }); + } + if (std.mem.eql(u8, path, "/styles/visibility.css")) { // Used by css/external_stylesheet.html — drives the visibility // cascade through StyleManager via Frame.loadExternalStylesheet