Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ table.benchmarks {

#content-wrapper {
display: flex;
justify-content: space-between;
}

// Breakpoint ----------------
Expand Down
17 changes: 17 additions & 0 deletions tests/git-scm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,20 @@ test('dark mode', async({ page }) => {
const autoLightBrightness = await getPageBrightness();
expect(autoLightBrightness).toBeCloseTo(0.85, 0.1);
});

test('right-side alignment of header and content areas', async ({ page }) => {
await page.goto(`${url}about`)

// The sidebar (aside) and #content sit inside #content-wrapper (display: flex).
// Their combined widths must fill the container so the right edges align.
const containerBox = await page.locator('#content-wrapper').boundingBox()
const contentBox = await page.locator('#content').boundingBox()

expect(containerBox).not.toBeNull()
expect(contentBox).not.toBeNull()

const containerRight = containerBox.x + containerBox.width
const contentRight = contentBox.x + contentBox.width

expect(Math.abs(containerRight - contentRight)).toBeLessThanOrEqual(1)
})
Loading