mixin.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. @use './variables.scss' as *;
  2. // 富文本样式
  3. @mixin rich-text($font-size: 16pt) {
  4. font-family: 'Arial', 'Helvetica', sans-serif;
  5. font-size: $font-size;
  6. :deep ul {
  7. padding-inline-start: 40px;
  8. li {
  9. list-style: disc;
  10. }
  11. }
  12. }
  13. // 设置基础样式
  14. @mixin setting-base {
  15. .serial-number {
  16. :deep .el-form-item__content {
  17. display: flex;
  18. align-items: center;
  19. justify-content: space-between;
  20. }
  21. .svg-icon {
  22. cursor: pointer;
  23. }
  24. }
  25. .el-input {
  26. margin-right: 16px;
  27. }
  28. .el-divider {
  29. margin: 16px 0;
  30. }
  31. }
  32. // 预览基础样式
  33. @mixin preview-base {
  34. display: grid;
  35. gap: 6px;
  36. padding: 8px;
  37. :deep .rich-text {
  38. @include rich-text;
  39. &.mce-content-body {
  40. padding-top: 4px;
  41. }
  42. &:not(.mce-edit-focus) {
  43. p {
  44. margin: 0;
  45. }
  46. }
  47. &.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
  48. top: 6px;
  49. }
  50. }
  51. .main {
  52. grid-area: main;
  53. width: 100%;
  54. }
  55. }
  56. // 序号样式
  57. @mixin serial-number($height: 36px) {
  58. width: 40px;
  59. height: $height;
  60. padding: 4px 8px;
  61. font-size: 14px;
  62. color: $text-color;
  63. background-color: $fill-color;
  64. border-radius: 2px;
  65. }