popovers.scss 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. //
  2. // Popovers (to be used with popovers.js)
  3. // --------------------------------------------------
  4. .popover {
  5. position: fixed;
  6. top: 55px;
  7. left: 50%;
  8. z-index: 20;
  9. display: none;
  10. width: 280px;
  11. margin-left: -140px;
  12. background-color: $chrome-color;
  13. border-radius: $border-radius;
  14. opacity: 0;
  15. @include box-shadow(0 0 15px rgba(0, 0, 0, .1));
  16. @include transform(translate3d(0, -15px, 0));
  17. @include transition(all .25s linear);
  18. // Caret on top of popover using CSS triangles (thanks to @chriscoyier for solution)
  19. &:before {
  20. position: absolute;
  21. top: -15px;
  22. left: 50%;
  23. width: 0;
  24. height: 0;
  25. margin-left: -15px;
  26. content: '';
  27. border-right: 15px solid transparent;
  28. border-bottom: 15px solid $chrome-color;
  29. border-left: 15px solid transparent;
  30. }
  31. // Popover transition
  32. // --------------------------------------------------
  33. &.visible {
  34. opacity: 1;
  35. @include transform(translate3d(0, 0, 0));
  36. }
  37. // Give correct spacing to the content if there is a bar inside the popover.
  38. .bar ~ .table-view {
  39. padding-top: $bar-base-height;
  40. }
  41. }
  42. // Backdrop (used as invisible touch escape)
  43. // --------------------------------------------------
  44. .backdrop {
  45. position: fixed;
  46. top: 0;
  47. right: 0;
  48. bottom: 0;
  49. left: 0;
  50. z-index: 15;
  51. background-color: rgba(0,0,0,.3);
  52. }
  53. // Block level buttons in popovers
  54. // --------------------------------------------------
  55. .popover .btn-block {
  56. margin-bottom: 5px;
  57. // Remove extra margin on bottom of last button
  58. &:last-child {
  59. margin-bottom: 0;
  60. }
  61. }
  62. // Popovers with nav bars
  63. // --------------------------------------------------
  64. .popover .bar-nav {
  65. border-bottom: $border-default;
  66. border-top-left-radius: 12px;
  67. border-top-right-radius: 12px;
  68. @include box-shadow(none);
  69. }
  70. // Table views in popovers
  71. // --------------------------------------------------
  72. .popover .table-view {
  73. max-height: 300px;
  74. margin-bottom: 0;
  75. overflow: auto;
  76. -webkit-overflow-scrolling: touch;
  77. background-color: #fff;
  78. border-top: 0;
  79. border-bottom: 0;
  80. border-radius: $border-radius;
  81. }