Skip to content

Commit

Permalink
feat(header): reduce css if variations are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lubber-de committed Nov 10, 2024
1 parent 2504d76 commit cf23660
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/definitions/elements/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
@import (multiple) "../../theme.config";

@notCenteredAligned: if(@variationHeaderAligned, e(":not(.centered):not(.aligned)"));
@notIcon: if(@variationHeaderIcon, e(":not(.icon)"));

/*******************************
Header
Expand Down Expand Up @@ -72,8 +73,8 @@
}

/* With Text Node */
.ui.header:not(.icon) > .icons:only-child,
.ui.header:not(.icon) > i.icon:only-child {
.ui.header@{notIcon} > .icons:only-child,
.ui.header@{notIcon} > i.icon:only-child {
display: inline-block;
padding: 0;
margin-right: @iconMargin;
Expand Down Expand Up @@ -113,8 +114,8 @@
}

/* After Icon */
.ui.header:not(.icon)@{notCenteredAligned} > .icons + .content,
.ui.header:not(.icon)@{notCenteredAligned} > i.icon + .content {
.ui.header@{notIcon}@{notCenteredAligned} > .icons + .content,
.ui.header@{notIcon}@{notCenteredAligned} > i.icon + .content {
padding-left: @iconMargin;
display: table-cell;
vertical-align: @contentIconAlignment;
Expand Down

0 comments on commit cf23660

Please sign in to comment.