comments.css

Same filename in other branches
  1. 9 core/themes/olivero/css/components/comments.css
  2. 9 core/themes/bartik/css/components/comments.css
  3. 10 core/themes/olivero/css/components/comments.css
  4. 11.x core/themes/olivero/css/components/comments.css

Visual styles for comments in Bartik.

File

core/themes/bartik/css/components/comments.css

View source
  1. /**
  2. * @file
  3. * Visual styles for comments in Bartik.
  4. */
  5. /* This is required to win over specificity of #content h2 */
  6. #content .comment-wrapper h2 {
  7. margin-bottom: 1em;
  8. }
  9. #content .comment-wrapper h2.comment-form__title {
  10. margin-bottom: 1em;
  11. }
  12. .field-node--comment {
  13. font-size: 0.934em;
  14. }
  15. .comment {
  16. display: table;
  17. margin-bottom: 19px;
  18. vertical-align: top;
  19. }
  20. [dir="rtl"] .comment {
  21. direction: rtl;
  22. }
  23. .comment__meta {
  24. padding: 0 30px 0 0; /* LTR */
  25. font-size: 1.071em;
  26. }
  27. [dir="rtl"] .comment__meta {
  28. padding: 0 0 0 30px;
  29. }
  30. .comment__attribution img {
  31. border: 1px solid #d3d7d9;
  32. }
  33. /* This is required to win over specificity of .field--type-image img */
  34. .comment .field--name-user-picture img {
  35. margin: 0;
  36. }
  37. .comment__author .username {
  38. white-space: nowrap;
  39. }
  40. .comment__author {
  41. margin: 4px 0;
  42. line-height: 1.2;
  43. }
  44. .comment__time {
  45. margin-bottom: 4px;
  46. color: #68696b;
  47. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  48. font-size: 0.733em;
  49. line-height: 1.2;
  50. }
  51. .comment__permalink {
  52. font-size: 0.733em;
  53. line-height: 1.2;
  54. }
  55. .comment__content {
  56. position: relative;
  57. display: table-cell;
  58. width: 100%;
  59. padding: 10px 25px 10px 25px;
  60. vertical-align: top;
  61. word-break: break-word;
  62. hyphens: auto;
  63. border: 1px solid #d3d7d9;
  64. font-size: 0.929em;
  65. line-height: 1.6;
  66. }
  67. .comment__content a {
  68. hyphens: none;
  69. }
  70. .comment__content:before {
  71. position: absolute;
  72. top: 20px;
  73. right: 100%; /* LTR */
  74. content: "";
  75. border-top: 20px solid transparent;
  76. border-right: 20px solid #d3d7d9; /* LTR */
  77. border-bottom: 20px solid transparent;
  78. }
  79. [dir="rtl"] .comment__content:before {
  80. right: auto;
  81. left: 100%;
  82. border-right: none;
  83. border-left: 20px solid #d3d7d9;
  84. }
  85. .comment__content:after {
  86. position: absolute;
  87. top: 20px;
  88. right: 100%; /* LTR */
  89. margin-right: -1px; /* LTR */
  90. content: "";
  91. border-top: 20px solid transparent;
  92. border-right: 20px solid #fff; /* LTR */
  93. border-bottom: 20px solid transparent;
  94. }
  95. [dir="rtl"] .comment__content:after {
  96. right: auto;
  97. left: 100%;
  98. margin-right: 0;
  99. margin-left: -1px;
  100. border-right: none;
  101. border-left: 20px solid #fff;
  102. }
  103. .comment__content h3 {
  104. margin-top: 0.94em;
  105. margin-bottom: 0.45em;
  106. font-size: 1.171em;
  107. }
  108. .indented {
  109. margin-left: 40px; /* LTR */
  110. }
  111. [dir="rtl"] .indented {
  112. margin-right: 40px;
  113. margin-left: 0;
  114. }
  115. .comment .links {
  116. padding: 0 0 0.25em 0;
  117. }
  118. .comment .links li {
  119. padding: 0 0.5em 0 0; /* LTR */
  120. font-size: 1.08em;
  121. }
  122. [dir="rtl"] .comment .links li {
  123. padding: 0 0 0 0.5em;
  124. }
  125. .comment--unpublished {
  126. margin-right: 5px; /* LTR */
  127. padding: 5px 2px 5px 5px; /* LTR */
  128. background: #fff4f4;
  129. }
  130. [dir="rtl"] .comment--unpublished {
  131. margin-right: 0;
  132. margin-left: 5px;
  133. padding: 5px 5px 5px 2px;
  134. }
  135. /**
  136. * @todo: unpublished nodes have class .node--unpublished.
  137. * change this to .comment--unpublished.
  138. */
  139. .unpublished .comment-text .comment-arrow {
  140. border-right: 1px solid #fff4f4;
  141. border-left: 1px solid #fff4f4;
  142. }
  143. .unpublished {
  144. padding: 20px 15px 0;
  145. }
  146. .comment-footer {
  147. display: table-row;
  148. }
  149. .comment--unpublished .comment__text:after,
  150. .node--unpublished .comment__text:after {
  151. border-right-color: #fff4f4; /* LTR */
  152. }
  153. [dir="rtl"] .comment--unpublished .comment__content:after,
  154. [dir="rtl"] .node--unpublished .comment__content:after {
  155. border-left-color: #fff4f4;
  156. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.