Skip to content

Commit

Permalink
change(tag): set gap on tags element for margin between tag elements
Browse files Browse the repository at this point in the history
- this way we don't have any extra right margin on the last element
  on a given line
- introduce labels class which reduces the gap between elements useful
  for a tag list that contains labels instead of tags
  • Loading branch information
ichim-david committed Nov 28, 2022
1 parent e94ba04 commit 726bc6d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions theme/themes/eea/elements/label.variables
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
@labelFontSize: @fontSize;

@verticalAlign: baseline;
@verticalMargin: 0em;
@horizontalMargin: @relative2px;
@verticalMargin: 0;
@horizontalMargin: 0;
@backgroundColor: @grey;
@color: @white;
@backgroundImage: none;
Expand Down
2 changes: 1 addition & 1 deletion theme/themes/eea/extras/tag.variables
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* Tags */
@tagPadding : @mediumGap 0;
@tagHeight : 1.25rem;
@tagMargin : 0 @mediumGap 0 0;
@tagMargin : 0 0 0 0;

/* Tag Icon */
@tagHashtagFontSize : 0.75rem;
Expand Down
6 changes: 5 additions & 1 deletion theme/themes/eea/extras/tagList.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,21 @@
flex-wrap: wrap;
width: @tagsBodyWidth;
line-height: @tagsLineHeight;
gap: @tagsGap;

.tags-title {
text-align: right;
height: @tagsLineHeight;
color: @tagsTitleFontColor;
margin-right: @tagsTitleMargin;
font-weight: @tagsFontWeight;
font-size: @tagsFontSize;
}
}

.tags.labels {
gap: @tagsLabelsGap;
}

.tags.left {
justify-content: left;
}
Expand Down
3 changes: 2 additions & 1 deletion theme/themes/eea/extras/tagList.variables
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

/* Body */
@tagsBodyWidth : 100%;
@tagsLabelsGap : 0.5rem;
@tagsGap : 1rem;

/* Tags Title */
@tagsTitleFontColor : @textColorCSSVar;
@tagsTitleMargin : 1rem;
@tagsFontWeight : 400;
@tagsFontSize : 1.125rem;
@tagsLineHeight : 1.312rem;

0 comments on commit 726bc6d

Please sign in to comment.