|
| 1 | +// Copyright 2017 Palantir Technologies, Inc. All rights reserved. |
| 2 | +// Licensed under the Apache License, Version 2.0. |
| 3 | + |
| 4 | +@import "~@blueprintjs/core/src/common/react-transition"; |
| 5 | +@import "~@blueprintjs/core/src/common/variables"; |
| 6 | + |
| 7 | +$omnibar-height: 60vh !default; |
| 8 | +$omnibar-width: $pt-grid-size * 50 !default; |
| 9 | +$omnibar-input-height: $pt-grid-size * 4; |
| 10 | + |
| 11 | +.#{$ns}-omnibar { |
| 12 | + $omnibar-transition-props: ( |
| 13 | + filter: (blur($pt-grid-size * 2), blur(0)), |
| 14 | + opacity: (0.2, 1), |
| 15 | + ); |
| 16 | + |
| 17 | + @include react-transition( |
| 18 | + "#{$ns}-overlay", |
| 19 | + $omnibar-transition-props, |
| 20 | + $duration: $pt-transition-duration * 2, |
| 21 | + $easing: $pt-transition-ease, |
| 22 | + $before: "&" |
| 23 | + ); |
| 24 | + background-color: $white; |
| 25 | + border-radius: $pt-border-radius; |
| 26 | + box-shadow: $pt-elevation-shadow-4; |
| 27 | + left: calc(50% - #{$omnibar-width * 0.5}); |
| 28 | + top: (100 - $omnibar-height) * 0.5; |
| 29 | + width: $omnibar-width; |
| 30 | + z-index: $pt-z-index-overlay + 1; |
| 31 | + |
| 32 | + .#{$ns}-input { |
| 33 | + background-color: transparent; |
| 34 | + border-radius: 0; |
| 35 | + |
| 36 | + &, |
| 37 | + &:focus { |
| 38 | + box-shadow: none; |
| 39 | + } |
| 40 | + } |
| 41 | + |
| 42 | + .#{$ns}-menu { |
| 43 | + background-color: transparent; |
| 44 | + border-radius: 0; |
| 45 | + box-shadow: inset 0 1px 0 $pt-divider-black; |
| 46 | + max-height: calc(#{$omnibar-height} - #{$omnibar-input-height}); |
| 47 | + overflow: auto; |
| 48 | + |
| 49 | + &:empty { |
| 50 | + display: none; |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + .#{$ns}-dark &, |
| 55 | + &.#{$ns}-dark { |
| 56 | + background-color: $dark-gray4; |
| 57 | + box-shadow: $pt-dark-elevation-shadow-4; |
| 58 | + } |
| 59 | +} |
| 60 | + |
| 61 | +.#{$ns}-omnibar-overlay .#{$ns}-overlay-backdrop { |
| 62 | + background-color: rgba($black, 0.2); |
| 63 | +} |
0 commit comments