fix(ui): collapse empty page header slots
This commit is contained in:
@@ -576,6 +576,14 @@ current: true
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Compiled empty slots retain inert template markers, so :empty alone
|
||||
cannot collapse their spacing in the rendered document. */
|
||||
.wrn-page-header__meta:not(:has(> :not(template))),
|
||||
.wrn-page-header__body:not(:has(> :not(template))),
|
||||
.wrn-page-header__actions--slot-only:not(:has(> :not(template))) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wrn-page-header__meta {
|
||||
margin-top: 1.1rem;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/ui",
|
||||
"version": "0.8.45",
|
||||
"version": "0.8.46",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
|
||||
@@ -3349,6 +3349,13 @@ test("custom scrollbar styles the scrollbar and drops its fake output", async ()
|
||||
expect(style).toContain("18rem");
|
||||
});
|
||||
|
||||
test("page header collapses compiled empty slot markers", () => {
|
||||
const source = readFileSync(uiComponentPath("PageHeader"), "utf8");
|
||||
expect(source).toContain(".wrn-page-header__meta:not(:has(> :not(template)))");
|
||||
expect(source).toContain(".wrn-page-header__body:not(:has(> :not(template)))");
|
||||
expect(source).toContain(".wrn-page-header__actions--slot-only:not(:has(> :not(template)))");
|
||||
});
|
||||
|
||||
test("layout components ship their own styles instead of Tailwind utilities", () => {
|
||||
/*
|
||||
* These were built from utility classes and class: conditionals. That works
|
||||
|
||||
Reference in New Issue
Block a user