media-library.pcss.css

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

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