_editor-overlay.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @mixin overlay-processing-style($additionalSelector, $contentFontSize: inherit, $contentPadding: inherit) {
  2. .overlay.#{$additionalSelector} {
  3. background: rgba(255, 255, 255, 0.5);
  4. .overlay-content {
  5. background: rgba(200, 200, 200, 0.5);
  6. color: #444;
  7. font-size: $contentFontSize;
  8. padding: $contentPadding;
  9. }
  10. }
  11. }
  12. // overlay in .editor-container
  13. .editor-container {
  14. .overlay {
  15. // layout
  16. display: flex;
  17. justify-content: center;
  18. align-items: center;
  19. position: absolute;
  20. z-index: 7; // forward than .CodeMirror-vscrollbar
  21. top: 0;
  22. right: 0;
  23. bottom: 0;
  24. left: 0;
  25. .overlay-content {
  26. padding: 0.5em;
  27. right: 0;
  28. bottom: 0;
  29. }
  30. } // loading keymap
  31. @include overlay-processing-style(overlay-loading-keymap, 2.5em, 0.3em); // cheat sheat
  32. .overlay-cheat-sheet {
  33. display: flex;
  34. justify-content: flex-end;
  35. align-items: end;
  36. position: absolute;
  37. z-index: 7; // forward than .CodeMirror-vscrollbar
  38. top: 0;
  39. right: 0;
  40. bottom: 0;
  41. ul {
  42. list-style: none;
  43. }
  44. .overlay-gfm-cheatsheat {
  45. justify-content: end;
  46. align-items: end;
  47. pointer-events: none;
  48. border: solid 1.5px lightgray;
  49. margin: auto;
  50. .overlay-content {
  51. color: $text-muted;
  52. }
  53. }
  54. @media screen and (max-width: 340px) {
  55. .overlay-gfm-cheatsheat {
  56. visibility: hidden;
  57. }
  58. }
  59. }
  60. }