fix sizing of nav items on desktop
This commit is contained in:
parent
3049446f65
commit
8caf7ac85a
@ -36,6 +36,7 @@
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
li {
|
li {
|
||||||
|
box-sizing: border-box;
|
||||||
font-weight: @weight-semibold;
|
font-weight: @weight-semibold;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: @padding-md;
|
padding: @padding-md;
|
||||||
@ -43,7 +44,7 @@
|
|||||||
transition: background-color 0.2s;
|
transition: background-color 0.2s;
|
||||||
|
|
||||||
@media screen and (min-width: @sizes[lg]) {
|
@media screen and (min-width: @sizes[lg]) {
|
||||||
flex-grow: 1;
|
width: 50%;
|
||||||
|
|
||||||
&.hiddenOnDesktop {
|
&.hiddenOnDesktop {
|
||||||
display: none;
|
display: none;
|
||||||
@ -67,6 +68,10 @@
|
|||||||
@media screen and (min-width: @sizes[lg]) {
|
@media screen and (min-width: @sizes[lg]) {
|
||||||
border-bottom: unset;
|
border-bottom: unset;
|
||||||
border-right: @separator;
|
border-right: @separator;
|
||||||
|
|
||||||
|
&:nth-of-type(n + 2) {
|
||||||
|
border-right: unset;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,8 @@
|
|||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
ul {
|
ul {
|
||||||
border-bottom: 2px solid @color-dark;
|
@border: 2px solid @color-dark;
|
||||||
|
border-bottom: @border;
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -27,9 +28,11 @@
|
|||||||
|
|
||||||
@media screen and (min-width: @sizes[lg]) {
|
@media screen and (min-width: @sizes[lg]) {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
border-right: @border;
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
width: 50%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -30,3 +30,14 @@ test('desktop page has equal width for both columns', async ({ page }) => {
|
|||||||
};
|
};
|
||||||
expect(contentWidth).toEqual(previewWidth);
|
expect(contentWidth).toEqual(previewWidth);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('desktop page has equal width for nav items', async ({ page }) => {
|
||||||
|
await page.goto('/');
|
||||||
|
const visibleTabs = page.getByRole('tab').filter({ hasNotText: 'preview' });
|
||||||
|
const { width: firstTabWidth } = (await visibleTabs.first().boundingBox()) ?? {
|
||||||
|
width: -1,
|
||||||
|
};
|
||||||
|
for (let i = 1; i < (await visibleTabs.count()); i++) {
|
||||||
|
await expect((await visibleTabs.nth(i).boundingBox())?.width).toEqual(firstTabWidth);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user