Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align side navigation group border with text #2935

Merged
merged 1 commit into from Mar 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 10 additions & 6 deletions scss/_patterns_side-navigation.scss
@@ -1,6 +1,9 @@
@import 'settings';

@mixin vf-p-side-navigation {
// space for the right hand icon with default inner spacing on the left
$sp-sidenav--icon-spacing-width: map-get($icon-sizes, default) + $sph-inner;

.p-side-navigation,
.p-side-navigation--icons {
& > .p-side-navigation__list:first-child {
Expand All @@ -19,6 +22,10 @@
left: $sph-inner;
top: -0.5 * $spv-outer--scaleable; // place border in the middle of the margin
}

.p-side-navigation--icons &::after {
left: $sph-inner + $sp-sidenav--icon-spacing-width;
}
}
}

Expand All @@ -31,11 +38,8 @@
display: flex;
padding: $spv-inner--x-small $sph-inner $spv-inner--x-small $sph-inner;

// space for the right hand icon with default inner spacing on the left
$icon-spacing-width: map-get($icon-sizes, default) + $sph-inner;

.p-side-navigation--icons & {
padding-left: $sph-inner + $icon-spacing-width;
padding-left: $sph-inner + $sp-sidenav--icon-spacing-width;
position: relative;
}

Expand All @@ -45,7 +49,7 @@

// add spacing for variant with right side icons
.p-side-navigation--icons & {
padding-left: 2 * $sph-inner + $icon-spacing-width;
padding-left: 2 * $sph-inner + $sp-sidenav--icon-spacing-width;
}
}

Expand All @@ -55,7 +59,7 @@

// add spacing for variant with right side icons
.p-side-navigation--icons & {
padding-left: 3 * $sph-inner + $icon-spacing-width;
padding-left: 3 * $sph-inner + $sp-sidenav--icon-spacing-width;
}
}
}
Expand Down