Skip to content

Commit fc6d299

Browse files
authored
feat(icon): bordered and circular icon groups
1 parent ce85cf3 commit fc6d299

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

src/definitions/elements/icon.less

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ each(@colors, {
273273
color: @l;
274274
}
275275
i.inverted.bordered.@{color}.icon.icon.icon.icon.icon,
276-
i.inverted.circular.@{color}.icon.icon.icon.icon.icon {
276+
i.inverted.circular.@{color}.icon.icon.icon.icon.icon,
277+
i.inverted.bordered.@{color}.icons,
278+
i.inverted.circular.@{color}.icons {
277279
background-color: @c;
278280
color: @white;
279281
}
@@ -372,4 +374,71 @@ i.icons {
372374
}
373375
}
374376

377+
& when ((@variationIconGroups) or (@variationIconCorner))
378+
and ((@variationIconBordered) or (@variationIconCircular)) {
379+
/*************************************************
380+
Bordered/circular with corner or group icons
381+
*************************************************/
382+
i.bordered.icons,
383+
i.circular.icons {
384+
width: @borderedSize;
385+
height: @borderedSize;
386+
box-shadow: @borderedShadow;
387+
vertical-align: middle;
388+
}
389+
i.circular.icons {
390+
border-radius: 500em;
391+
}
392+
i.bordered.icons i.icon:first-child,
393+
i.circular.icons i.icon:first-child {
394+
position: absolute;
395+
transform: translateX(-50%) translateY(-50%);
396+
}
397+
398+
& when (@variationIconInverted) {
399+
/* Inverted Icon */
400+
i.bordered.inverted.icons,
401+
i.circular.inverted.icons {
402+
border: none;
403+
box-shadow: none;
404+
background-color: @black;
405+
color: @white;
406+
}
407+
}
408+
409+
& when (@variationIconCorner) {
410+
/* Corner Icon */
411+
i.bordered.icons .icon.corner,
412+
i.circular.icons .icon.corner,
413+
i.bordered.icons .icon.corner[class*="bottom right"],
414+
i.circular.icons .icon.corner[class*="bottom right"] {
415+
top: auto;
416+
left: auto;
417+
right: @borderedGroupCornerOffset;
418+
bottom: @borderedGroupCornerOffset;
419+
}
420+
i.bordered.icons .icon.corner[class*="top right"],
421+
i.circular.icons .icon.corner[class*="top right"] {
422+
top: @borderedGroupCornerOffset;
423+
left: auto;
424+
right: @borderedGroupCornerOffset;
425+
bottom: auto;
426+
}
427+
i.bordered.icons .icon.corner[class*="top left"],
428+
i.circular.icons .icon.corner[class*="top left"] {
429+
top: @borderedGroupCornerOffset;
430+
left: @borderedGroupCornerOffset;
431+
right: auto;
432+
bottom: auto;
433+
}
434+
i.bordered.icons .icon.corner[class*="bottom left"],
435+
i.circular.icons .icon.corner[class*="bottom left"] {
436+
top: auto;
437+
left: @borderedGroupCornerOffset;
438+
right: auto;
439+
bottom: @borderedGroupCornerOffset;
440+
}
441+
}
442+
}
443+
375444
.loadUIOverrides();

src/themes/default/elements/icon.variables

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@
8585
@cornerIconStroke @cornerIconStroke 0 @black
8686
;
8787

88+
@borderedGroupCornerOffset: 1.15em;
89+
8890
@mini: 0.4em;
8991
@tiny: 0.5em;
9092
@small: 0.75em;

0 commit comments

Comments
 (0)