_post-comments.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. .wp-block-post-comments {
  2. label, .comment-meta {
  3. font-size: var(--wp--custom--form--label--typography--font-size);
  4. }
  5. .reply {
  6. margin-top: var(--wp--custom--gap--vertical);
  7. margin-bottom: 0;
  8. a {
  9. display: inline-block;
  10. text-decoration: underline;
  11. &:hover {
  12. text-decoration: none;
  13. }
  14. }
  15. }
  16. form {
  17. display: grid;
  18. column-gap: 1em;
  19. grid-template-rows: auto;
  20. grid-template-areas:
  21. "misc misc"
  22. "notes notes"
  23. "author author"
  24. "email url"
  25. "comment comment"
  26. "cookies-consent cookies-consent"
  27. "form-submit form-submit";
  28. input:not([type=submit]):not([type=checkbox]),
  29. textarea {
  30. font-size: var(--wp--custom--font-sizes--normal);
  31. background: var(--wp--custom--color--background);
  32. border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color);
  33. width: 100%;
  34. }
  35. textarea {
  36. vertical-align: top;
  37. }
  38. label:not([for=wp-comment-cookies-consent]) {
  39. font-size: var(--wp--custom--form--label--typography--font-size);
  40. font-weight: var(--wp--custom--form--label--typography--font-weight);
  41. letter-spacing: var(--wp--custom--form--label--typography--letter-spacing);
  42. margin-bottom: var(--wp--custom--form--label--spacing--margin--bottom);
  43. text-transform: var(--wp--custom--form--label--typography--text-transform);
  44. }
  45. p {
  46. margin-top: 0;
  47. margin-bottom: var(--wp--custom--gap--vertical);
  48. }
  49. & > * {
  50. grid-area: misc;
  51. }
  52. .comment-notes {
  53. grid-area: notes;
  54. }
  55. .comment-form-author {
  56. grid-area: author;
  57. }
  58. .comment-form-email {
  59. grid-area: email;
  60. }
  61. .comment-form-url {
  62. grid-area: url;
  63. }
  64. .comment-form-comment {
  65. grid-area: comment;
  66. }
  67. .comment-form-cookies-consent {
  68. grid-area: cookies-consent;
  69. }
  70. .form-submit {
  71. grid-area: form-submit;
  72. }
  73. .comment-form-cookies-consent {
  74. input[type="checkbox"] {
  75. @include hide-accesibly;
  76. margin-left: 0;
  77. & + label {
  78. display: inline-block;
  79. line-height: calc( var(--wp--custom--form--checkbox--unchecked--sizing--height) + 2 * var(--wp--custom--form--border--width));
  80. margin-left: 0;
  81. padding-left: calc( var(--wp--custom--form--checkbox--unchecked--sizing--width) + ( var(--wp--custom--gap--baseline) / 1.5 ) );
  82. position: relative;
  83. }
  84. & + label::before,
  85. & + label::after {
  86. box-sizing: border-box;
  87. }
  88. & + ::before {
  89. content: var(--wp--custom--form--checkbox--unchecked--content);
  90. position: absolute;
  91. top: var(--wp--custom--form--checkbox--unchecked--position--top);
  92. left: var(--wp--custom--form--checkbox--unchecked--position--left);
  93. width: var(--wp--custom--form--checkbox--unchecked--sizing--width);
  94. height: var(--wp--custom--form--checkbox--unchecked--sizing--height);
  95. border: var(--wp--custom--form--border--width) var(--wp--custom--form--border--style) var(--wp--custom--form--border--color);
  96. }
  97. &:checked + ::after {
  98. content: var(--wp--custom--form--checkbox--checked--content);;
  99. position: absolute;
  100. top: var(--wp--custom--form--checkbox--checked--position--top);
  101. left: var(--wp--custom--form--checkbox--checked--position--left);
  102. width: var(--wp--custom--form--checkbox--checked--sizing--width);
  103. height: var(--wp--custom--form--checkbox--checked--sizing--height);
  104. font-size: var(--wp--custom--form--checkbox--checked--font-size);
  105. }
  106. &:focus + ::before {
  107. outline: 1px dotted currentColor;
  108. outline-offset: 2px;
  109. }
  110. }
  111. }
  112. }
  113. .comment-reply-title {
  114. small {
  115. float: right;
  116. font-size: 14px;
  117. }
  118. }
  119. .commentlist {
  120. margin-bottom: calc(2 * var(--wp--style--block-gap));
  121. .comment {
  122. p {
  123. font-size: var(--wp--custom--post-comment--typography--font-size);
  124. line-height: var(--wp--custom--post-comment--typography--line-height);
  125. margin-bottom: var(--wp--custom--gap--vertical);
  126. margin-top: var(--wp--custom--gap--vertical);
  127. }
  128. }
  129. }
  130. .comment-body {
  131. margin-bottom: calc(1.5 * var( --wp--style--block-gap ));
  132. }
  133. .commentmetadata {
  134. margin-left: 0;
  135. margin-bottom: calc(0.75 * var( --wp--style--block-gap ));
  136. }
  137. .comment-awaiting-moderation {
  138. display: inline-block;
  139. font-size: var(--wp--preset--font-size--small);
  140. margin-bottom: var(--wp--custom--gap--baseline);
  141. }
  142. }