global.css 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. .pd-page {
  6. width: 100vw;
  7. height: 100vh;
  8. padding: 0.75rem;
  9. display: flex;
  10. flex-direction: column;
  11. box-sizing: border-box;
  12. overflow: hidden;
  13. }
  14. /* TopBar styles start */
  15. .pd-top-bar {
  16. width: 100vw;
  17. display: flex;
  18. margin-bottom: 0.75rem;
  19. justify-content: space-between;
  20. box-sizing: border-box;
  21. flex-shrink: 0;
  22. }
  23. .pd-top-bar .pd-top-bar-mode-switcher {
  24. border: 1px solid #ced4da;
  25. border-radius: 0.375rem;
  26. box-sizing: border-box;
  27. }
  28. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn {
  29. box-sizing: border-box;
  30. padding: 6px 12px;
  31. background-color: #fff;
  32. color: #212529;
  33. border: none;
  34. cursor: pointer;
  35. }
  36. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.active {
  37. background-color: #0d6efd;
  38. color: #fff;
  39. }
  40. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.disabled {
  41. background-color: #e9ecef;
  42. color: #212529;
  43. cursor: not-allowed;
  44. pointer-events: none;
  45. }
  46. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:first-child {
  47. border-top-left-radius: 0.375rem;
  48. border-bottom-left-radius: 0.375rem;
  49. }
  50. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:last-child {
  51. border-top-right-radius: 0.375rem;
  52. border-bottom-right-radius: 0.375rem;
  53. }
  54. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:nth-child(2) {
  55. padding: 6px 10px;
  56. border-left: 1px solid #ced4da;
  57. border-right: 1px solid #ced4da;
  58. }
  59. /* TopBar styles end */
  60. /* Editor styles start */
  61. .pd-editor {
  62. width: 100%;
  63. display: flex;
  64. justify-content: space-between;
  65. box-sizing: border-box;
  66. overflow: hidden;
  67. flex-shrink: 0;
  68. flex-grow: 1;
  69. }
  70. .pd-editor .pd-edit-view,
  71. .pd-editor .pd-read-view {
  72. height: calc(
  73. 100vh - 0.75rem * 3 - 28px
  74. ); /* Exact height to prevent flex height expansion */
  75. border: 1px solid #ced4da;
  76. border-radius: 0.375rem;
  77. box-sizing: border-box;
  78. color: #212529;
  79. overflow: auto;
  80. flex-shrink: 0;
  81. flex-basis: 0;
  82. flex-grow: 1;
  83. }
  84. .pd-editor .pd-edit-view textarea {
  85. width: 100%;
  86. height: 100%;
  87. display: block;
  88. box-sizing: border-box;
  89. padding: 0.375rem;
  90. border-radius: 0.375rem;
  91. border: none;
  92. resize: none;
  93. outline: none;
  94. }
  95. .pd-editor .pd-edit-view textarea::-webkit-scrollbar,
  96. .pd-editor .pd-read-view::-webkit-scrollbar {
  97. width: 8px;
  98. }
  99. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-track,
  100. .pd-editor .pd-read-view::-webkit-scrollbar-track {
  101. background-color: transparent;
  102. }
  103. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb,
  104. .pd-editor .pd-read-view::-webkit-scrollbar-thumb {
  105. background-color: #d6dee1;
  106. border-radius: 8px;
  107. }
  108. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb:hover,
  109. .pd-editor .pd-read-view::-webkit-scrollbar-thumb:hover {
  110. background-color: #a8bbbf;
  111. }
  112. .pd-editor .pd-read-view {
  113. padding: 0.375rem;
  114. }
  115. .pd-editor.pd-mode-both .pd-edit-view {
  116. margin-right: 0.375rem;
  117. }
  118. .pd-editor.pd-mode-both .pd-read-view {
  119. margin-left: 0.375rem;
  120. }
  121. .pd-editor.pd-mode-edit .pd-read-view {
  122. display: none;
  123. }
  124. .pd-editor.pd-mode-read .pd-edit-view {
  125. display: none;
  126. }
  127. /* Editor styles end */