comments.css

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

Comment section and individual comments.

File

core/themes/olivero/css/components/comments.css

View source
  1. /*
  2. * DO NOT EDIT THIS FILE.
  3. * See the following change record for more information,
  4. * https://www.drupal.org/node/3084859
  5. * @preserve
  6. */
  7. /**
  8. * @file
  9. * Comment section and individual comments.
  10. */
  11. .comment--level-1 {
  12. border-top: 2px solid #e7edf1;
  13. }
  14. .comment--level-1 ~ .comment--level-1 {
  15. margin-top: 2.25rem;
  16. }
  17. .comments__title {
  18. display: flex;
  19. align-items: center;
  20. margin-top: 0;
  21. }
  22. [dir="ltr"] .comments__count {
  23. margin-left: 1.125rem;
  24. }
  25. [dir="rtl"] .comments__count {
  26. margin-right: 1.125rem;
  27. }
  28. [dir="ltr"] .comments__count {
  29. margin-right: 1.125rem;
  30. }
  31. [dir="rtl"] .comments__count {
  32. margin-left: 1.125rem;
  33. }
  34. [dir="ltr"] .comments__count {
  35. padding-left: 0.3125rem;
  36. }
  37. [dir="rtl"] .comments__count {
  38. padding-right: 0.3125rem;
  39. }
  40. [dir="ltr"] .comments__count {
  41. padding-right: 0.3125rem;
  42. }
  43. [dir="rtl"] .comments__count {
  44. padding-left: 0.3125rem;
  45. }
  46. .comments__count {
  47. position: relative;
  48. display: inline-block;
  49. min-width: 2.125rem;
  50. margin-top: 0;
  51. margin-bottom: 0.5625rem;
  52. padding-top: 0;
  53. padding-bottom: 0;
  54. text-align: center;
  55. color: #fff;
  56. border-radius: 2px;
  57. background-color: #0d77b5;
  58. font-size: 0.6875rem;
  59. line-height: 1.3125rem;
  60. }
  61. [dir="ltr"] .comments__count:after {
  62. left: 0.5rem;
  63. }
  64. [dir="rtl"] .comments__count:after {
  65. right: 0.5rem;
  66. }
  67. [dir="ltr"] .comments__count:after {
  68. border-right: 0.5rem solid transparent;
  69. }
  70. [dir="rtl"] .comments__count:after {
  71. border-left: 0.5rem solid transparent;
  72. }
  73. .comments__count:after {
  74. position: absolute;
  75. bottom: -0.4375rem;
  76. width: 0;
  77. height: 0;
  78. content: "";
  79. border-top: 0.4375rem solid #0d77b5;
  80. }
  81. .comment-form {
  82. padding-bottom: 2.25rem;
  83. }
  84. [dir="ltr"] .add-comment__form {
  85. padding-left: 0;
  86. }
  87. [dir="rtl"] .add-comment__form {
  88. padding-right: 0;
  89. }
  90. [dir="ltr"] .comment {
  91. padding-left: 3.375rem;
  92. }
  93. [dir="rtl"] .comment {
  94. padding-right: 3.375rem;
  95. }
  96. .comment {
  97. position: relative;
  98. padding-top: 2.25rem;
  99. }
  100. @media (min-width: 43.75rem) {
  101. [dir="ltr"] .comment {
  102. padding-left: 0;
  103. }
  104. [dir="rtl"] .comment {
  105. padding-right: 0;
  106. }
  107. }
  108. .comment__text-content {
  109. font-size: 1rem;
  110. }
  111. .comment__text-content blockquote {
  112. font-size: 1.3125rem;
  113. line-height: 2.25rem;
  114. }
  115. /* Override for .field:not(:last-child) */
  116. .comment__text-content:not(:last-child) {
  117. margin-bottom: 0;
  118. }
  119. .comment__links {
  120. margin-top: 1.125rem;
  121. margin-bottom: 0;
  122. }
  123. .comment__links-link {
  124. text-decoration: none;
  125. font-size: 0.875rem;
  126. font-weight: bold;
  127. line-height: 1.125rem;
  128. }
  129. .comment__links-link:hover {
  130. text-decoration: underline;
  131. }
  132. .add-comment__picture-wrapper {
  133. top: 2.25rem;
  134. }
  135. [dir="ltr"] .add-comment__picture,
  136. [dir="ltr"] .comment__picture {
  137. left: 0;
  138. }
  139. [dir="rtl"] .add-comment__picture,
  140. [dir="rtl"] .comment__picture {
  141. right: 0;
  142. }
  143. .add-comment__picture,
  144. .comment__picture {
  145. position: absolute;
  146. overflow: hidden;
  147. width: 2.25rem;
  148. height: 2.25rem;
  149. border-radius: 50%;
  150. background-color: #e7edf1;
  151. }
  152. .add-comment__picture *:not(img),
  153. .comment__picture *:not(img) {
  154. display: inherit;
  155. width: inherit;
  156. height: inherit;
  157. }
  158. .add-comment__picture img,
  159. .comment__picture img {
  160. width: 100%;
  161. height: 100%;
  162. object-fit: cover;
  163. /* @TODO: create image-style for profile's avatar to have image squared by default. */
  164. }
  165. @media all and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  166. .add-comment__picture img,
  167. .comment__picture img {
  168. position: absolute;
  169. /* stylelint-disable csstools/use-logical */
  170. top: 50%;
  171. left: 50%;
  172. /* stylelint-enable csstools/use-logical */
  173. width: 100%;
  174. height: auto;
  175. transform: translate(-50%, -50%);
  176. }
  177. }
  178. @media (min-width: 43.75rem) {
  179. [dir="ltr"] .add-comment__picture,
  180. [dir="ltr"] .comment__picture {
  181. left: -5.625rem;
  182. }
  183. [dir="rtl"] .add-comment__picture,
  184. [dir="rtl"] .comment__picture {
  185. right: -5.625rem;
  186. }
  187. .add-comment__picture,
  188. .comment__picture {
  189. width: 3.375rem;
  190. height: 3.375rem;
  191. }
  192. }
  193. @media (min-width: 43.75rem) {
  194. [dir="ltr"] .indented .comment__picture {
  195. left: -4.5rem;
  196. }
  197. [dir="rtl"] .indented .comment__picture {
  198. right: -4.5rem;
  199. }
  200. .indented .comment__picture {
  201. width: 2.25rem;
  202. height: 2.25rem;
  203. }
  204. }
  205. .comment__meta * {
  206. display: inline;
  207. }
  208. [dir="ltr"] .comment__author {
  209. margin-right: 1.125rem;
  210. }
  211. [dir="rtl"] .comment__author {
  212. margin-left: 1.125rem;
  213. }
  214. .comment__author {
  215. font-family: metropolis, sans-serif;
  216. font-size: 1rem;
  217. font-weight: 700;
  218. line-height: 1.125rem;
  219. }
  220. .comment__author a {
  221. text-decoration: none;
  222. }
  223. .comment__time {
  224. margin: 0;
  225. color: #6e7172;
  226. font-family: metropolis, sans-serif;
  227. font-size: 0.875rem;
  228. line-height: 1.125rem;
  229. }
  230. [dir="ltr"] .indented {
  231. margin-left: 2.25rem;
  232. }
  233. [dir="rtl"] .indented {
  234. margin-right: 2.25rem;
  235. }
  236. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  237. left: -3.375rem;
  238. }
  239. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  240. right: -3.375rem;
  241. }
  242. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  243. border-left: solid 1px #e7edf1;
  244. }
  245. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  246. border-right: solid 1px #e7edf1;
  247. }
  248. .indented > .comment:not(:last-of-type):not(.has-children):before {
  249. position: absolute;
  250. top: 2.25rem; /* Comment's padding-top */
  251. width: 0;
  252. height: 100%;
  253. content: "";
  254. }
  255. @media (min-width: 43.75rem) {
  256. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  257. left: -3.375rem;
  258. }
  259. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  260. right: -3.375rem;
  261. }
  262. }
  263. @media (min-width: 43.75rem) {
  264. [dir="ltr"] .indented {
  265. margin-left: 4.5rem;
  266. }
  267. [dir="rtl"] .indented {
  268. margin-right: 4.5rem;
  269. }
  270. }
  271. [dir="ltr"] .show-hide-btn {
  272. margin-left: 3.375rem;
  273. }
  274. [dir="rtl"] .show-hide-btn {
  275. margin-right: 3.375rem;
  276. }
  277. [dir="ltr"] .show-hide-btn {
  278. margin-right: 0;
  279. }
  280. [dir="rtl"] .show-hide-btn {
  281. margin-left: 0;
  282. }
  283. [dir="ltr"] .show-hide-btn {
  284. padding-left: 0;
  285. }
  286. [dir="rtl"] .show-hide-btn {
  287. padding-right: 0;
  288. }
  289. [dir="ltr"] .show-hide-btn {
  290. padding-right: 0;
  291. }
  292. [dir="rtl"] .show-hide-btn {
  293. padding-left: 0;
  294. }
  295. .show-hide-btn {
  296. margin-top: 2.25rem;
  297. margin-bottom: 0;
  298. padding-top: 0;
  299. padding-bottom: 0;
  300. cursor: pointer;
  301. color: #313637;
  302. border: 0;
  303. background: none;
  304. font-size: 0.875rem;
  305. font-weight: 600;
  306. line-height: 1.125rem;
  307. -webkit-appearance: none;
  308. appearance: none;
  309. }
  310. .show-hide-btn[aria-expanded="true"]:after {
  311. content: "\0020 -";
  312. }
  313. .show-hide-btn[aria-expanded="false"]:after {
  314. content: "\0020 +";
  315. }
  316. @media (min-width: 43.75rem) {
  317. [dir="ltr"] .show-hide-btn {
  318. margin-left: 0;
  319. }
  320. [dir="rtl"] .show-hide-btn {
  321. margin-right: 0;
  322. }
  323. }

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