media-library.css

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
  2. 9 core/themes/seven/css/theme/media-library.css
  3. 9 core/themes/seven/css/classy/layout/media-library.css
  4. 9 core/themes/claro/css/theme/media-library.css
  5. 9 core/themes/bartik/css/classy/layout/media-library.css
  6. 9 core/themes/classy/css/layout/media-library.css
  7. 8.9.x core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
  8. 8.9.x core/themes/seven/css/theme/media-library.css
  9. 8.9.x core/themes/seven/css/classy/layout/media-library.css
  10. 8.9.x core/themes/claro/css/theme/media-library.css
  11. 8.9.x core/themes/bartik/css/classy/layout/media-library.css
  12. 8.9.x core/themes/classy/css/layout/media-library.css
  13. 10 core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
  14. 10 core/themes/claro/css/theme/media-library.css

media-library.pcss.css

Styling for Media Library.

File

core/themes/claro/css/theme/media-library.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 media-library.pcss.css
  9. * Styling for Media Library.
  10. */
  11. /**
  12. * Negative margins compensate for modal dialog padding and compensate for
  13. * positioning that would otherwise hide the active tab indicator on the left.
  14. */
  15. .media-library-wrapper {
  16. display: flex;
  17. margin: -1rem -1.5rem -1rem -1rem; /* LTR */
  18. }
  19. [dir="rtl"] .media-library-wrapper {
  20. margin-right: -1em;
  21. margin-left: -1.5em;
  22. }
  23. .media-library-wrapper .messages-list,
  24. .media-library-wrapper .messages {
  25. margin-top: 0;
  26. margin-bottom: var(--space-l);
  27. }
  28. .media-library-menu {
  29. position: relative;
  30. display: block;
  31. width: var(--vertical-tabs-menu-width);
  32. margin: 0;
  33. padding-top: var(--vertical-tabs-menu-item-shadow-extraspace);
  34. list-style: none;
  35. color: var(--color-text);
  36. }
  37. [dir="rtl"] .media-library-menu {
  38. margin: 0;
  39. }
  40. .media-library-menu__item {
  41. overflow: hidden;
  42. 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 */
  43. padding: var(--vertical-tabs-menu-item-shadow-extraspace) 0;
  44. }
  45. [dir="rtl"] .media-library-menu__item {
  46. margin-right: var(--vertical-tabs-menu-item--left-margin);
  47. margin-left: var(--vertical-tabs-menu-item--right-margin);
  48. }
  49. .media-library-menu__item::before {
  50. 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. */
  51. display: block;
  52. width: 100%;
  53. margin-top: calc(var(--vertical-tabs-menu-separator-size) * -1);
  54. content: "";
  55. border-top: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  56. }
  57. .media-library-menu__link {
  58. position: relative;
  59. display: block;
  60. margin-top: calc(var(--vertical-tabs-border-size) * -1);
  61. padding: var(--space-s) var(--space-s) var(--space-s) calc(var(--space-l) - var(--vertical-tabs-menu-link--active-border-size)); /* LTR */
  62. -webkit-text-decoration: none;
  63. text-decoration: none;
  64. color: var(--color-text);
  65. border: var(--vertical-tabs-border-size) solid transparent;
  66. border-width: var(--vertical-tabs-border-size) 0 var(--vertical-tabs-border-size) var(--vertical-tabs-menu-link--active-border-size); /* LTR */
  67. border-radius: var(--vertical-tabs-border-radius) 0 0 var(--vertical-tabs-border-radius); /* LTR */
  68. }
  69. [dir="rtl"] .media-library-menu__link {
  70. padding-right: calc(var(--space-l) - var(--vertical-tabs-menu-link--active-border-size));
  71. padding-left: var(--space-s);
  72. border-width: var(--vertical-tabs-border-size) var(--vertical-tabs-menu-link--active-border-size) var(--vertical-tabs-border-size) 0;
  73. border-radius: 0 var(--vertical-tabs-border-radius) var(--vertical-tabs-border-radius) 0;
  74. }
  75. /* Menu link states. */
  76. .media-library-menu__link:focus {
  77. 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. */
  78. -webkit-text-decoration: none;
  79. text-decoration: none;
  80. box-shadow: none;
  81. }
  82. .media-library-menu__link:hover {
  83. -webkit-text-decoration: none;
  84. text-decoration: none;
  85. color: var(--color-absolutezero);
  86. /* These borders are necessary to replace the dividing lines while in the hover state. */
  87. border-top: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  88. border-bottom: var(--vertical-tabs-menu-separator-size) solid var(--vertical-tabs-menu-separator-color);
  89. background: var(--color-bgblue-hover);
  90. }
  91. /* This pseudo element provides the background for the hover state. */
  92. .media-library-menu__link::before {
  93. position: absolute;
  94. z-index: calc(var(--vertical-tabs-menu--z-index) - 1); /* This should be on a lower level than the menu-item separator lines. */
  95. top: calc(var(--vertical-tabs-border-size) * -1);
  96. right: 0; /* LTR */
  97. bottom: calc(var(--vertical-tabs-border-size) * -1);
  98. left: calc(var(--vertical-tabs-menu-link--active-border-size) * -1); /* LTR */
  99. content: "";
  100. pointer-events: none;
  101. background-clip: padding-box;
  102. }
  103. [dir="rtl"] .media-library-menu__link::before {
  104. right: calc(var(--vertical-tabs-menu-link--active-border-size) * -1);
  105. left: 0;
  106. }
  107. .media-library-menu__link:focus::after {
  108. position: absolute;
  109. top: 0;
  110. right: 0;
  111. bottom: 0;
  112. left: 0;
  113. margin: calc(var(--vertical-tabs-border-size) * -1) calc(var(--vertical-tabs-menu-link--active-border-size) * -1);
  114. content: "";
  115. pointer-events: none;
  116. border: var(--vertical-tabs-menu-link-focus-border-size) solid var(--color-focus);
  117. border-radius: var(--vertical-tabs-border-radius);
  118. }
  119. .media-library-menu__link.active {
  120. 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. */
  121. color: var(--color-absolutezero);
  122. border-color: var(--vertical-tabs-border-color) transparent;
  123. background-color: var(--color-white);
  124. box-shadow: var(--vertical-tabs-shadow);
  125. }
  126. .media-library-menu__link.active:hover {
  127. color: var(--color-absolutezero-hover);
  128. background-color: var(--color-bgblue-hover);
  129. }
  130. .media-library-menu__link.active::before {
  131. z-index: 1; /* The blue active-tab indication should be on a higher level than the green focus border. */
  132. border-left: var(--vertical-tabs-menu-link--active-border-size) solid var(--vertical-tabs-menu-link--active-border-color); /* LTR */
  133. border-radius: var(--base-border-radius) 0 0 var(--base-border-radius); /* LTR */
  134. }
  135. [dir="rtl"] .media-library-menu__link.active::before {
  136. border-right: var(--vertical-tabs-menu-link--active-border-size) solid var(--vertical-tabs-menu-link--active-border-color);
  137. border-left: 0;
  138. border-radius: 0 var(--base-border-radius) var(--base-border-radius) 0;
  139. }
  140. .media-library-menu__link.active:hover::before {
  141. background: none;
  142. }
  143. .media-library-content {
  144. width: 100%;
  145. padding: 1em;
  146. outline: none;
  147. }
  148. .media-library-menu + .media-library-content {
  149. z-index: var(--vertical-tabs-menu--z-index);
  150. border-left: var(--vertical-tabs-border); /* LTR */
  151. box-shadow: var(--vertical-tabs-shadow);
  152. }
  153. [dir="rtl"] .media-library-menu + .media-library-content {
  154. border-right: var(--vertical-tabs-border);
  155. border-left: 0;
  156. }
  157. /* Generic media add form styles. */
  158. .media-library-add-form--without-input .form-item {
  159. margin-right: 1rem;
  160. }
  161. /**
  162. * Remove outline from added media list.
  163. *
  164. * The added media list receives focus after adding new media, but since it is
  165. * not an interactive element, it does not need an outline.
  166. */
  167. .media-library-add-form__added-media {
  168. margin: 0;
  169. padding: 0;
  170. outline: none;
  171. }
  172. /**
  173. * This Media Library form is an exception to the extrasmall button pattern.
  174. * Additional padding is needed to accommodate the remove button icon. The
  175. * margin is adjusted for alignment within the media library dialog.
  176. */
  177. .media-library-add-form__added-media .media-library-add-form__remove-button.button--extrasmall {
  178. margin: var(--space-xs) 0; /* LTR */
  179. /* Left padding is double the background size of the button icon. */
  180. 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);
  181. }
  182. /* This is needed to override the default extrasmall button left margin. */
  183. [dir="rtl"] .media-library-add-form__added-media .media-library-add-form__remove-button.button--extrasmall {
  184. margin-left: 0;
  185. }
  186. .media-library-add-form__input-wrapper {
  187. padding: var(--space-xs) var(--space-l) var(--space-l) var(--space-l);
  188. border: var(--details-border-size) solid var(--details-border-color);
  189. border-radius: var(--base-border-radius);
  190. background-color: var(--color-white);
  191. box-shadow: var(--details-box-shadow);
  192. }
  193. /* Style the media add upload form. */
  194. .media-library-add-form--upload.media-library-add-form--without-input .form-item-upload {
  195. margin-bottom: 0;
  196. }
  197. .media-library-add-form--upload.media-library-add-form--with-input .form-managed-file__main,
  198. .media-library-add-form--upload.media-library-add-form--with-input .form-managed-file.no-upload {
  199. display: block;
  200. }
  201. /* Adjust the focus border on this element so it is not too close to buttons. */
  202. .media-library-add-form__added-media:focus {
  203. box-shadow:
  204. 0 0 0 calc(var(--focus-border-offset-size) + 2px) var(--color-white),
  205. 0 0 0 calc(var(--focus-border-size) + var(--focus-border-offset-size) + 2px) var(--color-focus);
  206. }
  207. .media-library-add-form .file-upload-help {
  208. margin: 0.5rem 0 0;
  209. }
  210. /* Style the media add oEmbed form. */
  211. .media-library-add-form--oembed .media-library-add-form__input-wrapper {
  212. display: flex;
  213. align-items: center;
  214. }
  215. @media screen and (max-width: 37.5em) {
  216. .media-library-add-form--oembed .media-library-add-form__input-wrapper {
  217. display: block;
  218. }
  219. }
  220. .media-library-add-form--oembed.media-library-add-form--without-input .form-item-url {
  221. margin-bottom: 0;
  222. }
  223. .media-library-add-form-oembed-url {
  224. width: 100%;
  225. }
  226. /* Media add form selection styles. */
  227. .media-library-add-form__selected-media {
  228. margin-top: 1em;
  229. }
  230. /* Change to padding to account for the negative margin for flex grid. */
  231. .media-library-add-form__selected-media .details-wrapper {
  232. padding: 0 0.625rem 1em 0.625rem;
  233. }
  234. .media-library-add-form__selected-media .media-library-item .field--name-thumbnail img {
  235. height: 6.25rem;
  236. }
  237. /* Generic media library view styles. */
  238. .media-library-select-all {
  239. flex-basis: 100%;
  240. width: 100%;
  241. margin: 0.625rem 0.5rem;
  242. }
  243. .media-library-select-all input {
  244. margin-right: 0.625rem;
  245. }
  246. [dir="rtl"] .media-library-select-all input {
  247. margin-left: 0.625rem;
  248. }
  249. .media-library-views-form,
  250. .media-library-selection,
  251. .media-library-add-form__selected-media .details-wrapper,
  252. .media-library-view .form--inline {
  253. display: flex;
  254. flex-wrap: wrap;
  255. }
  256. .media-library-views-form > .form-actions,
  257. .media-library-views-form > .field-actions {
  258. flex-basis: 100%;
  259. }
  260. .media-library-views-form__header {
  261. flex-basis: 100%;
  262. }
  263. .media-library-views-form__header .form-item {
  264. margin-right: 0.5rem; /* @TODO RTL? */
  265. }
  266. .media-library-views-form__rows {
  267. display: flex;
  268. flex-wrap: wrap;
  269. flex-basis: 100%;
  270. margin: 0 -0.5rem;
  271. }
  272. /**
  273. * Override the table display of the visually hidden labels.
  274. *
  275. * The width, height and overflow properties in the styles for the
  276. * .visually-hidden class do not work correctly if the element has a table
  277. * display.
  278. */
  279. .media-library-item label {
  280. display: inline-block;
  281. }
  282. /* Media library widget view styles. */
  283. .media-library-wrapper .media-library-view {
  284. position: relative;
  285. display: flex;
  286. flex-wrap: wrap;
  287. justify-content: space-between;
  288. }
  289. .media-library-wrapper .view-header {
  290. align-self: flex-end;
  291. margin: 1em 0;
  292. text-align: right; /* LTR */
  293. }
  294. [dir="rtl"] .media-library-wrapper .view-header {
  295. text-align: left;
  296. }
  297. .media-library-wrapper .media-library-view .view-filters,
  298. .media-library-wrapper .media-library-view .view-content {
  299. flex: 0 0 100%;
  300. }
  301. .media-library-wrapper .views-display-link {
  302. margin: 0;
  303. padding-left: 1.375rem; /* LTR */
  304. color: #333;
  305. font-size: 0.9375rem;
  306. line-height: 1rem;
  307. }
  308. [dir="rtl"] .media-library-wrapper .views-display-link {
  309. padding-right: 1.375rem;
  310. padding-left: 0;
  311. }
  312. .media-library-wrapper .views-display-link.is-active {
  313. font-weight: bold;
  314. }
  315. .media-library-wrapper .views-display-link-widget {
  316. margin-right: 0.9375rem;
  317. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23333333' d='M10.5 9h3a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1-1.5 1.5h-3A1.5 1.5 0 0 1 9 13.5v-3A1.5 1.5 0 0 1 10.5 9zm-8 0h3A1.5 1.5 0 0 1 7 10.5v3A1.5 1.5 0 0 1 5.5 15h-3A1.5 1.5 0 0 1 1 13.5v-3A1.5 1.5 0 0 1 2.5 9zm8-8h3A1.5 1.5 0 0 1 15 2.5v3A1.5 1.5 0 0 1 13.5 7h-3A1.5 1.5 0 0 1 9 5.5v-3A1.5 1.5 0 0 1 10.5 1zm-8 0h3A1.5 1.5 0 0 1 7 2.5v3A1.5 1.5 0 0 1 5.5 7h-3A1.5 1.5 0 0 1 1 5.5v-3A1.5 1.5 0 0 1 2.5 1z'/%3e%3c/svg%3e") left 0 no-repeat; /* LTR */
  318. }
  319. [dir="rtl"] .media-library-wrapper .views-display-link-widget {
  320. background-position: right 0;
  321. }
  322. .media-library-wrapper .views-display-link-widget_table {
  323. background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23333333' d='M7 15a1.5 1.5 0 0 1 0-3h7a1.5 1.5 0 0 1 0 3H7zm-4.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM7 9.5a1.5 1.5 0 0 1 0-3h7a1.5 1.5 0 0 1 0 3H7zm-4.5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zM7 4a1.5 1.5 0 0 1 0-3h7a1.5 1.5 0 0 1 0 3H7zM2.5 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z'/%3e%3c/svg%3e") left 0 no-repeat; /* LTR */
  324. }
  325. [dir="rtl"] .media-library-wrapper .views-display-link-widget_table {
  326. background-position: right 0;
  327. }
  328. /**
  329. * Style the media library grid items.
  330. */
  331. .media-library-item {
  332. position: relative;
  333. }
  334. /**
  335. * Ajax throbbers inside a media library item.
  336. */
  337. .media-library-item .ajax-progress.ajax-progress.ajax-progress {
  338. position: absolute;
  339. z-index: calc(var(--vertical-tabs-menu--z-index) + 1);
  340. top: 50%;
  341. left: 50%;
  342. box-sizing: border-box;
  343. width: 3rem; /* 56px */
  344. height: 3rem;
  345. margin: -1.5rem;
  346. border: var(--input-border-size) solid var(--jui-dropdown-border-color);
  347. border-radius: 3.5rem;
  348. background: var(--color-white);
  349. box-shadow: 0 0.25rem 0.625rem var(--jui-dropdown-shadow-color);
  350. }
  351. .media-library-item .ajax-progress__throbber {
  352. position: absolute;
  353. top: 50%;
  354. left: 50%;
  355. width: 1.75rem;
  356. height: 1.75rem;
  357. margin: -0.875rem;
  358. border: 3px solid var(--color-absolutezero);
  359. border-right: 3px dotted transparent;
  360. }
  361. .media-library-item .ajax-progress__message {
  362. display: none;
  363. }
  364. .media-library-item--grid {
  365. justify-content: center;
  366. box-sizing: border-box;
  367. width: 50%;
  368. padding: 0.5rem;
  369. vertical-align: top;
  370. outline: none;
  371. background: #fff;
  372. }
  373. .media-library-item--grid::before {
  374. position: absolute;
  375. top: 0.4375rem;
  376. left: 0.4375rem;
  377. width: calc(100% - 1rem);
  378. height: calc(100% - 1rem);
  379. content: "";
  380. transition:
  381. border-color 0.2s,
  382. color 0.2s,
  383. background 0.2s;
  384. pointer-events: none;
  385. border: 1px solid #dbdbdb;
  386. border-radius: 2px;
  387. box-shadow: var(--details-box-shadow);
  388. }
  389. /**
  390. * The media library grid item focus border is moved to a child element to
  391. * improve padding.
  392. */
  393. .media-library-item--grid:focus {
  394. outline: none;
  395. box-shadow: none;
  396. }
  397. .media-library-item--grid:focus .media-library-item__preview-wrapper {
  398. outline: var(--focus-outline);
  399. box-shadow: var(--focus-box-shadow);
  400. }
  401. /* Media library widget weight field styles. */
  402. .media-library-item--grid .form-item {
  403. margin: 0.75em;
  404. }
  405. /* The selected items in the add form should be shown a bit smaller. */
  406. .media-library-add-form__selected-media .media-library-item--small {
  407. width: 33.3%;
  408. }
  409. .media-library-widget-modal .ui-dialog-buttonpane {
  410. display: flex;
  411. align-items: center;
  412. }
  413. .media-library-widget-modal .ui-dialog-buttonpane .form-actions,
  414. .media-library-widget-modal .ui-dialog-buttonpane .field-actions {
  415. flex: 1;
  416. }
  417. /**
  418. * By default, the dialog is too narrow to be usable.
  419. * @see Drupal.ckeditor5.openDialog()
  420. */
  421. .ui-dialog--narrow.media-library-widget-modal {
  422. max-width: 75%;
  423. }
  424. @media screen and (min-width: 45em) {
  425. .media-library-item--grid {
  426. width: 33.3%;
  427. }
  428. /* Change the width for the modal and widget since there is less space. */
  429. .media-library-widget-modal .media-library-item--grid,
  430. .media-library-selection .media-library-item--grid {
  431. width: 50%;
  432. }
  433. /* The selected items in the add form should be shown a bit smaller. */
  434. .media-library-add-form__selected-media .media-library-item--small {
  435. width: 25%;
  436. }
  437. }
  438. @media screen and (min-width: 60em) {
  439. .media-library-item--grid {
  440. width: 25%;
  441. }
  442. /* Change the width for the modal and widget since there is less space. */
  443. .media-library-widget-modal .media-library-item--grid,
  444. .media-library-selection .media-library-item--grid {
  445. width: 33.3%;
  446. }
  447. /* The selected items in the add form should be shown a bit smaller. */
  448. .media-library-add-form__selected-media .media-library-item--small {
  449. width: 16.6%;
  450. }
  451. }
  452. @media screen and (min-width: 77em) {
  453. .media-library-item--grid {
  454. width: 16.6%;
  455. }
  456. /* Change the width for the modal and widget since there is less space. */
  457. .media-library-widget-modal .media-library-item--grid,
  458. .media-library-selection .media-library-item--grid {
  459. width: 25%;
  460. }
  461. /* The selected items in the add form should be shown a bit smaller. */
  462. .media-library-add-form__selected-media .media-library-item--small {
  463. width: 16.6%;
  464. }
  465. }
  466. .media-library-item--grid .field--name-thumbnail {
  467. overflow: hidden;
  468. text-align: center;
  469. background-color: #ebebeb;
  470. }
  471. .media-library-item--grid .field--name-thumbnail img {
  472. height: 11.25rem;
  473. object-fit: contain;
  474. object-position: center center;
  475. }
  476. .media-library-item--grid.is-hover::before,
  477. .media-library-item--grid.checked::before,
  478. .media-library-item--grid.is-focus::before {
  479. top: 0.3125rem;
  480. left: 0.3125rem;
  481. border-width: 3px;
  482. border-radius: 0.1875rem;
  483. }
  484. .media-library-item--grid.is-hover::before,
  485. .media-library-item--grid.checked.is-hover::before {
  486. border-color: var(--color-absolutezero-hover);
  487. }
  488. .media-library-item--grid.is-focus::before {
  489. border-color: var(--color-focus);
  490. }
  491. .media-library-item--grid.checked::before {
  492. border-color: var(--button--focus-border-color);
  493. }
  494. .media-library-item--grid .form-boolean--type-checkbox:checked {
  495. border-color: var(--button--focus-border-color);
  496. background-color: var(--button--focus-border-color);
  497. }
  498. .media-library-item__click-to-select-checkbox {
  499. position: absolute;
  500. z-index: 1;
  501. top: 1rem;
  502. left: 1rem; /* LTR */
  503. display: block;
  504. }
  505. [dir="rtl"] .media-library-item__click-to-select-checkbox {
  506. right: 1rem;
  507. left: auto;
  508. }
  509. .media-library-item__click-to-select-checkbox input {
  510. width: 1.25rem;
  511. height: 1.25rem;
  512. }
  513. .media-library-item__click-to-select-checkbox .form-item {
  514. margin: 0;
  515. }
  516. .media-library-item__click-to-select-trigger {
  517. overflow: hidden;
  518. height: 100%;
  519. cursor: pointer;
  520. }
  521. /* Media library item table styles. */
  522. .media-library-item--table img {
  523. max-width: 6.25rem;
  524. height: auto;
  525. }
  526. /* Media library entity view display styles. */
  527. .media-library-item__preview {
  528. padding-bottom: 2.125rem;
  529. }
  530. .field--widget-media-library-widget .media-library-item__preview {
  531. cursor: move;
  532. }
  533. .field--widget-media-library-widget .media-library-item__preview img {
  534. border-top-left-radius: 2px;
  535. border-top-right-radius: 2px;
  536. }
  537. .field--widget-media-library-widget .js-media-library-item:only-child .media-library-item__preview {
  538. cursor: inherit;
  539. }
  540. .media-library-item__status {
  541. position: absolute;
  542. top: 2.5rem;
  543. left: 0.3125rem; /* LTR */
  544. padding: 0.3125rem 0.625rem;
  545. pointer-events: none;
  546. color: #e4e4e4;
  547. background: #666;
  548. font-size: 0.75rem;
  549. font-style: italic;
  550. }
  551. [dir="rtl"] .media-library-item__status {
  552. right: 0.3125rem;
  553. left: auto;
  554. }
  555. .media-library-item__attributes {
  556. position: absolute;
  557. bottom: 0;
  558. display: block;
  559. overflow: hidden;
  560. max-width: calc(100% - 0.625rem);
  561. max-height: calc(100% - 3.125rem);
  562. padding: 0.3125rem;
  563. background: white;
  564. }
  565. .media-library-item__name {
  566. display: block;
  567. overflow: hidden;
  568. margin: calc(var(--space-xs) / 2) var(--space-xs);
  569. white-space: nowrap;
  570. text-overflow: ellipsis;
  571. font-size: 0.875rem;
  572. }
  573. .media-library-item__attributes:hover .media-library-item__name,
  574. .media-library-item--grid.is-focus .media-library-item__name,
  575. .media-library-item--grid.checked .media-library-item__name {
  576. white-space: normal;
  577. }
  578. .media-library-item__type {
  579. color: #696969;
  580. font-size: 0.75rem;
  581. }
  582. .media-library-item--disabled {
  583. pointer-events: none;
  584. opacity: 0.5;
  585. }
  586. /* Media library widget styles. */
  587. .media-library-widget {
  588. position: relative;
  589. }
  590. .media-library-widget__toggle-weight.media-library-widget__toggle-weight {
  591. position: absolute;
  592. top: var(--space-s);
  593. right: var(--space-m); /* LTR */
  594. -webkit-text-decoration: none;
  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 -0.5rem;
  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: 0.625rem;
  626. overflow: hidden;
  627. width: 1.5rem;
  628. height: 1.5rem;
  629. margin: 0.3125rem;
  630. padding: 0;
  631. transition: 0.2s border-color;
  632. color: transparent;
  633. background-size: 0.75rem;
  634. text-shadow: none;
  635. font-size: 0;
  636. }
  637. .media-library-item__edit {
  638. right: 2.5rem; /* LTR */
  639. }
  640. [dir="rtl"] .media-library-item__edit {
  641. right: auto;
  642. left: 2.5rem;
  643. }
  644. .media-library-item__remove {
  645. right: 0.625rem; /* LTR */
  646. }
  647. [dir="rtl"] .media-library-item__remove {
  648. right: auto;
  649. left: 0.625rem;
  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("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg fill='%23545560'%3e%3cpath d='M14.545 3.042l-1.586-1.585a1.003 1.003 0 00-1.414 0L10.252 2.75l3 3 1.293-1.293a1.004 1.004 0 000-1.415zM5.25 13.751l-3-3 6.998-6.998 3 3zM.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e");
  655. background-repeat: no-repeat;
  656. background-position: center;
  657. background-size: 0.75rem;
  658. }
  659. .media-library-item__edit:active {
  660. background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cg%3e%3cpath fill='%23ffffff' d='M14.545 3.042l-1.586-1.585c-.389-.389-1.025-.389-1.414 0l-1.293 1.293 3 3 1.293-1.293c.389-.389.389-1.026 0-1.415z'/%3e%3crect fill='%23ffffff' x='5.129' y='3.8' transform='matrix(-.707 -.707 .707 -.707 6.189 20.064)' width='4.243' height='9.899'/%3e%3cpath fill='%23ffffff' d='M.908 14.775c-.087.262.055.397.316.312l2.001-.667-1.65-1.646-.667 2.001z'/%3e%3c/g%3e%3c/svg%3e");
  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("data:image/svg+xml,%3csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M2.344 2.343l11.313 11.313M2.344 13.657L13.657 2.343' stroke='%2355565B' stroke-width='3'/%3e%3c/svg%3e");
  672. background-repeat: no-repeat;
  673. background-position: center;
  674. background-size: 0.75rem;
  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("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23ffffff' d='M3.51 13.925c.194.194.512.195.706.001l3.432-3.431c.194-.194.514-.194.708 0l3.432 3.431c.192.194.514.193.707-.001l1.405-1.417c.191-.195.189-.514-.002-.709l-3.397-3.4c-.192-.193-.192-.514-.002-.708l3.401-3.43c.189-.195.189-.515 0-.709l-1.407-1.418c-.195-.195-.513-.195-.707-.001l-3.43 3.431c-.195.194-.516.194-.708 0l-3.432-3.431c-.195-.195-.512-.194-.706.001l-1.407 1.417c-.194.195-.194.515 0 .71l3.403 3.429c.193.195.193.514-.001.708l-3.4 3.399c-.194.195-.195.516-.001.709l1.406 1.419z'/%3e%3c/svg%3e");
  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: 13.75rem;
  699. margin-right: 1.25rem; /* 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: 1.25rem;
  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("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%23000000' d='M3.51 13.925c.194.194.512.195.706.001l3.432-3.431c.194-.194.514-.194.708 0l3.432 3.431c.192.194.514.193.707-.001l1.405-1.417c.191-.195.189-.514-.002-.709l-3.397-3.4c-.192-.193-.192-.514-.002-.708l3.401-3.43c.189-.195.189-.515 0-.709l-1.407-1.418c-.195-.195-.513-.195-.707-.001l-3.43 3.431c-.195.194-.516.194-.708 0l-3.432-3.431c-.195-.195-.512-.194-.706.001l-1.407 1.417c-.194.195-.194.515 0 .71l3.403 3.429c.193.195.193.514-.001.708l-3.4 3.399c-.194.195-.195.516-.001.709l1.406 1.419z'/%3e%3c/svg%3e");
  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("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3e%3cpath fill='%238e929c' d='M3.51 13.925c.194.194.512.195.706.001l3.432-3.431c.194-.194.514-.194.708 0l3.432 3.431c.192.194.514.193.707-.001l1.405-1.417c.191-.195.189-.514-.002-.709l-3.397-3.4c-.192-.193-.192-.514-.002-.708l3.401-3.43c.189-.195.189-.515 0-.709l-1.407-1.418c-.195-.195-.513-.195-.707-.001l-3.43 3.431c-.195.194-.516.194-.708 0l-3.432-3.431c-.195-.195-.512-.194-.706.001l-1.407 1.417c-.194.195-.194.515 0 .71l3.403 3.429c.193.195.193.514-.001.708l-3.4 3.399c-.194.195-.195.516-.001.709l1.406 1.419z'/%3e%3c/svg%3e");
  723. }
  724. .views-live-preview .media-library-view div.views-row + div.views-row {
  725. margin-top: 0;
  726. }

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