_post-comments.scss 4.2 KB

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