_editor-overlay.scss 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. }
  31. // loading keymap
  32. @include overlay-processing-style(overlay-loading-keymap, 2.5em, 0.3em);
  33. // cheat sheat
  34. .overlay.overlay-gfm-cheatsheet {
  35. justify-content: flex-end;
  36. align-items: flex-end;
  37. pointer-events: none;
  38. .panel.gfm-cheatsheet {
  39. opacity: 0.6;
  40. box-shadow: unset;
  41. .panel-body {
  42. color: $text-muted;
  43. font-family: monospace;
  44. min-width: 30em;
  45. }
  46. ul > li {
  47. list-style: none;
  48. }
  49. }
  50. a.gfm-cheatsheet-modal-link {
  51. pointer-events: all;
  52. cursor: pointer;
  53. opacity: 0.6;
  54. color: $text-muted;
  55. &:hover, &:focus {
  56. opacity: 1;
  57. }
  58. }
  59. // hide on smartphone
  60. @media (max-width: $screen-xs) {
  61. display: none;
  62. }
  63. }
  64. }
  65. .modal-gfm-cheatsheet .modal-body {
  66. .hljs {
  67. font-family: monospace;
  68. }
  69. }