media-library.css
Same filename in this branch
Same filename and directory in other branches
- 10 core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
- 10 core/themes/claro/css/theme/media-library.css
- 9 core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
- 9 core/themes/seven/css/theme/media-library.css
- 9 core/themes/seven/css/classy/layout/media-library.css
- 9 core/themes/claro/css/theme/media-library.css
- 9 core/themes/bartik/css/classy/layout/media-library.css
- 9 core/themes/classy/css/layout/media-library.css
- 8.9.x core/profiles/demo_umami/themes/umami/css/classy/layout/media-library.css
- 8.9.x core/themes/seven/css/theme/media-library.css
- 8.9.x core/themes/seven/css/classy/layout/media-library.css
- 8.9.x core/themes/claro/css/theme/media-library.css
- 8.9.x core/themes/bartik/css/classy/layout/media-library.css
- 8.9.x core/themes/classy/css/layout/media-library.css
/*
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/3084859
* @preserve
*/
/*
* @file
*
* Styling for Media Library.
*/
/*
* The field widget shown on the entity create page.
*/
.field--widget-media-library-widget {
.media-library-item__preview {
cursor: move;
img {
border-start-start-radius: 2px;
border-start-end-radius: 2px;
}
}
.js-media-library-item:only-child .media-library-item__preview {
cursor: inherit;
}
}
/**
* Negative margins compensate for modal dialog padding and compensate for
* positioning that would otherwise hide the active tab indicator on the start.
*/
#media-library-wrapper {
display: flex;
margin-inline: calc(-1 * var(--space-l));
.messages-list,
.messages {
margin-block: 0 var(--space-l);
}
/* "Grid" and "Table" buttons. */
.views-display-link {
position: relative;
margin: 0;
padding-inline-start: 1.375rem;
white-space: nowrap;
-webkit-text-decoration: none;
text-decoration: none;
color: var(--gin-color-text);
background-image: none;
font-size: 0.9375rem;
line-height: 1rem;
&::before {
position: absolute;
display: inline-block;
width: 1rem;
height: 1rem;
content: "";
background-color: var(--gin-color-text);
inset-block-start: 1px;
inset-inline-start: 0;
}
&.is-active {
color: var(--gin-color-primary);
font-weight: bold;
&::before {
background-color: var(--gin-color-primary);
}
}
}
.views-display-link-widget::before {
mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e %3crect x='3' y='3' width='7' height='7'%3e%3c/rect%3e %3crect x='14' y='3' width='7' height='7'%3e%3c/rect%3e %3crect x='14' y='14' width='7' height='7'%3e%3c/rect%3e %3crect x='3' y='14' width='7' height='7'%3e%3c/rect%3e %3c/g%3e%3c/svg%3e");
}
.views-display-link-widget_table::before {
mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e %3cline x1='8' y1='6' x2='21' y2='6'%3e%3c/line%3e %3cline x1='8' y1='12' x2='21' y2='12'%3e%3c/line%3e %3cline x1='8' y1='18' x2='21' y2='18'%3e%3c/line%3e %3cline x1='3' y1='6' x2='3.01' y2='6'%3e%3c/line%3e %3cline x1='3' y1='12' x2='3.01' y2='12'%3e%3c/line%3e %3cline x1='3' y1='18' x2='3.01' y2='18'%3e%3c/line%3e %3c/g%3e%3c/svg%3e");
}
}
#media-library-content {
width: 100%;
padding: 1em;
border-color: var(--gin-border-color);
border-inline-start: 0 none;
outline: none;
.media-library-menu + & {
z-index: var(--vertical-tabs-menu--z-index);
border-inline-start: var(--vertical-tabs-border);
box-shadow: var(--vertical-tabs-shadow);
}
}
/* Generic media add form styles. */
.media-library-add-form--without-input .form-item {
margin-inline-end: 1rem;
}
.media-library-add-form__input-wrapper {
.form-item--upload {
margin-block-start: 0;
margin-inline-end: 0;
}
.dropzone-enable .button {
margin: 0;
}
}
/* Form within media library that allows you to upload additional media. */
.media-library-add-form {
.messages-list:has(.messages) {
margin-block: var(--space-m);
}
.file-upload-help {
margin: 0.5rem 0 0;
}
}
/* Style the media add oEmbed form. */
.media-library-add-form--oembed {
.media-library-add-form__input-wrapper {
display: flex;
align-items: center;
@media screen and (max-width: 37.5em) {
display: block;
}
}
&.media-library-add-form--without-input .form-item-url {
margin-block-end: 0;
}
}
.media-library-add-form-oembed-url {
width: 100%;
}
.media-library-select-all {
flex-basis: 100%;
box-sizing: border-box;
width: 100%;
color: var(--gin-color-title);
border-block-end: 1px solid var(--gin-border-color-table-header);
border-radius: 0;
background: var(--gin-bg-layer);
margin-block: 0 0.625rem;
margin-inline: 0 0.5rem;
padding-block: 0 var(--space-m);
padding-inline: var(--space-m);
input {
margin-inline-end: 0.625rem;
}
}
.media-library-add-form__selected-media .details-wrapper,
.media-library-view .form--inline {
display: flex;
flex-wrap: wrap;
}
.media-library-views-form__header {
flex-basis: 100%;
.form-item {
margin-inline-end: 0.5rem;
}
}
.media-library-views-form__rows {
display: grid;
gap: 0.625rem;
grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
}
.media-library-widget-modal {
/* By default, the dialog is too narrow to be usable. @see Drupal.ckeditor5.openDialog() */
&.ui-dialog--narrow {
min-width: min(75%, 93.75rem);
}
.ui-dialog-buttonpane {
display: flex;
flex-direction: column;
align-items: center;
.form-actions,
.field-actions {
flex: 1;
}
.form-actions {
display: flex;
flex-direction: row;
justify-content: flex-end;
margin-block-start: 0;
white-space: nowrap;
.button:not(:last-child) {
margin-inline-end: var(--space-xs);
}
}
.media-library-selected-count {
flex-grow: 1;
margin-block-end: var(--space-s);
/* cspell:disable-next-line */
@media (min-width: 36.75em) {
margin-block-end: 0;
margin-inline-start: 0;
}
}
/* cspell:disable-next-line */
@media (min-width: 36.75em) {
flex-direction: row;
}
}
}
/*
* Selection widget area shown on the parent form after items are
* inserted.
*/
.media-library-selection {
display: grid;
gap: 0.625rem;
grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
}
/* Media library widget styles. */
.media-library-widget {
position: relative;
}
fieldset.media-library-widget {
.media-library-edit__link {
margin: var(--space-xs);
}
}
.media-library-widget__toggle-weight {
position: absolute;
inset-block-start: var(--space-s);
inset-inline-end: var(--space-m);
-webkit-text-decoration: none;
text-decoration: none;
.fieldset.media-library-widget & {
padding: var(--space-xs);
font-size: var(--font-size-xxs);
line-height: 1;
}
}
/* The <li> that is shown after a media item has been uploaded */
.media-library-add-form__media {
position: relative;
display: flex;
gap: 1.25rem;
padding: 0.625rem;
border-block-end: 1px solid #c0c0c0;
/* Do not show the bottom border and padding for the last item. */
&:last-child {
padding-block-end: 0;
border-block-end: 0;
}
}
/*
* Only renders after a file is uploaded via the add-form. Coverage matrix never
* completed an upload.
*/
.media-library-add-form__preview {
display: flex;
align-items: center;
justify-content: center;
width: 13.75rem;
background: var(--gin-bg-app);
}
.media-library-add-form__fields {
display: grid;
flex-grow: 1;
gap: 0.625rem;
.form-item,
.form-managed-file__meta {
margin-block: 0;
}
}
.media-library-add-form__remove-button {
position: absolute;
inset-inline-end: 0;
&.button--extrasmall {
margin: var(--space-xs) 0;
}
}
.media-library-selected-count {
margin: 0 var(--space-l);
color: var(--gin-color-text-light);
}
.media-library-widget-empty-text {
margin-inline: 0;
color: var(--gin-color-text-light);
}
.media-library-open-button {
margin-block-start: 0;
}
.media-library-view {
display: grid;
gap: var(--space-l);
.view-header {
display: flex;
flex-wrap: wrap;
gap: 0.9375rem;
padding: var(--space-m);
-webkit-text-decoration: none;
text-decoration: none;
color: var(--gin-color-text);
border-radius: var(--gin-border-m);
background: var(--gin-bg-layer3);
box-shadow: var(--gin-shadow-l1);
}
.views-exposed-form {
margin-block: 0;
}
}
File
-
core/
themes/ default_admin/ css/ components/ media-library.css
View source
- /*
- * DO NOT EDIT THIS FILE.
- * See the following change record for more information,
- * https://www.drupal.org/node/3084859
- * @preserve
- */
-
- /*
- * @file
- *
- * Styling for Media Library.
- */
-
- /*
- * The field widget shown on the entity create page.
- */
-
- .field--widget-media-library-widget {
- .media-library-item__preview {
- cursor: move;
-
- img {
- border-start-start-radius: 2px;
- border-start-end-radius: 2px;
- }
- }
-
- .js-media-library-item:only-child .media-library-item__preview {
- cursor: inherit;
- }
- }
-
- /**
- * Negative margins compensate for modal dialog padding and compensate for
- * positioning that would otherwise hide the active tab indicator on the start.
- */
-
- #media-library-wrapper {
- display: flex;
- margin-inline: calc(-1 * var(--space-l));
-
- .messages-list,
- .messages {
- margin-block: 0 var(--space-l);
- }
-
- /* "Grid" and "Table" buttons. */
- .views-display-link {
- position: relative;
- margin: 0;
- padding-inline-start: 1.375rem;
- white-space: nowrap;
- -webkit-text-decoration: none;
- text-decoration: none;
- color: var(--gin-color-text);
- background-image: none;
- font-size: 0.9375rem;
- line-height: 1rem;
-
- &::before {
- position: absolute;
- display: inline-block;
- width: 1rem;
- height: 1rem;
- content: "";
- background-color: var(--gin-color-text);
- inset-block-start: 1px;
- inset-inline-start: 0;
- }
-
- &.is-active {
- color: var(--gin-color-primary);
- font-weight: bold;
-
- &::before {
- background-color: var(--gin-color-primary);
- }
- }
- }
-
- .views-display-link-widget::before {
- mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e %3crect x='3' y='3' width='7' height='7'%3e%3c/rect%3e %3crect x='14' y='3' width='7' height='7'%3e%3c/rect%3e %3crect x='14' y='14' width='7' height='7'%3e%3c/rect%3e %3crect x='3' y='14' width='7' height='7'%3e%3c/rect%3e %3c/g%3e%3c/svg%3e");
- }
-
- .views-display-link-widget_table::before {
- mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e %3cline x1='8' y1='6' x2='21' y2='6'%3e%3c/line%3e %3cline x1='8' y1='12' x2='21' y2='12'%3e%3c/line%3e %3cline x1='8' y1='18' x2='21' y2='18'%3e%3c/line%3e %3cline x1='3' y1='6' x2='3.01' y2='6'%3e%3c/line%3e %3cline x1='3' y1='12' x2='3.01' y2='12'%3e%3c/line%3e %3cline x1='3' y1='18' x2='3.01' y2='18'%3e%3c/line%3e %3c/g%3e%3c/svg%3e");
- }
- }
-
- #media-library-content {
- width: 100%;
- padding: 1em;
- border-color: var(--gin-border-color);
- border-inline-start: 0 none;
- outline: none;
-
- .media-library-menu +
- }
-
- /* Generic media add form styles. */
-
- .media-library-add-form--without-input .form-item {
- margin-inline-end: 1rem;
- }
-
- .media-library-add-form__input-wrapper {
- .form-item--upload {
- margin-block-start: 0;
- margin-inline-end: 0;
- }
-
- .dropzone-enable .button {
- margin: 0;
- }
- }
-
- /* Form within media library that allows you to upload additional media. */
-
- .media-library-add-form {
- .messages-list:has(.messages) {
- margin-block: var(--space-m);
- }
-
- .file-upload-help {
- margin: 0.5rem 0 0;
- }
- }
-
- /* Style the media add oEmbed form. */
-
- .media-library-add-form--oembed {
- .media-library-add-form__input-wrapper {
- display: flex;
- align-items: center;
-
- @media screen and (max-width: 37.5em) {
- display: block;
- }
- }
-
- &.media-library-add-form--without-input .form-item-url {
- margin-block-end: 0;
- }
- }
-
- .media-library-add-form-oembed-url {
- width: 100%;
- }
-
- .media-library-select-all {
- flex-basis: 100%;
- box-sizing: border-box;
- width: 100%;
- color: var(--gin-color-title);
- border-block-end: 1px solid var(--gin-border-color-table-header);
- border-radius: 0;
- background: var(--gin-bg-layer);
- margin-block: 0 0.625rem;
- margin-inline: 0 0.5rem;
- padding-block: 0 var(--space-m);
- padding-inline: var(--space-m);
-
- input {
- margin-inline-end: 0.625rem;
- }
- }
-
- .media-library-add-form__selected-media .details-wrapper,
- .media-library-view .form--inline {
- display: flex;
- flex-wrap: wrap;
- }
-
- .media-library-views-form__header {
- flex-basis: 100%;
-
- .form-item {
- margin-inline-end: 0.5rem;
- }
- }
-
- .media-library-views-form__rows {
- display: grid;
- gap: 0.625rem;
- grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
- }
-
- .media-library-widget-modal {
- /* By default, the dialog is too narrow to be usable. @see Drupal.ckeditor5.openDialog() */
- &.ui-dialog--narrow {
- min-width: min(75%, 93.75rem);
- }
-
- .ui-dialog-buttonpane {
- display: flex;
- flex-direction: column;
- align-items: center;
-
- .form-actions,
- .field-actions {
- flex: 1;
- }
-
- .form-actions {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- margin-block-start: 0;
- white-space: nowrap;
-
- .button:not(:last-child) {
- margin-inline-end: var(--space-xs);
- }
- }
-
- .media-library-selected-count {
- flex-grow: 1;
- margin-block-end: var(--space-s);
-
- /* cspell:disable-next-line */
- @media (min-width: 36.75em) {
- margin-block-end: 0;
- margin-inline-start: 0;
- }
- }
-
- /* cspell:disable-next-line */
- @media (min-width: 36.75em) {
- flex-direction: row;
- }
- }
- }
-
- /*
- * Selection widget area shown on the parent form after items are
- * inserted.
- */
-
- .media-library-selection {
- display: grid;
- gap: 0.625rem;
- grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
- }
-
- /* Media library widget styles. */
-
- .media-library-widget {
- position: relative;
- }
-
- fieldset.media-library-widget {
- .media-library-edit__link {
- margin: var(--space-xs);
- }
- }
-
- .media-library-widget__toggle-weight {
- position: absolute;
- inset-block-start: var(--space-s);
- inset-inline-end: var(--space-m);
- -webkit-text-decoration: none;
- text-decoration: none;
-
- .fieldset.media-library-widget
- }
-
- /* The
- that is shown after a media item has been uploaded */
-
- .media-library-add-form__media {
- position: relative;
- display: flex;
- gap: 1.25rem;
- padding: 0.625rem;
- border-block-end: 1px solid #c0c0c0;
-
- /* Do not show the bottom border and padding for the last item. */
- &:last-child {
- padding-block-end: 0;
- border-block-end: 0;
- }
- }
-
- /*
- * Only renders after a file is uploaded via the add-form. Coverage matrix never
- * completed an upload.
- */
-
- .media-library-add-form__preview {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 13.75rem;
- background: var(--gin-bg-app);
- }
-
- .media-library-add-form__fields {
- display: grid;
- flex-grow: 1;
- gap: 0.625rem;
-
- .form-item,
- .form-managed-file__meta {
- margin-block: 0;
- }
- }
-
- .media-library-add-form__remove-button {
- position: absolute;
- inset-inline-end: 0;
-
- &.button--extrasmall {
- margin: var(--space-xs) 0;
- }
- }
-
- .media-library-selected-count {
- margin: 0 var(--space-l);
- color: var(--gin-color-text-light);
- }
-
- .media-library-widget-empty-text {
- margin-inline: 0;
- color: var(--gin-color-text-light);
- }
-
- .media-library-open-button {
- margin-block-start: 0;
- }
-
- .media-library-view {
- display: grid;
- gap: var(--space-l);
-
- .view-header {
- display: flex;
- flex-wrap: wrap;
- gap: 0.9375rem;
- padding: var(--space-m);
- -webkit-text-decoration: none;
- text-decoration: none;
- color: var(--gin-color-text);
- border-radius: var(--gin-border-m);
- background: var(--gin-bg-layer3);
- box-shadow: var(--gin-shadow-l1);
- }
-
- .views-exposed-form {
- margin-block: 0;
- }
- }
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.