suneditor-content.scss 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. // SunEditor 콘텐츠 뷰 전용 스타일
  2. .suneditor-content {
  3. // 기본 색상 상속
  4. * {
  5. color: inherit;
  6. }
  7. // SunEditor 이미지 컨테이너
  8. .se-component {
  9. margin: 0px 0;
  10. display: inline-block;
  11. &.se-image-container {
  12. &.__se__float-center{
  13. text-align: center;
  14. margin:0 auto;
  15. figure{
  16. margin:0 auto;
  17. }
  18. }
  19. &.__se__float-left {
  20. float: left;
  21. margin-right: 20px;
  22. }
  23. &.__se__float-right {
  24. float: right;
  25. margin-left: 20px;
  26. }
  27. &.__se__float-none {
  28. display: block;
  29. margin-left: auto;
  30. margin-right: auto;
  31. text-align: center;
  32. }
  33. }
  34. }
  35. // 폰트 태그 스타일 초기화 (다크 배경 대응)
  36. font {
  37. &[face] {
  38. font-family: inherit !important;
  39. }
  40. &[color="#000000"],
  41. &[color="rgb(0, 0, 0)"],
  42. &[color="black"] {
  43. color: rgba(252, 252, 253, 0.9) !important;
  44. }
  45. }
  46. // 이미지
  47. img {
  48. max-width: 100%;
  49. height: auto;
  50. display: inline-block;
  51. vertical-align: middle;
  52. }
  53. // 문단
  54. p {
  55. font-size: 16px;
  56. line-height: 1.8;
  57. margin-bottom: 16px;
  58. color: rgba(252, 252, 253, 0.9);
  59. }
  60. // div
  61. div {
  62. font-size: 16px;
  63. line-height: 1.8;
  64. color: rgba(252, 252, 253, 0.9);
  65. }
  66. // span
  67. span {
  68. font-size: inherit;
  69. line-height: inherit;
  70. &[style*="color: rgb(0, 0, 0)"],
  71. &[style*="color:#000000"],
  72. &[style*="color: black"] {
  73. color: rgba(252, 252, 253, 0.9) !important;
  74. }
  75. }
  76. // 제목
  77. h1, h2, h3, h4, h5, h6 {
  78. margin-top: 32px;
  79. margin-bottom: 16px;
  80. font-weight: 600;
  81. color: rgba(252, 252, 253, 1);
  82. }
  83. h1 { font-size: 36px; }
  84. h2 { font-size: 32px; }
  85. h3 { font-size: 28px; }
  86. h4 { font-size: 24px; }
  87. h5 { font-size: 20px; }
  88. h6 { font-size: 18px; }
  89. // 링크
  90. a {
  91. color: #fff;
  92. text-decoration: underline;
  93. &:hover {
  94. opacity: 0.8;
  95. }
  96. }
  97. // 리스트
  98. ul, ol {
  99. margin-left: 20px;
  100. margin-bottom: 16px;
  101. padding-left: 20px;
  102. li {
  103. font-size: 16px;
  104. line-height: 1.8;
  105. margin-bottom: 8px;
  106. color: rgba(252, 252, 253, 0.9);
  107. }
  108. }
  109. // 인용문
  110. blockquote {
  111. border-left: 4px solid rgba(252, 252, 253, 0.3);
  112. padding-left: 20px;
  113. margin: 20px 0;
  114. color: rgba(252, 252, 253, 0.7);
  115. }
  116. // 테이블
  117. table {
  118. width: 100%;
  119. border-collapse: collapse;
  120. margin: 20px 0;
  121. th, td {
  122. border: 1px solid rgba(252, 252, 253, 0.3);
  123. padding: 12px;
  124. text-align: left;
  125. color: rgba(252, 252, 253, 0.9);
  126. }
  127. th {
  128. background-color: rgba(255, 255, 255, 0.1);
  129. font-weight: 600;
  130. }
  131. }
  132. // iframe (비디오)
  133. iframe {
  134. max-width: 100%;
  135. margin: 20px 0;
  136. display: block;
  137. }
  138. // 수평선
  139. hr {
  140. border: none;
  141. border-top: 1px solid rgba(252, 252, 253, 0.3);
  142. margin: 24px 0;
  143. }
  144. // 코드
  145. pre, code {
  146. background-color: rgba(255, 255, 255, 0.05);
  147. padding: 4px 8px;
  148. border-radius: 4px;
  149. font-family: monospace;
  150. color: rgba(252, 252, 253, 0.9);
  151. }
  152. pre {
  153. padding: 16px;
  154. overflow-x: auto;
  155. code {
  156. padding: 0;
  157. background: none;
  158. }
  159. }
  160. // clearfix for floated images
  161. &::after {
  162. content: "";
  163. display: table;
  164. clear: both;
  165. }
  166. // 텍스트 정렬
  167. .se-align-left,
  168. [style*="text-align: left"] {
  169. text-align: left;
  170. }
  171. .se-align-center,
  172. [style*="text-align: center"] {
  173. text-align: center;
  174. }
  175. .se-align-right,
  176. [style*="text-align: right"] {
  177. text-align: right;
  178. }
  179. // figure (SunEditor가 생성하는 경우) - user agent stylesheet 리셋
  180. figure {
  181. figcaption {
  182. font-size: 14px;
  183. color: rgba(252, 252, 253, 0.7);
  184. text-align: center;
  185. margin-top: 8px;
  186. }
  187. }
  188. }