fix(ui): preserve viewport anchoring for centered navbar
This commit is contained in:
@@ -416,12 +416,17 @@ size: string = "default"
|
|||||||
|
|
||||||
.wrn-navbar__menus {
|
.wrn-navbar__menus {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
right: 0;
|
||||||
|
left: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
transform: translateX(-50%);
|
pointer-events: none;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrn-navbar__menus > * {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.wrn-navbar__actions {
|
.wrn-navbar__actions {
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
|
|||||||
@@ -3137,8 +3137,8 @@ test("navbar uses a valid aria-current and takes roving focus on its menu", asyn
|
|||||||
*/
|
*/
|
||||||
expect(source).not.toContain("? 'page' : ''");
|
expect(source).not.toContain("? 'page' : ''");
|
||||||
expect(source).toContain("data-wrn-roving");
|
expect(source).toContain("data-wrn-roving");
|
||||||
expect(source).toContain("left: 50%;");
|
expect(source).toContain("pointer-events: none;");
|
||||||
expect(source).toContain("transform: translateX(-50%);");
|
expect(source).toContain(".wrn-navbar__menus > *");
|
||||||
|
|
||||||
const html = await renderComponent(source, {
|
const html = await renderComponent(source, {
|
||||||
label: "Main",
|
label: "Main",
|
||||||
|
|||||||
Reference in New Issue
Block a user