mixin.scss 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @use './variables.scss' as *;
  2. @mixin rich-text($font-size: 16pt) {
  3. font-family: 'Arial', 'Helvetica', sans-serif;
  4. font-size: $font-size;
  5. :deep ul {
  6. padding-inline-start: 40px;
  7. li {
  8. list-style: disc;
  9. }
  10. }
  11. }
  12. // 预览
  13. @mixin preview {
  14. display: flex;
  15. flex-direction: column;
  16. row-gap: 24px;
  17. min-height: calc(100% - 32px);
  18. padding: 64px;
  19. margin: 16px 0;
  20. background-color: #fff;
  21. border-radius: 8px;
  22. // 富文本格式
  23. .rich-text {
  24. @include rich-text;
  25. }
  26. // 题干
  27. .stem {
  28. display: flex;
  29. align-items: flex-start;
  30. font-weight: bold;
  31. color: #34343a;
  32. @include rich-text(18pt);
  33. .question-number {
  34. margin-right: 4px;
  35. + span {
  36. flex: 1;
  37. }
  38. }
  39. :deep p {
  40. margin: 0;
  41. }
  42. }
  43. // 描述
  44. .description {
  45. min-height: 48px;
  46. padding: 12px 24px;
  47. background-color: $content-color;
  48. border-radius: 16px;
  49. }
  50. .option-list {
  51. :deep p {
  52. margin: 0;
  53. }
  54. }
  55. // 参考答案
  56. .reference-box {
  57. padding: 12px;
  58. background: #f9f8f9;
  59. .reference-title {
  60. margin: 0 0 10px;
  61. font-size: 14px;
  62. font-weight: 400;
  63. line-height: 32px;
  64. color: #4e5969;
  65. }
  66. .reference-answer {
  67. white-space: pre-wrap;
  68. }
  69. }
  70. }
  71. // 列表
  72. @mixin list {
  73. display: flex;
  74. flex-direction: column;
  75. row-gap: 16px;
  76. height: calc(100% - 16px);
  77. padding: 24px;
  78. margin: 0 24px 16px;
  79. background: #fff;
  80. border-radius: 4px;
  81. }