_mixins.scss 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. @mixin variable-font-size($basesize) {
  2. font-size: $basesize;
  3. @media (max-width: $screen-lg) {
  4. font-size: #{$basesize * 0.9};
  5. }
  6. @media (max-width: $screen-md) {
  7. font-size: #{$basesize * 0.8};
  8. }
  9. @media (max-width: $screen-sm) {
  10. font-size: #{$basesize * 0.7};
  11. }
  12. @media (max-width: $screen-xs) {
  13. font-size: #{$basesize * 0.6};
  14. }
  15. }
  16. @mixin expand-editor($header-plus-footer) {
  17. $header-plus-footer: $header-plus-footer + 2px; // add .main padding-top
  18. $editor-margin: $header-plus-footer //
  19. + 25px // add .btn-open-dropzone height
  20. + 30px; // add .navbar-editor height
  21. .main {
  22. width: 100%;
  23. height: 100vh;
  24. padding-top: 2px;
  25. padding-right: 0;
  26. padding-left: 0;
  27. margin-top: 0px !important;
  28. &,
  29. .content-main,
  30. .tab-content {
  31. display: flex;
  32. flex: 1;
  33. flex-direction: column;
  34. .tab-pane#edit,
  35. .tab-pane#hackmd {
  36. height: calc(100vh - #{$header-plus-footer});
  37. min-height: calc(100vh - #{$header-plus-footer}); // for IE11
  38. }
  39. #page-editor {
  40. // right(preview)
  41. &,
  42. & > .row,
  43. .page-editor-preview-container,
  44. .page-editor-preview-body {
  45. height: calc(100vh - #{$header-plus-footer});
  46. min-height: calc(100vh - #{$header-plus-footer}); // for IE11
  47. }
  48. // left(editor)
  49. .page-editor-editor-container {
  50. height: calc(100vh - #{$header-plus-footer});
  51. min-height: calc(100vh - #{$header-plus-footer}); // for IE11
  52. .react-codemirror2,
  53. .CodeMirror,
  54. .CodeMirror-scroll,
  55. .textarea-editor {
  56. height: calc(100vh - #{$editor-margin});
  57. }
  58. @media (min-width: $screen-md) {
  59. padding-right: 0;
  60. }
  61. }
  62. }
  63. #page-editor-with-hackmd {
  64. &,
  65. .hackmd-preinit,
  66. .hackmd-error,
  67. #iframe-hackmd-container > iframe {
  68. width: 100vw;
  69. height: calc(100vh - #{$header-plus-footer});
  70. min-height: calc(100vh - #{$header-plus-footer}); // for IE11
  71. }
  72. }
  73. }
  74. }
  75. }