_dashboard_grid.scss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @import 'react-grid-layout/css/styles.css';
  2. @import 'react-resizable/css/styles.css';
  3. .react-resizable-handle {
  4. // this needs to use visibility and not display none in order not to cause resize flickering
  5. visibility: hidden;
  6. }
  7. .react-grid-item,
  8. #grafana-portal-container {
  9. touch-action: initial !important;
  10. &:hover {
  11. .react-resizable-handle {
  12. visibility: visible;
  13. }
  14. }
  15. }
  16. .panel-in-fullscreen {
  17. .react-grid-layout {
  18. height: auto !important;
  19. }
  20. .react-grid-item {
  21. display: none !important;
  22. transition-property: none !important;
  23. &--fullscreen {
  24. display: block !important;
  25. position: unset !important;
  26. transform: translate(0px, 0px) !important;
  27. }
  28. }
  29. // Disable grid interaction indicators in fullscreen panels
  30. .panel-header:hover {
  31. background-color: inherit;
  32. }
  33. .panel-title-container {
  34. cursor: pointer;
  35. }
  36. .react-resizable-handle {
  37. display: none;
  38. }
  39. // the react-grid has a height transition
  40. .react-grid-layout {
  41. transition-property: none;
  42. }
  43. }
  44. @include media-breakpoint-down(sm) {
  45. .react-grid-item {
  46. display: block !important;
  47. transition-property: none !important;
  48. position: unset !important;
  49. transform: translate(0px, 0px) !important;
  50. margin-bottom: $space-md;
  51. }
  52. }
  53. .react-grid-item.react-grid-placeholder {
  54. box-shadow: $panel-grid-placeholder-shadow;
  55. background: $panel-grid-placeholder-bg;
  56. z-index: -1;
  57. opacity: unset;
  58. }
  59. .theme-dark {
  60. .react-grid-item > .react-resizable-handle::after {
  61. border-right: 2px solid $gray-1;
  62. border-bottom: 2px solid $gray-1;
  63. }
  64. }
  65. .theme-light {
  66. .react-grid-item > .react-resizable-handle::after {
  67. border-right: 2px solid $gray-3;
  68. border-bottom: 2px solid $gray-3;
  69. }
  70. }
  71. // Hack for preventing panel menu overlapping.
  72. .react-grid-item.resizing.panel,
  73. .react-grid-item.panel.dropdown-menu-open,
  74. .react-grid-item.react-draggable-dragging.panel {
  75. z-index: $zindex-dropdown;
  76. }
  77. // Disable animation on initial rendering and enable it when component has been mounted.
  78. .react-grid-item.cssTransforms {
  79. transition-property: none;
  80. }
  81. .animated .react-grid-item.cssTransforms {
  82. transition-property: transform;
  83. }