Skip to content

Commit

Permalink
feat: update esl-popup styles
Browse files Browse the repository at this point in the history
  • Loading branch information
dshovchko committed Jun 16, 2021
1 parent c709022 commit 167ef0a
Showing 1 changed file with 34 additions and 47 deletions.
81 changes: 34 additions & 47 deletions src/modules/esl-popup/core/esl-popup.less
Original file line number Diff line number Diff line change
@@ -1,55 +1,42 @@
esl-popup {
display: block;

&:not([open]) {
display: none;
}
}

.esl-popup {
font-size: 14px;
}

@popupArrowSize: 20px;
@popupArrowHalf: (@popupArrowSize / 2);

// TODO: remove it
@tooltipBorderColor: #dbdbdb;
@tooltipWidth: 222px;

.esl-popup-arrow {
position: absolute;
bottom: 100%;
background: #fff;
width: @popupArrowSize;
height: @popupArrowSize;
transform: rotate(45deg);
margin-left: -@popupArrowHalf;
top: (-@popupArrowHalf - 1);
border-left: 1px solid @tooltipBorderColor;
border-top: 1px solid @tooltipBorderColor;

&.top-position {
bottom: (-@popupArrowHalf - 1);
top: auto;
transform: rotate(225deg);
}
.esl-popup {
display: block;
font-size: 14px;

&.left-position {
right: (-@popupArrowHalf - 1);
left: auto;
transform: rotate(135deg);
&:not([open]) {
display: none;
}

&.right-position {
left: (-@popupArrowHalf - 1);
right: auto;
transform: rotate(315deg);
.esl-popup-arrow {
position: absolute;
bottom: 100%;
background: #fff;
width: @popupArrowSize;
height: @popupArrowSize;
transform: rotate(45deg);
margin-left: -@popupArrowHalf;
top: (-@popupArrowHalf - 1);
border-left: 1px solid @tooltipBorderColor;
border-top: 1px solid @tooltipBorderColor;

&.top-position {
bottom: (-@popupArrowHalf - 1);
top: auto;
transform: rotate(225deg);
}

&.left-position {
right: (-@popupArrowHalf - 1);
left: auto;
transform: rotate(135deg);
}

&.right-position {
left: (-@popupArrowHalf - 1);
right: auto;
transform: rotate(315deg);
}
}
}

&.top-position .esl-popup-arrow {
bottom: (-@popupArrowHalf - 1);
top: auto;
transform: rotate(225deg);
}

0 comments on commit 167ef0a

Please sign in to comment.