diff --git a/src/generators/web/ui/__tests__/index-css.test.mjs b/src/generators/web/ui/__tests__/index-css.test.mjs new file mode 100644 index 00000000..cc942b1a --- /dev/null +++ b/src/generators/web/ui/__tests__/index-css.test.mjs @@ -0,0 +1,12 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import { join } from 'node:path'; +import { describe, it } from 'node:test'; + +describe('web/ui/index.css', () => { + it('contains selector to hide empty hashed navItems container', async () => { + const cssPath = join(import.meta.dirname, '..', 'index.css'); + const css = await readFile(cssPath, 'utf-8'); + assert.ok(css.includes('div[class$="_navItems"]:empty')); + }); +}); diff --git a/src/generators/web/ui/index.css b/src/generators/web/ui/index.css index 4c06e319..4ef2bda1 100644 --- a/src/generators/web/ui/index.css +++ b/src/generators/web/ui/index.css @@ -85,3 +85,8 @@ main { } } } + +/* Removes extra padding from Navigation Bar */ +div[class$="_navItems"]:empty { + display: none; +}