Skip to content

Commit

Permalink
style(top-app-bar): change the top of active menu caret
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jan 28, 2023
1 parent d51c6d5 commit 1004b69
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions assets/main/scss/_top-app-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,22 @@ $header-caret-width: 0.35em;

.nav-link {
@include media-breakpoint-up(xxl) {
&.active {
position: relative;
--#{$prefix}body-color: var(--#{$prefix}body-color);

&::before {
content: "";
position: absolute;
left: calc(50% - #{$header-caret-width});
top: calc(100% + #{$header-caret-width} + 0.05em);
border-left: $header-caret-width solid transparent;
border-right: $header-caret-width solid transparent;
// unable to access the :root variable --#{$prefix}body-bg, use SCSS variable instead.
border-bottom: $header-caret-width solid #{$body-bg};
}
&.active {
position: relative;
--#{$prefix}body-color: var(--#{$prefix}body-color);

&::before {
content: "";
position: absolute;
left: calc(50% - #{$header-caret-width});
top: calc(100% + #{$header-caret-width} * 1.25);
border-left: $header-caret-width solid transparent;
border-right: $header-caret-width solid transparent;
// unable to access the :root variable --#{$prefix}body-bg, use SCSS variable instead.
@debug #{$body-bg};
border-bottom: $header-caret-width solid #{$body-bg};
}
}
}
}

Expand Down

0 comments on commit 1004b69

Please sign in to comment.