You are here

comments.css in Drupal 10

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