Skip to content

Commit

Permalink
refactor(breadcrumbs): update less variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tarantilis committed Feb 14, 2022
1 parent eb257f8 commit 640817e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 54 deletions.
74 changes: 24 additions & 50 deletions theme/themes/eea/collections/breadcrumb.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -3,81 +3,55 @@
*******************************/

div.eea-breadcrumb .ui.breadcrumb {
display: inline-flex;
flex-wrap: wrap;
align-items: end;
padding-right: 0;
padding-left: 0;

.section {
padding: 0 5px;
}
padding: @mobileBreadcrumbPadding;
font-size: @mobileBreadcrumbFontSize;
font-weight: @activeFontWeight;

a.section {
color: @primaryColor;
font-size: 7px;
/* Max breadcrumb length to be decided */
//max-width: 150px;
//white-space: nowrap;
//overflow: hidden;
//text-overflow: ellipsis;

img {
width: 7.5px;
width: @mobileBreadcrumbIconSize;
margin-bottom: -1px; //To align as the design
}
}

.section.active {
font-size: 7px;
font-weight: @activeFontWeight;
}

.icon.divider {
color: @deepBlue;
}

.home.icon {
margin-right: 0;
}

i.icon {
font-size: 7px;
i.icon.divider {
font-size: @mobileBreadcrumbFontSize;
}

a:first-child {
padding: 0 5px 0 0;
padding: 0 0.469rem 0 0;
}

@media only screen and (min-width: @tabletBreakpoint) {
padding-right: 0;
padding-left: 0;
}
}
@media only screen and (min-width: @mobileBreakpoint + 1) {
@media only screen and (min-width: @tabletBreakpoint) {
div.eea-breadcrumb .ui.breadcrumb {
a.section {
color: @primaryColor;
font-size: @linkSize;

img {
width: 12px;
}
}

.section.active {
font-size: @linkSize;
.section {
padding: @tabletBreadcrumbPadding;
font-size: @tabletBreadcrumbFontSize;
font-weight: @activeFontWeight;
}

i.icon {
font-size: 12px;
img {
width: @tabletBreadcrumbIconSize;
}
}

.section {
padding: 0 7.5px;
i.icon.divider {
font-size: @tabletBreadcrumbIconSize;
}
}
}

@media only screen and (min-width: @tabletBreakpoint + 1) {
@media only screen and (min-width: @computerBreakpoint) {
div.eea-breadcrumb .ui.breadcrumb {
.section {
padding: 0 10px;
padding: @computerBreadcrumbPadding;
}
}
}
18 changes: 14 additions & 4 deletions theme/themes/eea/collections/breadcrumb.variables
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,25 @@
Breadcrumb
--------------------*/

@linkSize: 12px;

@verticalMargin: 0em;
@display: inline-block;
@verticalAlign: middle;

@dividerSpacing: @10px;
@mobileBreadcrumbFontSize: @7px;
@tabletBreadcrumbFontSize: @12px;

@mobileBreadcrumbPadding: 0;
@tabletBreadcrumbPadding: 0 @7px;
@computerBreadcrumbPadding: 0 @10px;

/* Icon */
@mobileBreadcrumbIconSize: 0.469rem;
@tabletBreadcrumbIconSize: @12px;

/* Divider */
@dividerSpacing: @5px;
@dividerOpacity: 0.7;
@dividerColor: @teal;
@dividerColor: @deepBlue;

@dividerSize: @relativeSmall;
@dividerVerticalAlign: baseline;
Expand Down

0 comments on commit 640817e

Please sign in to comment.