Skip to content

Commit

Permalink
[field] fix multi-line string border on hover
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmeow authored and rexxars committed Oct 6, 2020
1 parent 80c1c67 commit a26e87b
Showing 1 changed file with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@

.segment {
position: relative;

@nest &::after {
position: absolute;
bottom: -2px;
left: 0;
content: '';
width: 100%;
height: 2px;
transition: all 0.2s ease-in-out;
opacity: 0;
}
line-height: 1.5; /* To make sure the box shadow doesn't get cut off on multiline strings */
box-shadow: 0 2px 0 var(--component-bg);

@nest &:first-child {
border-top-left-radius: 1px;
Expand All @@ -26,16 +17,7 @@

@nest &:hover {
border-bottom: 1px solid var(--component-bg);
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;

@nest &::after {
border-bottom-left-radius: 1px;
border-bottom-right-radius: 1px;
background: currentColor;
transform: translate3d(0, 1px, 0);
opacity: 1;
}
box-shadow: 0 2px 0 currentColor;
}
}

Expand Down

0 comments on commit a26e87b

Please sign in to comment.