media-library.pcss.css

Same filename in other branches
  1. 9 core/themes/claro/css/theme/media-library.pcss.css
  2. 8.9.x core/themes/claro/css/theme/media-library.pcss.css
  3. 10 core/themes/claro/css/theme/media-library.pcss.css

media-library.pcss.css

Styling for Media Library.

File

core/themes/claro/css/theme/media-library.pcss.css

View source
  1. /**
  2. * @file media-library.pcss.css
  3. * Styling for Media Library.
  4. */
  5. /**
  6. * Negative margins compensate for modal dialog padding and compensate for
  7. * positioning that would otherwise hide the active tab indicator on the left.
  8. */
  9. .media-library-wrapper {
  10. display: flex;
  11. margin: -1rem -1.5rem -1rem -1rem; /* LTR */
  12. }
  13. [dir="rtl"] .media-library-wrapper {
  14. margin-right: -1em;
  15. margin-left: -1.5em;
  16. }
  17. .media-library-wrapper .messages-list,
  18. .media-library-wrapper .messages {
  19. margin-top: 0;
  20. margin-bottom: var(--space-l);
  21. }
  22. .media-library-menu {
  23. position: relative;
  24. display: block;
  25. width: var(--vertical-tabs-menu-width);
  26. margin: 0;
  27. padding-top: var(--vertical-tabs-menu-item-shadow-extraspace);
  28. list-style: none;
  29. color: var(--color-text);
  30. }
  31. [dir="rtl"] .media-library-menu {
  32. margin: 0;
  33. }
  34. .media-library-menu__item {
  35. overflow: hidden;
  36. margin: var(--vertical-tabs-menu-item--top-margin) var(--vertical-tabs-menu-item--right-margin) var(--vertical-tabs-menu-item--bottom-margin) var(--vertical-tabs-menu-item--left-margin); /* LTR */
  37. padding: var(--vertical-tabs-menu-item-shadow-extraspace) 0;
  38. }
  39. [dir="rtl"] .media-library-menu__item {
  40. margin-right: var(--vertical-tabs-menu-item--left-margin);
  41. margin-left: var(--vertical-tabs-menu-item--right-margin);
  42. }
  43. .media-library-menu__item::before {
  44. z-index: var(--vertical-tabs-menu--z-index); /* The line should be kept above the vertical tabs menu link to keep it visible even if the link is hovered and gets the 'hover' background color. */
  45. display: block;
  46. width: 100%;
  47. margin-top: calc(var(--vertical-tabs-menu-separator-size) * -1);
  48. content: "";
  49. border-top: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  50. }
  51. .media-library-menu__link {
  52. position: relative;
  53. display: block;
  54. margin-top: calc(var(--vertical-tabs-border-size) * -1);
  55. padding: var(--space-s) var(--space-s) var(--space-s) calc(var(--space-l) - var(--vertical-tabs-menu-link--active-border-size)); /* LTR */
  56. text-decoration: none;
  57. color: var(--color-text);
  58. border: var(--vertical-tabs-border-size) solid transparent;
  59. border-width: var(--vertical-tabs-border-size) 0 var(--vertical-tabs-border-size) var(--vertical-tabs-menu-link--active-border-size); /* LTR */
  60. border-radius: var(--vertical-tabs-border-radius) 0 0 var(--vertical-tabs-border-radius); /* LTR */
  61. }
  62. [dir="rtl"] .media-library-menu__link {
  63. padding-right: calc(var(--space-l) - var(--vertical-tabs-menu-link--active-border-size));
  64. padding-left: var(--space-s);
  65. border-width: var(--vertical-tabs-border-size) var(--vertical-tabs-menu-link--active-border-size) var(--vertical-tabs-border-size) 0;
  66. border-radius: 0 var(--vertical-tabs-border-radius) var(--vertical-tabs-border-radius) 0;
  67. }
  68. /* Menu link states. */
  69. .media-library-menu__link:focus {
  70. z-index: calc(var(--vertical-tabs-menu--z-index) + 3); /* Focus state should be on the highest level to make the focus effect be fully visible. This also means that it should have bigger z-index than the selected link. */
  71. text-decoration: none;
  72. box-shadow: none;
  73. }
  74. .media-library-menu__link:hover {
  75. text-decoration: none;
  76. color: var(--color-absolutezero);
  77. /* These borders are necessary to replace the dividing lines while in the hover state. */
  78. border-top: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  79. border-bottom: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  80. background: var(--color-bgblue-hover);
  81. }
  82. /* This pseudo element provides the background for the hover state. */
  83. .media-library-menu__link::before {
  84. position: absolute;
  85. z-index: calc(var(--vertical-tabs-menu--z-index) - 1); /* This should be on a lower level than the menu-item separator lines. */
  86. top: calc(var(--vertical-tabs-border-size) * -1);
  87. right: 0; /* LTR */
  88. bottom: calc(var(--vertical-tabs-border-size) * -1);
  89. left: calc(var(--vertical-tabs-menu-link--active-border-size) * -1); /* LTR */
  90. content: "";
  91. pointer-events: none;
  92. background-clip: padding-box;
  93. }
  94. [dir="rtl"] .media-library-menu__link::before {
  95. right: calc(var(--vertical-tabs-menu-link--active-border-size) * -1);
  96. left: 0;
  97. }
  98. .media-library-menu__link:focus::after {
  99. position: absolute;
  100. top: 0;
  101. right: 0;
  102. bottom: 0;
  103. left: 0;
  104. margin: calc(var(--vertical-tabs-border-size) * -1) calc(var(--vertical-tabs-menu-link--active-border-size) * -1);
  105. content: "";
  106. pointer-events: none;
  107. border: var(--vertical-tabs-menu-link-focus-border-size) solid var(--color-focus);
  108. border-radius: var(--vertical-tabs-border-radius);
  109. }
  110. .media-library-menu__link.active {
  111. z-index: calc(var(--vertical-tabs-menu--z-index) + 2); /* The selected menu link should be on a higher level than the white masking line that hides the gray separator. */
  112. color: var(--color-absolutezero);
  113. border-color: var(--vertical-tabs-border-color) transparent;
  114. background-color: var(--color-white);
  115. box-shadow: var(--vertical-tabs-shadow);
  116. }
  117. .media-library-menu__link.active:hover {
  118. color: var(--color-absolutezero-hover);
  119. background-color: var(--color-bgblue-hover);
  120. }
  121. .media-library-menu__link.active::before {
  122. z-index: 1; /* The blue active-tab indication should be on a higher level than the green focus border. */
  123. border-left: var(--vertical-tabs-menu-link--active-border-size) solid var(--vertical-tabs-menu-link--active-border-color); /* LTR */
  124. border-radius: var(--base-border-radius) 0 0 var(--base-border-radius); /* LTR */
  125. }
  126. [dir="rtl"] .media-library-menu__link.active::before {
  127. border-right: var(--vertical-tabs-menu-link--active-border-size) solid var(--vertical-tabs-menu-link--active-border-color);
  128. border-left: 0;
  129. border-radius: 0 var(--base-border-radius) var(--base-border-radius) 0;
  130. }
  131. .media-library-menu__link.active:hover::before {
  132. background: none;
  133. }
  134. .media-library-content {
  135. width: 100%;
  136. padding: 1em;
  137. outline: none;
  138. }
  139. .media-library-menu + .media-library-content {
  140. z-index: var(--vertical-tabs-menu--z-index);
  141. border-left: var(--vertical-tabs-border); /* LTR */
  142. box-shadow: var(--vertical-tabs-shadow);
  143. }
  144. [dir="rtl"] .media-library-menu + .media-library-content {
  145. border-right: var(--vertical-tabs-border);
  146. border-left: 0;
  147. }
  148. /* Generic media add form styles. */
  149. .media-library-add-form--without-input .form-item {
  150. margin-right: 1rem;
  151. }
  152. /**
  153. * Remove outline from added media list.
  154. *
  155. * The added media list receives focus after adding new media, but since it is
  156. * not an interactive element, it does not need an outline.
  157. */
  158. .media-library-add-form__added-media {
  159. margin: 0;
  160. padding: 0;
  161. outline: none;
  162. }
  163. /**
  164. * This Media Library form is an exception to the extrasmall button pattern.
  165. * Additional padding is needed to accommodate the remove button icon. The
  166. * margin is adjusted for alignment within the media library dialog.
  167. */
  168. .media-library-add-form__added-media .media-library-add-form__remove-button.button--extrasmall {
  169. margin: var(--space-xs) 0; /* LTR */
  170. /* Left padding is double the background size of the button icon. */
  171. padding: calc(calc(var(--space-xs) / 2) - 1px) calc(var(--space-s) - 1px) calc(calc(var(--space-xs) / 2) - 1px) calc(var(--space-s) * 2);
  172. }
  173. /* This is needed to override the default extrasmall button left margin. */
  174. [dir="rtl"] .media-library-add-form__added-media .media-library-add-form__remove-button.button--extrasmall {
  175. margin-left: 0;
  176. }
  177. .media-library-add-form__input-wrapper {
  178. padding: var(--space-xs) var(--space-l) var(--space-l) var(--space-l);
  179. border: var(--details-border-size) solid var(--details-border-color);
  180. border-radius: var(--base-border-radius);
  181. background-color: var(--color-white);
  182. box-shadow: var(--details-box-shadow);
  183. }
  184. /* Style the media add upload form. */
  185. .media-library-add-form--upload.media-library-add-form--without-input .form-item-upload {
  186. margin-bottom: 0;
  187. }
  188. .media-library-add-form--upload.media-library-add-form--with-input .form-managed-file__main,
  189. .media-library-add-form--upload.media-library-add-form--with-input .form-managed-file.no-upload {
  190. display: block;
  191. }
  192. /* Adjust the focus border on this element so it is not too close to buttons. */
  193. .media-library-add-form__added-media:focus {
  194. box-shadow:
  195. 0 0 0 calc(var(--focus-border-offset-size) + 2px) var(--color-white),
  196. 0 0 0 calc(var(--focus-border-size) + var(--focus-border-offset-size) + 2px) var(--color-focus);
  197. }
  198. .media-library-add-form .file-upload-help {
  199. margin: 8px 0 0;
  200. }
  201. /* Style the media add oEmbed form. */
  202. .media-library-add-form--oembed .media-library-add-form__input-wrapper {
  203. display: flex;
  204. align-items: center;
  205. }
  206. @media screen and (max-width: 37.5em) {
  207. .media-library-add-form--oembed .media-library-add-form__input-wrapper {
  208. display: block;
  209. }
  210. }
  211. .media-library-add-form--oembed.media-library-add-form--without-input .form-item-url {
  212. margin-bottom: 0;
  213. }
  214. .media-library-add-form-oembed-url {
  215. width: 100%;
  216. }
  217. /* Media add form selection styles. */
  218. .media-library-add-form__selected-media {
  219. margin-top: 1em;
  220. }
  221. /* Change to padding to account for the negative margin for flex grid. */
  222. .media-library-add-form__selected-media .details-wrapper {
  223. padding: 0 10px 1em 10px;
  224. }
  225. .media-library-add-form__selected-media .media-library-item .field--name-thumbnail img {
  226. height: 100px;
  227. }
  228. /* Generic media library view styles. */
  229. .media-library-select-all {
  230. flex-basis: 100%;
  231. width: 100%;
  232. margin: 10px 8px;
  233. }
  234. .media-library-select-all input {
  235. margin-right: 10px;
  236. }
  237. [dir="rtl"] .media-library-select-all input {
  238. margin-left: 10px;
  239. }
  240. .media-library-views-form,
  241. .media-library-selection,
  242. .media-library-add-form__selected-media .details-wrapper,
  243. .media-library-view .form--inline {
  244. display: flex;
  245. flex-wrap: wrap;
  246. }
  247. .media-library-views-form > .form-actions,
  248. .media-library-views-form > .field-actions {
  249. flex-basis: 100%;
  250. }
  251. .media-library-views-form__header {
  252. flex-basis: 100%;
  253. }
  254. .media-library-views-form__header .form-item {
  255. margin-right: 8px; /* @TODO RTL? */
  256. }
  257. .media-library-views-form__rows {
  258. display: flex;
  259. flex-wrap: wrap;
  260. flex-basis: 100%;
  261. margin: 0 -8px;
  262. }
  263. /**
  264. * Override the table display of the visually hidden labels.
  265. *
  266. * The width, height and overflow properties in the styles for the
  267. * .visually-hidden class do not work correctly if the element has a table
  268. * display.
  269. */
  270. .media-library-item label {
  271. display: inline-block;
  272. }
  273. /* Media library widget view styles. */
  274. .media-library-wrapper .media-library-view {
  275. position: relative;
  276. display: flex;
  277. flex-wrap: wrap;
  278. justify-content: space-between;
  279. }
  280. .media-library-wrapper .view-header {
  281. align-self: flex-end;
  282. margin: 1em 0;
  283. text-align: right; /* LTR */
  284. }
  285. [dir="rtl"] .media-library-wrapper .view-header {
  286. text-align: left;
  287. }
  288. .media-library-wrapper .media-library-view .view-filters,
  289. .media-library-wrapper .media-library-view .view-content {
  290. flex: 0 0 100%;
  291. }
  292. .media-library-wrapper .views-display-link {
  293. margin: 0;
  294. padding-left: 22px; /* LTR */
  295. color: #333;
  296. font-size: 15px;
  297. line-height: 16px;
  298. }
  299. [dir="rtl"] .media-library-wrapper .views-display-link {
  300. padding-right: 22px;
  301. padding-left: 0;
  302. }
  303. .media-library-wrapper .views-display-link.is-active {
  304. font-weight: bold;
  305. }
  306. .media-library-wrapper .views-display-link-widget {
  307. margin-right: 15px;
  308. background: url(../../../../misc/icons/333333/grid.svg) left 0 no-repeat; /* LTR */
  309. }
  310. [dir="rtl"] .media-library-wrapper .views-display-link-widget {
  311. background-position: right 0;
  312. }
  313. .media-library-wrapper .views-display-link-widget_table {
  314. background: url(../../../../misc/icons/333333/table.svg) left 0 no-repeat; /* LTR */
  315. }
  316. [dir="rtl"] .media-library-wrapper .views-display-link-widget_table {
  317. background-position: right 0;
  318. }
  319. /**
  320. * Style the media library grid items.
  321. */
  322. .media-library-item {
  323. position: relative;
  324. }
  325. /**
  326. * Ajax throbbers inside a media library item.
  327. */
  328. .media-library-item .ajax-progress.ajax-progress.ajax-progress {
  329. position: absolute;
  330. z-index: calc(var(--vertical-tabs-menu--z-index) + 1);
  331. top: 50%;
  332. left: 50%;
  333. box-sizing: border-box;
  334. width: 3rem; /* 56px */
  335. height: 3rem;
  336. margin: -1.5rem;
  337. border: var(--input-border-size) solid var(--jui-dropdown-border-color);
  338. border-radius: 3.5rem;
  339. background: var(--color-white);
  340. box-shadow: 0 0.25rem 0.625rem var(--jui-dropdown-shadow-color);
  341. }
  342. .media-library-item .ajax-progress__throbber {
  343. position: absolute;
  344. top: 50%;
  345. left: 50%;
  346. width: 1.75rem;
  347. height: 1.75rem;
  348. margin: -0.875rem;
  349. border: 3px solid var(--color-absolutezero);
  350. border-right: 3px dotted transparent;
  351. }
  352. .media-library-item .ajax-progress__message {
  353. display: none;
  354. }
  355. .media-library-item--grid {
  356. justify-content: center;
  357. box-sizing: border-box;
  358. width: 50%;
  359. padding: 8px;
  360. vertical-align: top;
  361. outline: none;
  362. background: #fff;
  363. }
  364. .media-library-item--grid::before {
  365. position: absolute;
  366. top: 7px;
  367. left: 7px;
  368. width: calc(100% - 16px);
  369. height: calc(100% - 16px);
  370. content: "";
  371. transition:
  372. border-color 0.2s,
  373. color 0.2s,
  374. background 0.2s;
  375. pointer-events: none;
  376. border: 1px solid #dbdbdb;
  377. border-radius: 2px;
  378. box-shadow: var(--details-box-shadow);
  379. }
  380. /**
  381. * The media library grid item focus border is moved to a child element to
  382. * improve padding.
  383. */
  384. .media-library-item--grid:focus {
  385. outline: none;
  386. box-shadow: none;
  387. }
  388. .media-library-item--grid:focus .media-library-item__preview-wrapper {
  389. outline: var(--focus-outline);
  390. box-shadow: var(--focus-box-shadow);
  391. }
  392. /* Media library widget weight field styles. */
  393. .media-library-item--grid .form-item {
  394. margin: 0.75em;
  395. }
  396. /* The selected items in the add form should be shown a bit smaller. */
  397. .media-library-add-form__selected-media .media-library-item--small {
  398. width: 33.3%;
  399. }
  400. .media-library-widget-modal .ui-dialog-buttonpane {
  401. display: flex;
  402. align-items: center;
  403. }
  404. .media-library-widget-modal .ui-dialog-buttonpane .form-actions,
  405. .media-library-widget-modal .ui-dialog-buttonpane .field-actions {
  406. flex: 1;
  407. }
  408. /**
  409. * By default, the dialog is too narrow to be usable.
  410. * @see Drupal.ckeditor5.openDialog()
  411. */
  412. .ui-dialog--narrow.media-library-widget-modal {
  413. max-width: 75%;
  414. }
  415. @media screen and (min-width: 45em) {
  416. .media-library-item--grid {
  417. width: 33.3%;
  418. }
  419. /* Change the width for the modal and widget since there is less space. */
  420. .media-library-widget-modal .media-library-item--grid,
  421. .media-library-selection .media-library-item--grid {
  422. width: 50%;
  423. }
  424. /* The selected items in the add form should be shown a bit smaller. */
  425. .media-library-add-form__selected-media .media-library-item--small {
  426. width: 25%;
  427. }
  428. }
  429. @media screen and (min-width: 60em) {
  430. .media-library-item--grid {
  431. width: 25%;
  432. }
  433. /* Change the width for the modal and widget since there is less space. */
  434. .media-library-widget-modal .media-library-item--grid,
  435. .media-library-selection .media-library-item--grid {
  436. width: 33.3%;
  437. }
  438. /* The selected items in the add form should be shown a bit smaller. */
  439. .media-library-add-form__selected-media .media-library-item--small {
  440. width: 16.6%;
  441. }
  442. }
  443. @media screen and (min-width: 77em) {
  444. .media-library-item--grid {
  445. width: 16.6%;
  446. }
  447. /* Change the width for the modal and widget since there is less space. */
  448. .media-library-widget-modal .media-library-item--grid,
  449. .media-library-selection .media-library-item--grid {
  450. width: 25%;
  451. }
  452. /* The selected items in the add form should be shown a bit smaller. */
  453. .media-library-add-form__selected-media .media-library-item--small {
  454. width: 16.6%;
  455. }
  456. }
  457. .media-library-item--grid .field--name-thumbnail {
  458. overflow: hidden;
  459. text-align: center;
  460. background-color: #ebebeb;
  461. }
  462. .media-library-item--grid .field--name-thumbnail img {
  463. height: 180px;
  464. object-fit: contain;
  465. object-position: center center;
  466. }
  467. .media-library-item--grid.is-hover::before,
  468. .media-library-item--grid.checked::before,
  469. .media-library-item--grid.is-focus::before {
  470. top: 5px;
  471. left: 5px;
  472. border-width: 3px;
  473. border-radius: 3px;
  474. }
  475. .media-library-item--grid.is-hover::before,
  476. .media-library-item--grid.checked.is-hover::before {
  477. border-color: var(--color-absolutezero-hover);
  478. }
  479. .media-library-item--grid.is-focus::before {
  480. border-color: var(--color-focus);
  481. }
  482. .media-library-item--grid.checked::before {
  483. border-color: var(--button--focus-border-color);
  484. }
  485. .media-library-item--grid .form-boolean--type-checkbox:checked {
  486. border-color: var(--button--focus-border-color);
  487. background-color: var(--button--focus-border-color);
  488. }
  489. .media-library-item__click-to-select-checkbox {
  490. position: absolute;
  491. z-index: 1;
  492. top: 16px;
  493. left: 16px; /* LTR */
  494. display: block;
  495. }
  496. [dir="rtl"] .media-library-item__click-to-select-checkbox {
  497. right: 16px;
  498. left: auto;
  499. }
  500. .media-library-item__click-to-select-checkbox input {
  501. width: 20px;
  502. height: 20px;
  503. }
  504. .media-library-item__click-to-select-checkbox .form-item {
  505. margin: 0;
  506. }
  507. .media-library-item__click-to-select-trigger {
  508. overflow: hidden;
  509. height: 100%;
  510. cursor: pointer;
  511. }
  512. /* Media library item table styles. */
  513. .media-library-item--table img {
  514. max-width: 100px;
  515. height: auto;
  516. }
  517. /* Media library entity view display styles. */
  518. .media-library-item__preview {
  519. padding-bottom: 34px;
  520. }
  521. .field--widget-media-library-widget .media-library-item__preview {
  522. cursor: move;
  523. }
  524. .field--widget-media-library-widget .media-library-item__preview img {
  525. border-top-left-radius: 2px;
  526. border-top-right-radius: 2px;
  527. }
  528. .field--widget-media-library-widget .js-media-library-item:only-child .media-library-item__preview {
  529. cursor: inherit;
  530. }
  531. .media-library-item__status {
  532. position: absolute;
  533. top: 40px;
  534. left: 5px; /* LTR */
  535. padding: 5px 10px;
  536. pointer-events: none;
  537. color: #e4e4e4;
  538. background: #666;
  539. font-size: 12px;
  540. font-style: italic;
  541. }
  542. [dir="rtl"] .media-library-item__status {
  543. right: 5px;
  544. left: auto;
  545. }
  546. .media-library-item__attributes {
  547. position: absolute;
  548. bottom: 0;
  549. display: block;
  550. overflow: hidden;
  551. max-width: calc(100% - 10px);
  552. max-height: calc(100% - 50px);
  553. padding: 5px;
  554. background: white;
  555. }
  556. .media-library-item__name {
  557. display: block;
  558. overflow: hidden;
  559. margin: calc(var(--space-xs) / 2) var(--space-xs);
  560. white-space: nowrap;
  561. text-overflow: ellipsis;
  562. font-size: 14px;
  563. }
  564. .media-library-item__attributes:hover .media-library-item__name,
  565. .media-library-item--grid.is-focus .media-library-item__name,
  566. .media-library-item--grid.checked .media-library-item__name {
  567. white-space: normal;
  568. }
  569. .media-library-item__type {
  570. color: #696969;
  571. font-size: 12px;
  572. }
  573. .media-library-item--disabled {
  574. pointer-events: none;
  575. opacity: 0.5;
  576. }
  577. /* Media library widget styles. */
  578. .media-library-widget {
  579. position: relative;
  580. }
  581. .media-library-widget__toggle-weight.media-library-widget__toggle-weight {
  582. position: absolute;
  583. top: var(--space-s);
  584. right: var(--space-m); /* LTR */
  585. text-decoration: none;
  586. }
  587. [dir="rtl"] .media-library-widget__toggle-weight.media-library-widget__toggle-weight {
  588. right: auto;
  589. left: var(--space-m);
  590. }
  591. /* Add negative margin for flex grid. */
  592. .media-library-selection {
  593. margin: 1em -8px;
  594. }
  595. /**
  596. * Media library widget edit and delete button styles.
  597. *
  598. * We have to override the .button styles since buttons make heavy use of
  599. * background and border property changes.
  600. */
  601. .media-library-item__edit,
  602. .media-library-item__edit:hover,
  603. .media-library-item__edit:focus,
  604. .media-library-item__remove,
  605. .media-library-item__remove:hover,
  606. .media-library-item__remove:focus,
  607. .media-library-item__remove.button,
  608. .media-library-item__remove.button:first-child,
  609. .media-library-item__remove.button:disabled,
  610. .media-library-item__remove.button:disabled:active,
  611. .media-library-item__remove.button:hover,
  612. .media-library-item__remove.button:focus {
  613. position: absolute;
  614. z-index: 1;
  615. top: 10px;
  616. overflow: hidden;
  617. width: 24px;
  618. height: 24px;
  619. margin: 5px;
  620. padding: 0;
  621. transition: 0.2s border-color;
  622. color: transparent;
  623. background-size: 12px;
  624. text-shadow: none;
  625. font-size: 0;
  626. }
  627. .media-library-item__edit {
  628. right: 40px; /* LTR */
  629. }
  630. [dir="rtl"] .media-library-item__edit {
  631. right: auto;
  632. left: 40px;
  633. }
  634. .media-library-item__remove {
  635. right: 10px; /* LTR */
  636. }
  637. [dir="rtl"] .media-library-item__remove {
  638. right: auto;
  639. left: 10px;
  640. }
  641. .media-library-item__edit {
  642. /* !important to override button class border. */
  643. border: 1px solid var(--color-gray-200) !important;
  644. background-image: url("../../images/icons/545560/pencil.svg");
  645. background-repeat: no-repeat;
  646. background-position: center;
  647. background-size: 12px;
  648. }
  649. .media-library-item__edit:active {
  650. background-image: url("../../../../misc/icons/ffffff/pencil.svg");
  651. }
  652. .media-library-item__remove,
  653. .media-library-item__remove.button,
  654. .media-library-item__remove.button:first-child,
  655. .media-library-item__remove.button:disabled,
  656. .media-library-item__remove.button:disabled:active,
  657. .media-library-item__remove.button:hover,
  658. .media-library-item__remove.button:focus {
  659. /* !important to override button class border. */
  660. border: 1px solid var(--color-gray-200) !important;
  661. background-image: url("../../../../misc/icons/545560/ex.svg");
  662. background-repeat: no-repeat;
  663. background-position: center;
  664. background-size: 12px;
  665. }
  666. .media-library-item__remove:active,
  667. .media-library-item__remove.button:active,
  668. .media-library-item__remove.button:disabled:active {
  669. /* !important to override button class border. */
  670. border-color: var(--color-absolutezero) !important;
  671. background-image: url("../../../../misc/icons/ffffff/ex.svg");
  672. }
  673. /* Style the added media item container. */
  674. .media-library-add-form__media {
  675. position: relative;
  676. display: flex;
  677. border-bottom: 1px solid #c0c0c0;
  678. }
  679. /* Do not show the bottom border and padding for the last item. */
  680. .media-library-add-form__media:last-child {
  681. padding-bottom: 0;
  682. border-bottom: 0;
  683. }
  684. .media-library-add-form__preview {
  685. display: flex;
  686. align-items: center;
  687. justify-content: center;
  688. width: 220px;
  689. margin-right: 20px; /* LTR */
  690. background: var(--color-gray-050-o-40);
  691. }
  692. [dir="rtl"] .media-library-add-form__preview {
  693. margin-right: 0;
  694. margin-left: 20px;
  695. }
  696. .media-library-add-form__fields {
  697. flex-grow: 1;
  698. }
  699. .media-library-add-form__remove-button {
  700. position: absolute;
  701. right: 0; /* LTR */
  702. background-image: url("../../../../misc/icons/000000/ex.svg");
  703. background-repeat: no-repeat;
  704. background-position: var(--space-xs) center;
  705. background-size: var(--space-s);
  706. }
  707. [dir="rtl"] .media-library-add-form__remove-button {
  708. right: auto;
  709. left: 0;
  710. }
  711. .media-library-add-form__remove-button.button:disabled {
  712. background-image: url("../../../../misc/icons/8e929c/ex.svg");
  713. }
  714. .views-live-preview .media-library-view div.views-row + div.views-row {
  715. margin-top: 0;
  716. }

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