-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Amsterdam] Remove borders from flyouts and popover arrows (#3477)
* [Amsterdam] Removing border-left from flyout * Improve popover arrow borders into faux-shadows * Use $euiColorInk for arrow shadow * Use clip for IE11 (instead of clip-path) * Add changelog notices for amsterdam changes * Remove some uneccessary overrides * Using sizing vars wherever possible * cl * Change template %eui-flyout to mixin euiFlyout Easier override of border with variable * Replace clip with clip-path * Remove IE only helper for popover arrows * Add interpolation for all arrow shadow calculations * cl * Adjust arrow compensation * Compensate by position Co-authored-by: cchaos <caroline.horn@elastic.co> Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
- Loading branch information
1 parent
29174cb
commit e319819
Showing
10 changed files
with
95 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
@import 'variables'; | ||
@import 'mixins'; | ||
|
||
@import 'flyout'; | ||
@import 'flyout_body'; | ||
@import 'flyout_footer'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@import '../header/variables'; | ||
|
||
@mixin euiFlyout { | ||
border-left: $euiFlyoutBorder; | ||
// The mixin augments the above | ||
// sass-lint:disable mixins-before-declarations | ||
@include euiBottomShadowLarge($adjustBorders: true); | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
right: 0; | ||
height: 100%; | ||
z-index: $euiZModal; | ||
background: $euiColorEmptyShade; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: stretch; | ||
|
||
// When the EuiHeader is fixed, we need to account for it in the position of the flyout | ||
.euiBody--headerIsFixed & { | ||
top: $euiHeaderHeightCompensation; | ||
height: calc(100% - #{$euiHeaderHeightCompensation}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$euiFlyoutBorder: $euiBorderThin !default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$euiFlyoutBorder: none; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@import 'buttons'; | ||
@import 'borders'; | ||
@import 'flyout'; | ||
@import 'typography'; | ||
@import 'shadows'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
@import 'image'; | ||
@import 'modal'; | ||
@import 'overlay_mask'; | ||
@import 'popover'; | ||
@import 'text'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.euiPopover__panel { | ||
.euiPopover__panelArrow { | ||
&:before { | ||
filter: blur($euiSizeXS - 1px); | ||
opacity: .2; | ||
} | ||
|
||
$arrowShadowCompensation: $euiSizeXS; | ||
|
||
&.euiPopover__panelArrow--top { | ||
&:before { | ||
bottom: -$euiPopoverArrowSize; | ||
border-top-color: $euiShadowColor; | ||
clip-path: polygon(#{-$arrowShadowCompensation} 0, #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation} 0, #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation} #{$euiPopoverArrowSize + $arrowShadowCompensation}, #{-$arrowShadowCompensation} #{$euiPopoverArrowSize + $arrowShadowCompensation}); | ||
} | ||
|
||
&:after { | ||
bottom: -$euiPopoverArrowSize + 1; | ||
} | ||
} | ||
|
||
&.euiPopover__panelArrow--right { | ||
&:before { | ||
border-right-color: $euiShadowColor; | ||
clip-path: polygon(#{-$arrowShadowCompensation} #{-$arrowShadowCompensation}, $euiPopoverArrowSize #{-$arrowShadowCompensation}, $euiPopoverArrowSize #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation}, #{-$arrowShadowCompensation} #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation}); | ||
} | ||
|
||
&:after { | ||
left: -$euiPopoverArrowSize + 1; | ||
} | ||
} | ||
|
||
&.euiPopover__panelArrow--bottom { | ||
&:before { | ||
border-bottom-color: $euiShadowColor; | ||
clip-path: polygon(#{-$arrowShadowCompensation} #{-$arrowShadowCompensation}, #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation} #{-$arrowShadowCompensation}, #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation} $euiPopoverArrowSize, #{-$arrowShadowCompensation} $euiPopoverArrowSize); | ||
} | ||
|
||
&:after { | ||
top: -$euiPopoverArrowSize + 1; | ||
} | ||
} | ||
|
||
&.euiPopover__panelArrow--left { | ||
&:before { | ||
right: -$euiPopoverArrowSize; | ||
border-left-color: $euiShadowColor; | ||
clip-path: polygon(0 #{-$arrowShadowCompensation}, #{$euiPopoverArrowSize + $arrowShadowCompensation} #{-$arrowShadowCompensation}, #{$euiPopoverArrowSize + $arrowShadowCompensation} #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation}, 0 #{$euiPopoverArrowSize * 2 + $arrowShadowCompensation}); | ||
} | ||
|
||
&:after { | ||
right: -$euiPopoverArrowSize + 1; | ||
} | ||
} | ||
} | ||
} |