-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add 'Popover' component #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6e350f8
9e13c39
478f764
5dbec5c
23e4fbc
ea3ed60
17d1a9f
4500309
a7a8a4f
760ceb1
13bf797
d23ce98
529fdb6
4c6e9f0
dc3ab87
d4e6313
6ae4002
ee50150
dac9464
15d89f3
06feed4
f7a9309
4938e89
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,30 @@ | |
| } | ||
| } | ||
|
|
||
| .Popover-message--right { | ||
| // Bottom-oriented carets | ||
| .Popover-message--bottom, | ||
| .Popover-message--bottom--right, | ||
| .Popover-message--bottom--left { | ||
| &::before, | ||
| &::after { | ||
| top: auto; | ||
| border-bottom-color: transparent; | ||
| } | ||
|
|
||
| &::before { | ||
| bottom: -15px; | ||
| border-top-color: rgba(0, 0, 0, 0.15); | ||
|
||
| } | ||
|
|
||
| &::after { | ||
| bottom: -13px; | ||
| border-top-color: $bg-white; | ||
| } | ||
| } | ||
|
|
||
| // Top & Bottom: Right-oriented carets | ||
| .Popover-message--top--right, | ||
| .Popover-message--bottom--right { | ||
| right: -9px; | ||
| margin-right: 0; | ||
|
|
||
|
|
@@ -52,7 +75,9 @@ | |
| } | ||
| } | ||
|
|
||
| .Popover-message--left { | ||
| // Top & Bottom: Left-oriented carets | ||
| .Popover-message--top--left, | ||
| .Popover-message--bottom--left { | ||
| left: -9px; | ||
| margin-left: 0; | ||
|
|
||
|
|
@@ -67,6 +92,86 @@ | |
| } | ||
| } | ||
|
|
||
| // Right- & Left-oriented carets | ||
| .Popover-message--right, | ||
| .Popover-message--right--top, | ||
| .Popover-message--right--bottom, | ||
| .Popover-message--left, | ||
| .Popover-message--left--top, | ||
| .Popover-message--left--bottom { | ||
| &::before, | ||
| &::after { | ||
| top: 50%; | ||
| left: auto; | ||
| margin-left: 0; | ||
| border-bottom-color: transparent; | ||
| } | ||
|
|
||
| &::before { | ||
| margin-top: -9px; | ||
| } | ||
|
|
||
| &::after { | ||
| margin-top: -8px; | ||
| } | ||
| } | ||
|
|
||
| // Right-oriented carets | ||
| .Popover-message--right, | ||
| .Popover-message--right--top, | ||
| .Popover-message--right--bottom { | ||
| &::before { | ||
| right: -15px; | ||
| border-left-color: rgba(0, 0, 0, 0.15); | ||
|
||
| } | ||
|
|
||
| &::after { | ||
| right: -13px; | ||
| border-left-color: $bg-white; | ||
| } | ||
| } | ||
|
|
||
| // Left-oriented carets | ||
| .Popover-message--left, | ||
| .Popover-message--left--top, | ||
| .Popover-message--left--bottom { | ||
| &::before { | ||
| left: -15px; | ||
| border-right-color: rgba(0, 0, 0, 0.15); | ||
|
||
| } | ||
|
|
||
| &::after { | ||
| left: -13px; | ||
| border-right-color: $bg-white; | ||
| } | ||
| } | ||
|
|
||
| // Right & Left: Top-oriented carets | ||
| .Popover-message--right--top, | ||
| .Popover-message--left--top { | ||
| &::before, | ||
| &::after { | ||
| top: 20px; | ||
|
||
| } | ||
| } | ||
|
|
||
| // Right & Left: Bottom-oriented carets | ||
| .Popover-message--right--bottom, | ||
| .Popover-message--left--bottom { | ||
| &::before, | ||
| &::after { | ||
| top: auto; | ||
| } | ||
|
|
||
| &::before { | ||
| bottom: 20px; | ||
|
||
| } | ||
|
|
||
| &::after { | ||
| bottom: 21px; | ||
| } | ||
| } | ||
|
|
||
| .Popover-message--lg { | ||
|
||
|
|
||
| @include breakpoint(sm) { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a button here made me want to click on it to show/hide the popover because it kind of looks like a dropdown. Might be better to change this to a gray box with text along the lines of "New feature you want to draw attention to".