You are here

comments.css in Drupal 9

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: 8px solid transparent
  69. }
  70. [dir="rtl"] .comments__count:after {
  71. border-left: 8px 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: 7px 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. .comment__text-content {
  116. /* Override for .field:not(:last-child) */
  117. }
  118. .comment__text-content:not(:last-child) {
  119. margin-bottom: 0;
  120. }
  121. .comment__links {
  122. margin-top: 1.125rem;
  123. margin-bottom: 0;
  124. }
  125. .comment__links-link {
  126. text-decoration: none;
  127. font-size: 0.875rem;
  128. font-weight: bold;
  129. line-height: 1.125rem
  130. }
  131. .comment__links-link:hover {
  132. text-decoration: underline;
  133. }
  134. .add-comment__picture-wrapper {
  135. top: 2.25rem;
  136. }
  137. [dir="ltr"] .add-comment__picture,[dir="ltr"]
  138. .comment__picture {
  139. left: 0
  140. }
  141. [dir="rtl"] .add-comment__picture,[dir="rtl"]
  142. .comment__picture {
  143. right: 0
  144. }
  145. .add-comment__picture,
  146. .comment__picture {
  147. position: absolute;
  148. overflow: hidden;
  149. width: 2.25rem;
  150. height: 2.25rem;
  151. border-radius: 50%;
  152. background-color: #e7edf1
  153. }
  154. .add-comment__picture *:not(img), .comment__picture *:not(img) {
  155. display: inherit;
  156. width: inherit;
  157. height: inherit;
  158. }
  159. .add-comment__picture img, .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, .comment__picture img {
  167. position: absolute;
  168. /* stylelint-disable csstools/use-logical */
  169. top: 50%;
  170. left: 50%;
  171. /* stylelint-enable csstools/use-logical */
  172. width: 100%;
  173. height: auto;
  174. transform: translate(-50%, -50%)
  175. }
  176. }
  177. @media (min-width: 43.75rem) {
  178. [dir="ltr"] .add-comment__picture,[dir="ltr"]
  179. .comment__picture {
  180. left: -5.625rem
  181. }
  182. [dir="rtl"] .add-comment__picture,[dir="rtl"]
  183. .comment__picture {
  184. right: -5.625rem
  185. }
  186. .add-comment__picture,
  187. .comment__picture {
  188. width: 3.375rem;
  189. height: 3.375rem
  190. }
  191. }
  192. @media (min-width: 43.75rem) {
  193. [dir="ltr"] .indented .comment__picture {
  194. left: -4.5rem
  195. }
  196. [dir="rtl"] .indented .comment__picture {
  197. right: -4.5rem
  198. }
  199. .indented .comment__picture {
  200. width: 2.25rem;
  201. height: 2.25rem
  202. }
  203. }
  204. .comment__meta * {
  205. display: inline;
  206. }
  207. [dir="ltr"] .comment__author {
  208. margin-right: 1.125rem
  209. }
  210. [dir="rtl"] .comment__author {
  211. margin-left: 1.125rem
  212. }
  213. .comment__author {
  214. font-family: "metropolis", sans-serif;
  215. font-size: 1rem;
  216. font-weight: 700;
  217. line-height: 1.125rem
  218. }
  219. .comment__author a {
  220. text-decoration: none;
  221. }
  222. .comment__time {
  223. margin: 0;
  224. color: #6e7172;
  225. font-family: "metropolis", sans-serif;
  226. font-size: 0.875rem;
  227. line-height: 1.125rem;
  228. }
  229. [dir="ltr"] .indented {
  230. margin-left: 2.25rem
  231. }
  232. [dir="rtl"] .indented {
  233. margin-right: 2.25rem
  234. }
  235. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  236. left: -3.375rem
  237. }
  238. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  239. right: -3.375rem
  240. }
  241. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  242. border-left: solid 1px #e7edf1
  243. }
  244. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  245. border-right: solid 1px #e7edf1
  246. }
  247. .indented > .comment:not(:last-of-type):not(.has-children):before {
  248. position: absolute;
  249. top: 2.25rem; /* Comment's padding-top */
  250. width: 0;
  251. height: 100%;
  252. content: ""
  253. }
  254. @media (min-width: 43.75rem) {
  255. [dir="ltr"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  256. left: -3.375rem
  257. }
  258. [dir="rtl"] .indented > .comment:not(:last-of-type):not(.has-children):before {
  259. right: -3.375rem
  260. }
  261. }
  262. @media (min-width: 43.75rem) {
  263. [dir="ltr"] .indented {
  264. margin-left: 4.5rem
  265. }
  266. [dir="rtl"] .indented {
  267. margin-right: 4.5rem
  268. }
  269. }
  270. [dir="ltr"] .show-hide-btn {
  271. margin-left: 3.375rem
  272. }
  273. [dir="rtl"] .show-hide-btn {
  274. margin-right: 3.375rem
  275. }
  276. [dir="ltr"] .show-hide-btn {
  277. margin-right: 0
  278. }
  279. [dir="rtl"] .show-hide-btn {
  280. margin-left: 0
  281. }
  282. [dir="ltr"] .show-hide-btn {
  283. padding-left: 0
  284. }
  285. [dir="rtl"] .show-hide-btn {
  286. padding-right: 0
  287. }
  288. [dir="ltr"] .show-hide-btn {
  289. padding-right: 0
  290. }
  291. [dir="rtl"] .show-hide-btn {
  292. padding-left: 0
  293. }
  294. .show-hide-btn {
  295. margin-top: 2.25rem;
  296. margin-bottom: 0;
  297. padding-top: 0;
  298. padding-bottom: 0;
  299. cursor: pointer;
  300. color: #313637;
  301. border: 0;
  302. background: none;
  303. font-size: 0.875rem;
  304. font-weight: 600;
  305. line-height: 1.125rem;
  306. -webkit-appearance: none;
  307. -moz-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. }