Mercurial > hg > isophonics-drupal-site
view core/modules/media_library/css/media_library.theme.css @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
line wrap: on
line source
/** * @file media_library.theme.css * * @todo Move into the Seven theme when this module is marked as stable. * @see https://www.drupal.org/project/drupal/issues/2980769 */ .media-library-wrapper { margin: -1em; } /** * @todo Reuse or build on vertical tabs styling for the media library menu. * https://www.drupal.org/project/drupal/issues/3023767 */ .media-library-menu { display: block; width: 600px; max-width: 20%; margin: 0; /* LTR */ padding: 0; border-bottom: 1px solid #ccc; background-color: #e6e5e1; line-height: 1; } [dir="rtl"] .media-library-menu { margin: 0; } /** * @todo Use a class instead of the li element. * https://www.drupal.org/project/drupal/issues/3029227 */ .media-library-menu li { display: block; } .media-library-menu__link { position: relative; display: block; box-sizing: border-box; padding: 15px; text-decoration: none; border-bottom: 1px solid #b3b2ad; background-color: #f2f2f0; text-shadow: 0 1px hsla(0, 0%, 100%, 0.6); } .media-library-menu__link:active, .media-library-menu__link:hover, .media-library-menu__link:focus { background: #fcfcfa; text-shadow: none; } .media-library-menu__link:focus, .media-library-menu__link:active { outline: none; } .media-library-menu__link.active { z-index: 1; margin-right: -1px; /* LTR */ color: #000; border-right: 1px solid #fcfcfa; /* LTR */ border-bottom: 1px solid #b3b2ad; background-color: #fff; box-shadow: 0 5px 5px -5px hsla(0, 0%, 0%, 0.3); } [dir="rtl"] .media-library-menu__link.active { margin-right: 0; margin-left: -1px; border-right: 0; border-left: 1px solid #fcfcfa; } .media-library-content { width: 100%; padding: 1em; border-left: 1px solid #b3b2ad; /* LTR */ outline: none; } [dir="rtl"] .media-library-content { border-right: 1px solid #b3b2ad; border-left: 0; } /* Generic media add form styles. */ .media-library-add-form--without-input .form-item { margin: 0 0 1em; } /** * Remove outline from added media container. * * The added media container receives focus after adding new media, but since * it is not an interactive element it does not need an outline. */ .media-library-add-form__added-media { outline: none; } .media-library-add-form__input-wrapper { padding: 16px; border: 1px solid #bfbfbf; border-radius: 2px; background: #fcfcfa; } /* Style the media add upload form. */ .media-library-add-form--upload.media-library-add-form--without-input .form-item-upload { margin-bottom: 0; } .media-library-add-form .file-upload-help { margin: 8px 0 0; } .media-library-add-form__description { margin: 0; } /* Style the media add oEmbed form. */ .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: flex; } @media screen and (max-width: 37.5em) { .media-library-add-form--oembed .media-library-add-form__input-wrapper { display: block; } } .media-library-add-form--oembed.media-library-add-form--without-input .form-item-url { margin-bottom: 0; } .media-library-add-form-oembed-url { width: 100%; } /** * @todo Remove .button when styles are moved to the seven theme in * https://www.drupal.org/project/drupal/issues/2980769 */ .button.media-library-add-form-oembed-submit { align-self: center; } /* Media add form selection styles. */ .media-library-add-form__selected-media { margin-top: 1em; } /* Change to padding to account for the negative margin for flex grid. */ .media-library-add-form__selected-media .details-wrapper { padding: 0 10px 1em 10px; } .media-library-add-form__selected-media .media-library-item .field--name-thumbnail img { height: 100px; } /* Generic media library view styles. */ .media-library-select-all { margin: 10px 0 10px 0; } .media-library-select-all input { margin-right: 10px; } .media-library-views-form__header .form-item { margin-right: 8px; } .media-library-view .form-actions { margin: 0.75em 0; } .media-library-view .media-library-view--form-actions { clear: left; align-self: flex-end; margin: 0.75em 0; } /** * Override the table display of the visually hidden labels. * * The width, height and overflow properties in the styles for the * .visually-hidden class do not work correctly if the element has a table * display. */ .media-library-item label { display: inline-block; } /* Media library widget view styles. */ .media-library-wrapper .media-library-view { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; } /** * @todo Remove order and reorder the views header and filters via a views * template in https://www.drupal.org/project/drupal/issues/3035994 */ .media-library-wrapper .view-header { align-self: flex-end; order: 2; margin: 8px 0; text-align: right; /* LTR */ } [dir="rtl"] .media-library-wrapper .view-header { text-align: left; } /** * @todo Remove order and reorder the views header and filters via a views * template in https://www.drupal.org/project/drupal/issues/3035994 */ .media-library-wrapper .media-library-view .view-filters { order: 1; } /** * @todo Remove order and reorder the views header and filters via a views * template in https://www.drupal.org/project/drupal/issues/3035994 */ .media-library-wrapper .media-library-view .view-content { flex: 0 0 100%; order: 3; } /** * @todo Remove order and reorder the views header and filters via a views * template in https://www.drupal.org/project/drupal/issues/3035994 */ .media-library-wrapper .media-library-view .pager { order: 4; } .media-library-wrapper .views-display-link { margin: 0; padding-left: 22px; /* LTR */ color: #333; line-height: 16px; } [dir="rtl"] .media-library-wrapper .views-display-link { padding-right: 22px; padding-left: 0; } .media-library-wrapper .views-display-link-widget { margin-right: 15px; background: url(../../../misc/icons/333333/grid.svg) left 0 no-repeat; /* LTR */ } [dir="rtl"] .media-library-wrapper .views-display-link-widget { background-position: right 0; } .media-library-wrapper .views-display-link-widget_table { background: url(../../../misc/icons/333333/table.svg) left 0 no-repeat; /* LTR */ } [dir="rtl"] .media-library-wrapper .views-display-link-widget_table { background-position: right 0; } /* Media library item grid styles. */ .media-library-views-form { margin: 0 -8px; } /** * Fix the negative margin of the grid. * * We need to fix the negative margin of the grid for table based displays and * form elements that should not be part of the grid. * * @todo: Remove when new wrapper is added to apply negative margins in * https://www.drupal.org/project/drupal/issues/3038489 */ .media-library-views-form__header, .media-library-select-all, .media-library-views-form > .views-table { margin: 0 8px; } .media-library-item--grid { justify-content: center; box-sizing: border-box; width: 50%; padding: 8px; vertical-align: top; background: #fff; } .media-library-item--grid:before { position: absolute; top: 7px; left: 7px; width: calc(100% - 16px); height: calc(100% - 16px); content: ""; transition: border-color 0.2s, color 0.2s, background 0.2s; border: 1px solid #dbdbdb; } /* The selected items in the add form should be shown a bit smaller. */ .media-library-add-form__selected-media .media-library-item--small { width: 33.3%; } @media screen and (min-width: 45em) { .media-library-item--grid { width: 33.3%; } /* Change the width for the modal and widget since there is less space. */ .media-library-widget-modal .media-library-item--grid, .media-library-selection .media-library-item--grid { width: 50%; } /* The selected items in the add form should be shown a bit smaller. */ .media-library-add-form__selected-media .media-library-item--small { width: 25%; } } @media screen and (min-width: 60em) { .media-library-item--grid { width: 25%; } /* Change the width for the modal and widget since there is less space. */ .media-library-widget-modal .media-library-item--grid, .media-library-selection .media-library-item--grid { width: 33.3%; } /* The selected items in the add form should be shown a bit smaller. */ .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } @media screen and (min-width: 77em) { .media-library-item--grid { width: 16.6%; } /* Change the width for the modal and widget since there is less space. */ .media-library-widget-modal .media-library-item--grid, .media-library-selection .media-library-item--grid { width: 25%; } /* The selected items in the add form should be shown a bit smaller. */ .media-library-add-form__selected-media .media-library-item--small { width: 16.6%; } } .media-library-item--grid .field--name-thumbnail { overflow: hidden; text-align: center; background-color: #ebebeb; } .media-library-item--grid .field--name-thumbnail img { height: 180px; object-fit: contain; object-position: center center; } .media-library-item--grid.is-hover:before, .media-library-item--grid.checked:before, .media-library-item--grid.is-focus:before { top: 5px; left: 5px; border-width: 3px; border-color: #40b6ff; border-radius: 3px; } .media-library-item--grid.checked:before { border-color: #0076c0; } .media-library-item--grid .js-click-to-select-checkbox input { width: 30px; height: 30px; } .media-library-item--grid .js-click-to-select-checkbox .form-item { margin: 0; } /* Media library item table styles. */ .media-library-item--table img { max-width: 100px; height: auto; } /* Media library entity view display styles. */ .media-library-item__preview { padding-bottom: 34px; } .media-library-item__status { padding: 5px 10px; color: #e4e4e4; background: #666; font-size: 12px; font-style: italic; } .media-library-item__attributes { position: absolute; bottom: 0; display: block; overflow: hidden; max-width: calc(100% - 10px); max-height: calc(100% - 50px); padding: 5px; background: white; } .media-library-item__name { font-size: 14px; } .media-library-item__name a { display: block; overflow: hidden; margin: 2px; white-space: nowrap; text-decoration: underline; text-overflow: ellipsis; } .media-library-item__attributes:hover .media-library-item__name a, .media-library-item__name a:focus, .media-library-item--grid.is-focus .media-library-item__name a, .media-library-item--grid.checked .media-library-item__name a { white-space: normal; } .media-library-item__name a:focus { margin: 0; border: 2px solid; } .media-library-item__type { color: #696969; font-size: 12px; } .media-library-item--disabled { opacity: 0.5; } /* Media library widget styles. */ .media-library-widget { position: relative; } /** * @todo Change to .media-library-open-button when styles are moved to the * seven theme in https://www.drupal.org/project/drupal/issues/2980769 */ .button.media-library-open-button { margin-bottom: 1em; margin-left: 0; /* LTR */ } [dir="rtl"] .button.media-library-open-button { margin-right: 0; margin-left: 1em; } .media-library-widget__toggle-weight { position: absolute; top: 5px; right: 5px; } /* Add negative margin for flex grid. */ .media-library-selection { margin: 1em -8px; } /* Media library widget weight field styles. */ .media-library-item--grid .form-item { margin: 0.75em; } /* Media library widget remove button styles. */ .media-library-item__remove, .media-library-item__remove:hover, .media-library-item__remove:focus, .media-library-item__remove.button, .media-library-item__remove.button:first-child, .media-library-item__remove.button:disabled, .media-library-item__remove.button:disabled:active, .media-library-item__remove.button:hover, .media-library-item__remove.button:focus { position: absolute; z-index: 1; top: 10px; right: 10px; width: 24px; height: 24px; margin: 5px; padding: 0; transition: 0.2s border-color; color: transparent; border: 2px solid #ccc; border-radius: 20px; background: url("../../../misc/icons/787878/ex.svg") #fff center no-repeat; background-size: 16px 16px; text-shadow: none; } .media-library-item__remove:hover, .media-library-item__remove:focus, .media-library-item__remove.button:hover, .media-library-item__remove.button:focus, .media-library-item__remove.button:disabled:active { border-color: #40b6ff; } /** * Style the added media item container. * * The added media container receives screen reader focus since it is has the * role 'listitem'. Since it is not an interactive element, it does not need * an outline. */ .media-library-add-form__media { position: relative; display: flex; padding: 1em 0; border-bottom: 1px solid #c0c0c0; outline: none; } /* Do not show the top padding for the first item. */ .media-library-add-form__media:first-child { padding-top: 0; } /** * Change the position of the remove button for the first item. * * The first item doesn't have a top padding, change the location of the remove * button as well. */ .media-library-add-form__media:first-child .media-library-add-form__remove-button[type="submit"] { top: 5px; } /* Do not show the bottom border and padding for the last item. */ .media-library-add-form__media:last-child { padding-bottom: 0; border-bottom: 0; } /* @todo Remove in https://www.drupal.org/project/drupal/issues/2987921 */ .media-library-add-form__source-field .file, .media-library-add-form__source-field .button, .media-library-add-form__source-field .image-preview, .media-library-add-form__source-field .form-type-managed-file > label, .media-library-add-form__source-field .file-size { display: none; } .media-library-add-form__preview { display: flex; align-items: center; justify-content: center; width: 220px; margin-right: 20px; /* LTR */ background: #ebebeb; } [dir="rtl"] .media-library-add-form__preview { margin-right: 0; margin-left: 20px; } /** * @todo Remove [type="submit"] when styles are moved to the seven theme in * https://www.drupal.org/project/drupal/issues/2980769 */ .media-library-add-form__remove-button[type="submit"] { position: absolute; top: 25px; right: 6px; /* LTR */ width: auto; margin: 0; padding: 2px 20px 2px 2px; /* LTR */ text-transform: lowercase; color: transparent; border: 0; border-radius: 0; background: transparent url(../../../misc/icons/787878/ex.svg) right 2px no-repeat; /* LTR */ font-weight: normal; line-height: 16px; } [dir="rtl"] .media-library-add-form__remove-button[type="submit"] { right: auto; left: 13px; padding: 2px 2px 2px 20px; background-position: left 2px; } .media-library-add-form__remove-button:focus, .media-library-add-form__remove-button.button:disabled, .media-library-add-form__remove-button.button:disabled:active, .media-library-add-form__remove-button.button:focus { color: #787878; border: 0; background: transparent url(../../../misc/icons/787878/ex.svg) right 2px no-repeat; /* LTR */ } [dir="rtl"] .media-library-add-form__remove-button:focus, [dir="rtl"] .media-library-add-form__remove-button.button:disabled, [dir="rtl"] .media-library-add-form__remove-button.button:disabled:active, [dir="rtl"] .media-library-add-form__remove-button.button:focus { background-position: left 2px; } .media-library-add-form__remove-button:hover, .media-library-add-form__remove-button.button:hover { color: #e00; border: 0; background: transparent url(../../../misc/icons/ee0000/ex.svg) right 2px no-repeat; /* LTR */ box-shadow: none; } [dir="rtl"] .media-library-add-form__remove-button:hover, [dir="rtl"] .media-library-add-form__remove-button.button:hover { background-position: left 2px; } /* @todo Remove or re-work in https://www.drupal.org/node/2985168 */ .media-library-widget .media-library-item__name a, .media-library-view--widget .media-library-item__name a, .media-library-add-form__selected-media .media-library-item__name a { text-decoration: none; color: black; }