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

Mega Menu: remove redundant CSS #8504

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading