_post-comments.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @import "../../../blockbase/sass/blocks/button-mixins";
  2. .wp-block-post-comments {
  3. line-height: var(--wp--custom--body--typography--line-height);
  4. .reply a {
  5. --wp--custom--button--typography--font-size: var(--wp--preset--font-size--normal);
  6. @include button-border-styles;
  7. --wp--custom--button--color--text: var(--wp--custom--button--hover--color--text);
  8. --wp--custom--button--color--background: var(--wp--custom--button--hover--color--background);
  9. --wp--custom--button--border--color: var(--wp--custom--button--hover--color--text);
  10. & ,
  11. &:hover,
  12. &:focus,
  13. &:active {
  14. line-height: 1;
  15. }
  16. &:not(.has-background):not(.has-text-color) {
  17. &:hover,
  18. &:focus,
  19. &.has-focus {
  20. --wp--custom--button--typography--font-size: var(--wp--preset--font-size--normal);
  21. --wp--custom--button--color--text: var(--wp--custom--button--hover--color--background);
  22. --wp--custom--button--color--background: var(--wp--custom--button--hover--color--text);
  23. }
  24. }
  25. }
  26. form {
  27. display: grid;
  28. column-gap: 1em;
  29. grid-template-rows: auto;
  30. grid-template-areas:
  31. "notes notes"
  32. "author author"
  33. "email url"
  34. "comment comment"
  35. "cookies-consent cookies-consent"
  36. "form-submit form-submit";
  37. input:not([type=submit]):not([type=checkbox]),
  38. textarea {
  39. border: none;
  40. background: var(--wp--custom--color--secondary);
  41. font-size: var(--wp--preset--font-size--normal);
  42. width: 100%;
  43. }
  44. p {
  45. margin-top: 0;
  46. }
  47. .comment-notes {
  48. grid-area: notes;
  49. }
  50. .comment-form-author {
  51. grid-area: author;
  52. }
  53. .comment-form-email {
  54. grid-area: email;
  55. }
  56. .comment-form-url {
  57. grid-area: url;
  58. }
  59. .comment-form-comment {
  60. grid-area: comment;
  61. }
  62. .comment-form-cookies-consent {
  63. grid-area: cookies-consent;
  64. input[type="checkbox"] {
  65. @include hide-accesibly;
  66. & + label {
  67. margin-left: 0;
  68. padding-left: 2em;
  69. position: relative;
  70. }
  71. & + ::before,
  72. & + ::after {
  73. box-sizing: border-box;
  74. }
  75. & + ::before {
  76. content: "";
  77. position: absolute;
  78. top: 0.2em;
  79. left: 0;
  80. width: 16px;
  81. height: 16px;
  82. border: 1px solid var(--wp--custom--color--foreground);
  83. }
  84. &:checked + ::after {
  85. content: "\2715";
  86. width: 12px;
  87. height: 12px;
  88. position: absolute;
  89. top: 4px;
  90. left: 3px;
  91. font-size: 14px;
  92. }
  93. }
  94. }
  95. .form-submit {
  96. grid-area: form-submit;
  97. }
  98. }
  99. .reply {
  100. margin-bottom: 30px;
  101. }
  102. .commentmetadata {
  103. margin-bottom: 20px;
  104. }
  105. .commentlist {
  106. margin-bottom: 60px;
  107. }
  108. // Target certain links within post comments to use the underline treatment.
  109. .comment-body > p > a,
  110. .comment-edit-link {
  111. text-decoration: underline;
  112. &:hover {
  113. text-decoration: none;
  114. }
  115. }
  116. }