Skip to content

Commit a927bd2

Browse files
authored
feat(popup): color variants
Color variant for popup/tooltip. The @variationPopupColors variable already exists, i just forgot to prepare that for 2.9.0
1 parent ea9251d commit a927bd2

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/definitions/modules/popup.less

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,56 @@
805805
}
806806
}
807807

808+
& when not (@variationPopupColors = false) {
809+
each(@variationPopupColors, {
810+
@color: @value;
811+
@c: @colors[@@color][color];
812+
@l: @colors[@@color][light];
813+
814+
& when not (@variationPopupTooltip) {
815+
.ui.ui.ui.@{color}.popup::before,
816+
.ui.@{color}.popup {
817+
background: @c;
818+
color: @white;
819+
border: none;
820+
}
821+
.ui.ui.ui.@{color}.popup::before {
822+
box-shadow: none;
823+
}
824+
& when (@variationPopupInverted) {
825+
.ui.inverted.@{color}.popup::before,
826+
.ui.inverted.@{color}.popup {
827+
background: @l;
828+
color: @black;
829+
}
830+
}
831+
}
832+
& when (@variationPopupTooltip) {
833+
.ui.ui.ui.@{color}.popup::before,
834+
.ui.@{color}.popup,
835+
[data-tooltip][data-variation~="@{color}"]::after,
836+
[data-tooltip][data-variation~="@{color}"]::before {
837+
background: @c;
838+
color: @white;
839+
border: none;
840+
}
841+
.ui.ui.ui.@{color}.popup::before,
842+
[data-tooltip][data-variation~="@{color}"]::before {
843+
box-shadow: none;
844+
}
845+
& when (@variationPopupInverted) {
846+
.ui.ui.ui.inverted.@{color}.popup::before,
847+
.ui.inverted.@{color}.popup,
848+
[data-tooltip][data-inverted][data-variation~="@{color}"]::after,
849+
[data-tooltip][data-inverted][data-variation~="@{color}"]::before {
850+
background: @l;
851+
color: @black;
852+
}
853+
}
854+
}
855+
})
856+
}
857+
808858
& when (@variationPopupFlowing) {
809859
/*--------------
810860
Flowing

0 commit comments

Comments
 (0)