Skip to content

Commit

Permalink
feat(navbar): use escape-svg function and variables where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
ffoodd committed Sep 18, 2019
1 parent 5b59cac commit dfe6624
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions scss/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
align-self: flex-end; // Boosted mod
padding-top: $navbar-brand-padding-y;
padding-bottom: $navbar-brand-padding-y;
margin: .625rem .3125rem; // Boosted mod
margin: map-get($spacers, 2) map-get($spacers, 4); // Boosted mod
@include font-size($navbar-brand-font-size);
font-weight: $font-weight-bold; // Boosted mod
line-height: inherit;
Expand All @@ -71,12 +71,12 @@
// Boosted mod
+ .navbar-brand {
margin-right: 0;
margin-left: 1.25rem;
margin-left: $spacer;
}

@include focus() {
outline: 1px dotted $white;
outline-offset: .625rem;
outline-offset: map-get($spacers, 2);
}

img {
Expand Down Expand Up @@ -104,7 +104,7 @@

.nav-link {
// Boosted mod
padding: .875rem .625rem;
padding: .875rem map-get($spacers, 2);
margin-top: 0;
text-decoration: none;

Expand All @@ -113,12 +113,12 @@
}

&.icon {
padding: .78125rem .625rem;
padding: .78125rem map-get($spacers, 2);
margin-top: 0;
}

&[class^="svg-"] {
margin: .625rem;
margin: map-get($spacers, 2);
}

&[role="menuitem"]::before {
Expand All @@ -133,7 +133,7 @@
}

@include focus() {
outline-offset: .625rem;
outline-offset: map-get($spacers, 2);
}
// end mod
}
Expand All @@ -156,7 +156,7 @@

.dropdown-toggle,
.dropdown-item {
padding: .875rem 0 .875rem .625rem;
padding: .875rem 0 .875rem map-get($spacers, 2);
}

&.show .dropdown-toggle::after {
Expand Down Expand Up @@ -213,7 +213,7 @@
// Button for toggling the navbar when in its collapsed state
.navbar-toggler {
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
margin: ($spacer / 4) 0; // Boosted mod
margin: map-get($spacers, 1) 0; // Boosted mod
@include font-size($navbar-toggler-font-size);
line-height: 1;
background-color: transparent; // remove default button style
Expand All @@ -225,7 +225,7 @@
// Boosted mod
background-color: $white;
.navbar-toggler-icon {
background-image: $navbar-dark-toggler-icon-hover-bg;
background-image: escape-svg($navbar-dark-toggler-icon-hover-bg);
}
// end mod
}
Expand All @@ -234,7 +234,7 @@
background-color: theme-color("primary");

.navbar-toggler-icon {
background-image: $navbar-dark-toggler-icon-bg;
background-image: escape-svg($navbar-dark-toggler-icon-bg);
}
}

Expand All @@ -257,8 +257,7 @@
height: $navbar-toggler-icon-size; // Boosted mod create a var for the toggler size
vertical-align: middle;
content: "";
background: no-repeat center center;
background-size: 100% 100%;
background: no-repeat 50% 50% / 100% 100%;
}

// Generate series of `.navbar-expand-*` responsive classes for configuring
Expand Down Expand Up @@ -296,7 +295,7 @@

// Boosted mod
.navbar-brand {
margin: 0 .625rem 0 0;
margin: 0 map-get($spacers, 2) 0 0;

img {
width: $navbar-brand-logo-expanded-height;
Expand Down Expand Up @@ -350,7 +349,7 @@
.nav-link {
// Boosted mod
padding: 0 $navbar-nav-link-padding-x;
margin-left: 1.25rem;
margin-left: $spacer;
// end mode
}
}
Expand Down

0 comments on commit dfe6624

Please sign in to comment.