Skip to content

Commit

Permalink
Merge pull request #8504 from cfpb/ans_mm_css
Browse files Browse the repository at this point in the history
Mega Menu: remove redundant CSS
  • Loading branch information
anselmbradford authored Jul 11, 2024
2 parents fbb18d1 + e9443ac commit b8b0d20
Showing 1 changed file with 27 additions and 36 deletions.
63 changes: 27 additions & 36 deletions cfgov/unprocessed/css/organisms/mega-menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,6 @@ body {
font-weight: normal;
}

// …however, show the icons in featured links.
&-item--has-icon {
.cf-icon-svg {
display: inline-block;
}
}

// Ensure desktop up/down arrow link icons don't appear at mobile.
&-link {
width: 100%;
Expand Down Expand Up @@ -846,6 +839,21 @@ body {
.u-focus-link-desktop();
}

&-item--has-icon {
// Pad in featured items from their icons.
padding-left: unit( 13px / @base-font-size-px, em );
}

// Set up hover state for link with an icon.
&-item--has-icon &-link {
.u-hover-link-icon-desktop();
.u-focus-link-icon-desktop();

&--current {
.u-current-link-icon-desktop();
}
}

// Featured item has a highlight box around it.
&-list--featured ul {
// Style the featured item box.
Expand All @@ -858,19 +866,6 @@ body {
box-sizing: border-box;
}

&-list--featured &-link {
display: flex;
padding: 0;
left: 0;
border: none;

& .cf-icon-svg {
color: var(--gold);
width: 100%;
max-width: unit( 16px / @base-font-size-px, rem );
}
}

&-list--featured &-item {
margin-bottom: unit( 15px / @base-font-size-px, em );

Expand All @@ -879,25 +874,21 @@ body {
}
}

&-item--has-icon {
// Pad in featured items from their icons.
padding-left: unit( 13px / @base-font-size-px, em );
}

// Set up hover state for link with an icon.
&-item--has-icon &-link {
.u-hover-link-icon-desktop();
.u-focus-link-icon-desktop();

&--current {
.u-current-link-icon-desktop();
}
}

// Remove hover bar for featured item link.
&-list--featured &-link {
// Remove hover bar for featured item link.
.u-hover-link-featured-desktop();
.u-focus-link-featured-desktop();

display: flex;
padding: 0;
left: 0;
border: none;

& .cf-icon-svg {
color: var(--gold);
width: 100%;
max-width: unit( 16px / @base-font-size-px, rem );
}
}
}

Expand Down

0 comments on commit b8b0d20

Please sign in to comment.