_editor-overlay.scss 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. padding: $contentPadding;
  6. font-size: $contentFontSize;
  7. color: #444;
  8. background: rgba(200, 200, 200, 0.5);
  9. }
  10. }
  11. }
  12. // overlay in .editor-container
  13. .editor-container {
  14. .overlay {
  15. position: absolute;
  16. top: 0;
  17. right: 0;
  18. bottom: 0;
  19. left: 0;
  20. z-index: 7; // forward than .CodeMirror-vscrollbar
  21. display: flex;
  22. align-items: center;
  23. justify-content: center;
  24. }
  25. // loading keymap
  26. @include overlay-processing-style(overlay-loading-keymap, 2.5em, 0.3em);
  27. // cheat sheat
  28. .overlay.overlay-gfm-cheatsheet {
  29. align-items: flex-end;
  30. justify-content: flex-end;
  31. pointer-events: none;
  32. .panel.gfm-cheatsheet {
  33. box-shadow: unset;
  34. opacity: 0.6;
  35. .panel-body {
  36. min-width: 30em;
  37. font-family: monospace;
  38. color: $text-muted;
  39. }
  40. ul > li {
  41. list-style: none;
  42. }
  43. }
  44. .gfm-cheatsheet-modal-link {
  45. color: $text-muted;
  46. pointer-events: all;
  47. cursor: pointer;
  48. opacity: 0.6;
  49. &:hover,
  50. &:focus {
  51. opacity: 1;
  52. }
  53. }
  54. // hide on smartphone
  55. @media (max-width: $screen-xs) {
  56. display: none;
  57. }
  58. }
  59. }
  60. .modal-gfm-cheatsheet .modal-body {
  61. .hljs {
  62. font-family: $font-family-monospace;
  63. }
  64. }