blocks.css 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @import "../../css/units.css";
  2. @import "../../css/colors.css";
  3. @import "../../css/z-index.css";
  4. .blocks {
  5. height: 100%;
  6. }
  7. .drag-over:after {
  8. content: '';
  9. position: absolute;
  10. top: 0;
  11. left: 0;
  12. width: 100%;
  13. height: 100%;
  14. opacity: 0.75;
  15. background-color: $drop-highlight;
  16. transition: all 0.25s ease;
  17. }
  18. .blocks :global(.injectionDiv){
  19. position: absolute;
  20. top: 0;
  21. right: 0;
  22. bottom: 0;
  23. left: 0;
  24. border: 1px solid $ui-black-transparent;
  25. border-top-right-radius: $space;
  26. border-bottom-right-radius: $space;
  27. }
  28. [dir="rtl"] .blocks :global(.injectionDiv) {
  29. border-top-right-radius: 0;
  30. border-bottom-right-radius: 0;
  31. border-top-left-radius: $space;
  32. border-bottom-left-radius: $space;
  33. }
  34. .blocks :global(.blocklyMainBackground) {
  35. stroke: none;
  36. }
  37. .blocks :global(.blocklyToolboxDiv) {
  38. border-right: 1px solid $ui-black-transparent;
  39. border-bottom: 1px solid $ui-black-transparent;
  40. box-sizing: content-box;
  41. height: calc(100% - 3.25rem) !important;
  42. /*
  43. For now, the layout cannot support scrollbars in the category menu.
  44. The line below works for Edge, the `::-webkit-scrollbar` line
  45. below that is for webkit browsers. It isn't possible to do the
  46. same for Firefox, so a different solution may be needed for them.
  47. */
  48. -ms-overflow-style: none;
  49. }
  50. [dir="rtl"] .blocks :global(.blocklyToolboxDiv) {
  51. border-right: none;
  52. border-left: 1px solid $ui-black-transparent;
  53. }
  54. .blocks :global(.blocklyToolboxDiv::-webkit-scrollbar) {
  55. display: none;
  56. }
  57. .blocks :global(.blocklyFlyout) {
  58. border-right: 1px solid $ui-black-transparent;
  59. box-sizing: content-box;
  60. }
  61. [dir="rtl"] .blocks :global(.blocklyFlyout) {
  62. border-right: none;
  63. border-left: 1px solid $ui-black-transparent;
  64. }
  65. .blocks :global(.blocklyBlockDragSurface) {
  66. /*
  67. Fix an issue where the drag surface was preventing hover events for sharing blocks.
  68. This does not prevent user interaction on the blocks themselves.
  69. */
  70. pointer-events: none;
  71. z-index: $z-index-drag-layer; /* make blocks match gui drag layer */
  72. }
  73. /*
  74. Shrink category font to fit "My Blocks" for now.
  75. Probably will need different solutions for language support later, so
  76. make the change here instead of in scratch-blocks.
  77. */
  78. .blocks :global(.scratchCategoryMenuItemLabel) {
  79. font-size: 0.65rem;
  80. }
  81. .blocks :global(.blocklyMinimalBody) {
  82. min-width: auto;
  83. min-height: auto;
  84. }