Issue #3106600 by bnjmnm, lauriii: Decouple Classy libraries from Umami

merge-requests/2419/head
xjm 2020-01-21 16:21:31 -06:00
parent 0cc1a138e8
commit d712cec81f
57 changed files with 1472 additions and 26 deletions

View File

@ -0,0 +1,43 @@
/**
* @file
* Styles for link buttons and action links.
*/
.action-links {
margin: 1em 0;
padding: 0;
list-style: none;
}
[dir="rtl"] .action-links {
/* This is required to win over specificity of [dir="rtl"] ul */
margin-right: 0;
}
.action-links li {
display: inline-block;
margin: 0 0.3em;
}
.action-links li:first-child {
margin-left: 0; /* LTR */
}
[dir="rtl"] .action-links li:first-child {
margin-right: 0;
margin-left: 0.3em;
}
.button-action {
display: inline-block;
padding: 0.2em 0.5em 0.3em;
text-decoration: none;
line-height: 160%;
}
.button-action:before {
margin-left: -0.1em; /* LTR */
padding-right: 0.2em; /* LTR */
content: "+";
font-weight: 900;
}
[dir="rtl"] .button-action:before {
margin-right: -0.1em;
margin-left: 0;
padding-right: 0;
padding-left: 0.2em;
}

View File

@ -0,0 +1,40 @@
/**
* @file
* Styling for the Book module.
*/
.book-navigation .menu {
padding-top: 1em;
padding-bottom: 0;
}
.book-navigation .book-pager {
overflow: auto;
margin: 0;
padding: 0.5em 0;
}
.book-pager__item {
display: inline-block;
list-style-type: none;
vertical-align: top;
}
.book-pager__item--previous {
width: 45%;
text-align: left; /* LTR */
}
[dir="rtl"] .book-pager__item--previous {
float: right;
text-align: right;
}
.book-pager__item--center {
width: 8%;
text-align: center;
}
.book-pager__item--next {
float: right; /* LTR */
width: 45%;
text-align: right; /* LTR */
}
[dir="rtl"] .book-pager__item--next {
float: left;
text-align: left;
}

View File

@ -0,0 +1,29 @@
/**
* @file
* Styles for breadcrumbs.
*/
.breadcrumb {
padding-bottom: 0.5em;
}
.breadcrumb ol {
margin: 0;
padding: 0;
}
[dir="rtl"] .breadcrumb ol {
/* This is required to win over specificity of [dir="rtl"] ol */
margin-right: 0;
}
.breadcrumb li {
display: inline;
margin: 0;
padding: 0;
list-style-type: none;
}
/* IE8 does not support :not() and :last-child. */
.breadcrumb li:before {
content: " \BB ";
}
.breadcrumb li:first-child:before {
content: none;
}

View File

@ -0,0 +1,15 @@
/**
* @file
* Visual styles for buttons.
*/
.button,
.image-button {
margin-right: 1em;
margin-left: 1em;
}
.button:first-child,
.image-button:first-child {
margin-right: 0;
margin-left: 0;
}

View File

@ -0,0 +1,32 @@
/**
* @file
* Visual styles for collapsible fieldsets.
*/
.collapse-processed > summary {
padding-right: 0.5em;
padding-left: 0.5em;
}
.collapse-processed > summary:before {
float: left; /* LTR */
width: 1em;
height: 1em;
content: "";
background: url(../../../../../../../misc/menu-expanded.png) 0 100% no-repeat; /* LTR */
}
[dir="rtl"] .collapse-processed > summary:before {
float: right;
background-position: 100% 100%;
}
.collapse-processed:not([open]) > summary:before {
-ms-transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
transform: rotate(-90deg);
background-position: 25% 35%; /* LTR */
}
[dir="rtl"] .collapse-processed:not([open]) > summary:before {
-ms-transform: rotate(90deg);
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
background-position: 75% 35%;
}

View File

@ -0,0 +1,22 @@
/**
* @file
* Inline items.
*/
.container-inline label:after,
.container-inline .label:after {
content: ":";
}
.form-type-radios .container-inline label:after,
.form-type-checkboxes .container-inline label:after {
content: "";
}
.form-type-radios .container-inline .form-type-radio,
.form-type-checkboxes .container-inline .form-type-checkbox {
margin: 0 1em;
}
.container-inline .form-actions,
.container-inline.form-actions {
margin-top: 0;
margin-bottom: 0;
}

View File

@ -0,0 +1,23 @@
/**
* @file
* Collapsible details.
*
* @see collapse.js
* @see http://nicolasgallagher.com/css-background-image-hacks/
*/
details {
margin-top: 1em;
margin-bottom: 1em;
border: 1px solid #ccc;
}
details > .details-wrapper {
padding: 0.5em 1.5em;
}
/* @todo Regression: The summary of uncollapsible details are no longer
vertically aligned with the .details-wrapper in browsers without native
details support. */
summary {
padding: 0.2em 0.5em;
cursor: pointer;
}

View File

@ -0,0 +1,72 @@
/**
* @file
* Presentational styles for Drupal dialogs.
*/
.ui-dialog {
position: absolute;
z-index: 1260;
overflow: visible;
padding: 0;
color: #000;
border: solid 1px #ccc;
background: #fff;
}
@media all and (max-width: 48em) { /* 768px */
.ui-dialog {
width: 92% !important;
}
}
.ui-dialog .ui-dialog-titlebar {
border-width: 0 0 1px 0;
border-style: solid;
border-color: #ccc;
border-radius: 0;
background: #f3f4ee;
font-weight: bold;
}
.ui-dialog .ui-dialog-titlebar-close {
border: 0;
background: none;
}
.ui-dialog .ui-dialog-buttonpane {
margin-top: 0;
padding: 0.3em 1em;
border-width: 1px 0 0 0;
border-color: #ccc;
background: #f3f4ee;
}
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
margin: 0;
padding: 0;
}
.ui-dialog .ui-dialog-buttonpane .ui-button-text-only .ui-button-text {
padding: 0;
}
/* Form action buttons are moved in dialogs. Remove empty space. */
.ui-dialog .ui-dialog-content .form-actions {
margin: 0;
padding: 0;
}
.ui-dialog .ajax-progress-throbber {
position: fixed;
z-index: 1000;
top: 48.5%;
/* Can't do center:50% middle: 50%, so approximate it for a typical window size. */
left: 49%;
width: 24px;
height: 24px;
padding: 4px;
opacity: 0.9;
border-radius: 7px;
background-color: #232323;
background-image: url(../../../../../../../misc/loading-small.gif);
background-repeat: no-repeat;
background-position: center center;
}
.ui-dialog .ajax-progress-throbber .throbber,
.ui-dialog .ajax-progress-throbber .message {
display: none;
}

View File

@ -0,0 +1,46 @@
/**
* @file
* Visual styles for exposed filters.
*/
.exposed-filters .filters {
float: left; /* LTR */
margin-right: 1em; /* LTR */
}
[dir="rtl"] .exposed-filters .filters {
float: right;
margin-right: 0;
margin-left: 1em;
}
.exposed-filters .form-item {
margin: 0 0 0.1em 0;
padding: 0;
}
.exposed-filters .form-item label {
float: left; /* LTR */
width: 10em;
font-weight: normal;
}
[dir="rtl"] .exposed-filters .form-item label {
float: right;
}
.exposed-filters .form-select {
width: 14em;
}
/* Current filters */
.exposed-filters .current-filters {
margin-bottom: 1em;
}
.exposed-filters .current-filters .placeholder {
font-weight: bold;
font-style: normal;
}
.exposed-filters .additional-filters {
float: left; /* LTR */
margin-right: 1em; /* LTR */
}
[dir="rtl"] .exposed-filters .additional-filters {
float: right;
margin-right: 0;
margin-left: 1em;
}

View File

@ -0,0 +1,25 @@
/**
* @file
* Visual styles for fields.
*/
.field__label {
font-weight: bold;
}
.field--label-inline .field__label,
.field--label-inline .field__items {
float: left; /* LTR */
}
.field--label-inline .field__label,
.field--label-inline > .field__item,
.field--label-inline .field__items {
padding-right: 0.5em;
}
[dir="rtl"] .field--label-inline .field__label,
[dir="rtl"] .field--label-inline .field__items {
padding-right: 0;
padding-left: 0.5em;
}
.field--label-inline .field__label::after {
content: ":";
}

View File

@ -0,0 +1,62 @@
/**
* @file
* Default style for file module.
*/
/* File icons. */
.file {
display: inline-block;
min-height: 16px;
padding-left: 20px; /* LTR */
background-repeat: no-repeat;
background-position: left center; /* LTR */
}
[dir="rtl"] .file {
padding-right: 20px;
padding-left: inherit;
background-position: right center;
}
.file--general,
.file--application-octet-stream {
background-image: url(../../../images/classy/icons/application-octet-stream.png);
}
.file--package-x-generic {
background-image: url(../../../images/classy/icons/package-x-generic.png);
}
.file--x-office-spreadsheet {
background-image: url(../../../images/classy/icons/x-office-spreadsheet.png);
}
.file--x-office-document {
background-image: url(../../../images/classy/icons/x-office-document.png);
}
.file--x-office-presentation {
background-image: url(../../../images/classy/icons/x-office-presentation.png);
}
.file--text-x-script {
background-image: url(../../../images/classy/icons/text-x-script.png);
}
.file--text-html {
background-image: url(../../../images/classy/icons/text-html.png);
}
.file--text-plain {
background-image: url(../../../images/classy/icons/text-plain.png);
}
.file--application-pdf {
background-image: url(../../../images/classy/icons/application-pdf.png);
}
.file--application-x-executable {
background-image: url(../../../images/classy/icons/application-x-executable.png);
}
.file--audio {
background-image: url(../../../images/classy/icons/audio-x-generic.png);
}
.file--video {
background-image: url(../../../images/classy/icons/video-x-generic.png);
}
.file--text {
background-image: url(../../../images/classy/icons/text-x-generic.png);
}
.file--image {
background-image: url(../../../images/classy/icons/image-x-generic.png);
}

View File

@ -0,0 +1,104 @@
/**
* @file
* Visual styles for form components.
*/
form .field-multiple-table {
margin: 0;
}
form .field-multiple-table .field-multiple-drag {
width: 30px;
padding-right: 0; /* LTR */
}
[dir="rtl"] form .field-multiple-table .field-multiple-drag {
padding-left: 0;
}
form .field-multiple-table .field-multiple-drag .tabledrag-handle {
padding-right: 0.5em; /* LTR */
}
[dir="rtl"] form .field-multiple-table .field-multiple-drag .tabledrag-handle {
padding-right: 0;
padding-left: 0.5em;
}
form .field-add-more-submit {
margin: 0.5em 0 0;
}
/**
* Markup generated by Form API.
*/
.form-item,
.form-actions {
margin-top: 1em;
margin-bottom: 1em;
}
tr.odd .form-item,
tr.even .form-item {
margin-top: 0;
margin-bottom: 0;
}
.form-composite > .fieldset-wrapper > .description,
.form-item .description {
font-size: 0.85em;
}
label.option {
display: inline;
font-weight: normal;
}
.form-composite > legend,
.label {
display: inline;
margin: 0;
padding: 0;
font-size: inherit;
font-weight: bold;
}
.form-checkboxes .form-item,
.form-radios .form-item {
margin-top: 0.4em;
margin-bottom: 0.4em;
}
.form-type-radio .description,
.form-type-checkbox .description {
margin-left: 2.4em; /* LTR */
}
[dir="rtl"] .form-type-radio .description,
[dir="rtl"] .form-type-checkbox .description {
margin-right: 2.4em;
margin-left: 0;
}
.marker {
color: #e00;
}
.form-required:after {
display: inline-block;
width: 6px;
height: 6px;
margin: 0 0.3em;
content: "";
vertical-align: super;
/* Use a background image to prevent screen readers from announcing the text. */
background-image: url(../../../../../../../misc/icons/ee0000/required.svg);
background-repeat: no-repeat;
background-size: 6px 6px;
}
abbr.tabledrag-changed,
abbr.ajax-changed {
border-bottom: none;
}
.form-item input.error,
.form-item textarea.error,
.form-item select.error {
border: 2px solid red;
}
/* Inline error messages. */
.form-item--error-message:before {
display: inline-block;
width: 14px;
height: 14px;
content: "";
vertical-align: sub;
background: url(../../../../../../../misc/icons/e32700/error.svg) no-repeat;
background-size: contain;
}

View File

@ -0,0 +1,46 @@
/**
* @file
* Styling for the Forum module.
*/
.forum__description {
margin: 0.5em;
font-size: 0.9em;
}
.forum__icon {
float: left; /* LTR */
width: 24px;
height: 24px;
margin: 0 9px 0 0; /* LTR */
background-image: url(../../../images/classy/icons/forum-icons.png);
background-repeat: no-repeat;
}
[dir="rtl"] .forum__icon {
float: right;
margin: 0 0 0 9px;
}
.forum__title {
overflow: hidden;
}
.forum .indented {
margin-left: 20px; /* LTR */
}
[dir="rtl"] .forum .indented {
margin-right: 20px;
margin-left: 0;
}
.forum__topic-status--new {
background-position: -24px 0;
}
.forum__topic-status--hot {
background-position: -48px 0;
}
.forum__topic-status--hot-new {
background-position: -72px 0;
}
.forum__topic-status--sticky {
background-position: -96px 0;
}
.forum__topic-status--closed {
background-position: -120px 0;
}

View File

@ -0,0 +1,21 @@
/**
* @file
* Visual styles for icons.
*/
.icon-help {
padding: 1px 0 1px 20px; /* LTR */
background: url(../../../../../../../misc/help.png) 0 50% no-repeat; /* LTR */
}
[dir="rtl"] .icon-help {
padding: 1px 20px 1px 0;
background-position: 100% 50%;
}
.feed-icon {
display: block;
overflow: hidden;
width: 16px;
height: 16px;
text-indent: -9999px;
background: url(../../../../../../../misc/feed.svg) no-repeat;
}

View File

@ -0,0 +1,33 @@
/**
* @file
* Image upload widget.
*
* This CSS file is not used in this theme (Classy). It was intended to be used,
* but due to a bug, Drupal 8 shipped with it not being used. To not break
* backwards compatibility, we continue to not load it in Classy. Every
* subtheme of Classy is encouraged to use it, by attaching the
* classy/image-widget asset library in their image-widget.html.twig file.
*
* @see core/themes/seven/templates/content-edit/image-widget.html.twig.
*
* @todo In Drupal 9, let core/themes/classy/templates/content-edit/image-widget.html.twig
* attach the classy/image-widget asset library.
*/
.image-preview {
float: left; /* LTR */
padding: 0 10px 10px 0; /* LTR */
}
[dir="rtl"] .image-preview {
float: right;
padding: 0 0 10px 10px;
}
.image-widget-data {
float: left; /* LTR */
}
[dir="rtl"] .image-widget-data {
float: right;
}
.image-widget-data .text-field {
width: auto;
}

View File

@ -0,0 +1,33 @@
/**
* @file
* Visual styles for inline forms.
*/
.form--inline .form-item {
float: left; /* LTR */
margin-right: 0.5em; /* LTR */
}
[dir="rtl"] .form--inline .form-item {
float: right;
margin-right: 0;
margin-left: 0.5em;
}
/* This is required to win over specificity of [dir="rtl"] .form--inline .form-item */
[dir="rtl"] .views-filterable-options-controls .form-item {
margin-right: 2%;
}
.form--inline .form-item-separator {
margin-top: 2.3em;
margin-right: 1em; /* LTR */
margin-left: 0.5em; /* LTR */
}
[dir="rtl"] .form--inline .form-item-separator {
margin-right: 0.5em;
margin-left: 1em;
}
.form--inline .form-actions {
clear: left; /* LTR */
}
[dir="rtl"] .form--inline .form-actions {
clear: right;
}

View File

@ -0,0 +1,32 @@
/**
* @file
* Visual styles for item list.
*/
.item-list .title {
font-weight: bold;
}
.item-list ul {
margin: 0 0 0.75em 0;
padding: 0;
}
.item-list li {
margin: 0 0 0.25em 1.5em; /* LTR */
padding: 0;
}
[dir="rtl"] .item-list li {
margin: 0 1.5em 0.25em 0;
}
/**
* Comma separated lists.
*/
.item-list--comma-list {
display: inline;
}
.item-list--comma-list .item-list__comma-list,
.item-list__comma-list li,
[dir="rtl"] .item-list--comma-list .item-list__comma-list,
[dir="rtl"] .item-list__comma-list li {
margin: 0;
}

View File

@ -0,0 +1,16 @@
/**
* @file
* Style another element as a link.
*/
button.link {
margin: 0;
padding: 0;
cursor: pointer;
border: 0;
background: transparent;
font-size: 1em;
}
label button.link {
font-weight: bold;
}

View File

@ -0,0 +1,23 @@
/**
* @file
* Visual styles for links.
*/
ul.inline,
ul.links.inline {
display: inline;
padding-left: 0; /* LTR */
}
[dir="rtl"] ul.inline,
[dir="rtl"] ul.links.inline {
padding-right: 0;
padding-left: 15px;
}
ul.inline li {
display: inline;
padding: 0 0.5em;
list-style-type: none;
}
ul.links a.is-active {
color: #000;
}

View File

@ -0,0 +1,20 @@
/**
* @file
* Media Embed filter: default styling for media embed errors.
*/
/**
* The caption filter's styling overrides ours, so add a more specific selector
* to account for that.
*/
.media-embed-error,
.caption > .media-embed-error {
max-width: 200px;
padding: 100px 20px 20px;
text-align: center;
background-color: #ebebeb;
background-image: url(../../../../../../../modules/media/images/icons/no-thumbnail.png);
background-repeat: no-repeat;
background-position: center top;
background-size: 100px 100px;
}

View File

@ -0,0 +1,34 @@
/**
* @file
* Visual styles for menu.
*/
ul.menu {
margin-left: 1em; /* LTR */
padding: 0;
list-style: none outside;
text-align: left; /* LTR */
}
[dir="rtl"] ul.menu {
margin-right: 1em;
margin-left: 0;
text-align: right;
}
.menu-item--expanded {
list-style-type: circle;
list-style-image: url(../../../../../../../misc/menu-expanded.png);
}
.menu-item--collapsed {
list-style-type: disc;
list-style-image: url(../../../../../../../misc/menu-collapsed.png); /* LTR */
}
[dir="rtl"] .menu-item--collapsed {
list-style-image: url(../../../../../../../misc/menu-collapsed-rtl.png);
}
.menu-item {
margin: 0;
padding-top: 0.2em;
}
ul.menu a.is-active {
color: #000;
}

View File

@ -0,0 +1,12 @@
/**
* @file
* Markup generated by #type 'more_link'.
*/
.more-link {
display: block;
text-align: right; /* LTR */
}
[dir="rtl"] .more-link {
text-align: left;
}

View File

@ -0,0 +1,8 @@
/**
* @file
* Visual styles for nodes.
*/
.node--unpublished {
background-color: #fff4f4;
}

View File

@ -0,0 +1,16 @@
/**
* @file
* Visual styles for pager.
*/
.pager__items {
clear: both;
text-align: center;
}
.pager__item {
display: inline;
padding: 0.5em;
}
.pager__item.is-active {
font-weight: bold;
}

View File

@ -0,0 +1,69 @@
/**
* @file
* Visual styles for progress bar.
*
* @see progress.js
*/
.progress__track {
border-color: #b3b3b3;
border-radius: 10em;
background-color: #f2f1eb;
background-image: -webkit-linear-gradient(#e7e7df, #f0f0f0);
background-image: linear-gradient(#e7e7df, #f0f0f0);
box-shadow: inset 0 1px 3px hsla(0, 0%, 0%, 0.16);
}
.progress__bar {
height: 16px;
margin-top: -1px;
margin-left: -1px; /* LTR */
padding: 0 1px;
-webkit-transition: width 0.5s ease-out;
transition: width 0.5s ease-out;
-webkit-animation: animate-stripes 3s linear infinite;
-moz-animation: animate-stripes 3s linear infinite;
border: 1px #07629a solid;
border-radius: 10em;
background: #057ec9;
background-image:
-webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)),
-webkit-linear-gradient(left top, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%);
background-image:
linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15)),
linear-gradient(to right bottom, #0094f0 0%, #0094f0 25%, #007ecc 25%, #007ecc 50%, #0094f0 50%, #0094f0 75%, #0094f0 100%);
background-size: 40px 40px;
}
[dir="rtl"] .progress__bar {
margin-right: -1px;
margin-left: 0;
-webkit-animation-direction: reverse;
-moz-animation-direction: reverse;
animation-direction: reverse;
}
@media screen and (prefers-reduced-motion: reduce) {
.progress__bar {
-webkit-transition: none;
transition: none;
-webkit-animation: none;
-moz-animation: none;
}
}
/**
* Progress bar animations.
*/
@-webkit-keyframes animate-stripes {
0% { background-position: 0 0, 0 0; }
100% { background-position: 0 0, -80px 0; }
}
@-ms-keyframes animate-stripes {
0% { background-position: 0 0, 0 0; }
100% { background-position: 0 0, -80px 0; }
}
@keyframes animate-stripes {
0% { background-position: 0 0, 0 0; }
100% { background-position: 0 0, -80px 0; }
}

View File

@ -0,0 +1,8 @@
/**
* @file
* Stylesheet for results generated by the Search module.
*/
.search-results {
list-style: none;
}

View File

@ -0,0 +1,14 @@
/**
* @file
* Visual styles for table drag.
*/
tr.drag {
background-color: #fffff0;
}
tr.drag-previous {
background-color: #ffd;
}
body div.tabledrag-changed-warning {
margin-bottom: 0.5em;
}

View File

@ -0,0 +1,19 @@
/**
* @file
* Table select behavior.
*
* @see tableselect.js
*/
tr.selected td {
background: #ffc;
}
td.checkbox,
th.checkbox {
text-align: center;
}
[dir="rtl"] td.checkbox,
[dir="rtl"] th.checkbox {
/* This is required to win over specificity of [dir="rtl"] td */
text-align: center;
}

View File

@ -0,0 +1,11 @@
/**
* @file
* Table sort indicator.
*/
th.is-active img {
display: inline;
}
td.is-active {
background-color: #ddd;
}

View File

@ -0,0 +1,33 @@
/**
* @file
* Visual styles for tabs.
*/
div.tabs {
margin: 1em 0;
}
ul.tabs {
margin: 0 0 0.5em;
padding: 0;
list-style: none;
}
.tabs > li {
display: inline-block;
margin-right: 0.3em; /* LTR */
}
[dir="rtl"] .tabs > li {
margin-right: 0;
margin-left: 0.3em;
}
.tabs a {
display: block;
padding: 0.2em 1em;
text-decoration: none;
}
.tabs a.is-active {
background-color: #eee;
}
.tabs a:focus,
.tabs a:hover {
background-color: #f5f5f5;
}

View File

@ -0,0 +1,11 @@
/**
* @file
* Visual styles for a resizable textarea.
*/
.form-textarea-wrapper textarea {
display: block;
box-sizing: border-box;
width: 100%;
margin: 0;
}

View File

@ -0,0 +1,15 @@
/**
* @file
* Styles for Classy's modal windows.
*/
.ui-dialog--narrow {
max-width: 500px;
}
@media screen and (max-width: 600px) {
.ui-dialog--narrow {
min-width: 95%;
max-width: 95%;
}
}

View File

@ -0,0 +1,66 @@
/**
* @file
* Theme styling for user module.
*/
/* Visual styling for the Password strength indicator */
.password-strength__meter {
margin-top: 0.5em;
background-color: #ebeae4;
}
.password-strength__indicator {
-webkit-transition: width 0.5s ease-out;
transition: width 0.5s ease-out;
background-color: #77b259;
}
.password-strength__indicator.is-weak {
background-color: #e62600;
}
.password-strength__indicator.is-fair {
background-color: #e09600;
}
.password-strength__indicator.is-good {
background-color: #0074bd;
}
.password-strength__indicator.is-strong {
background-color: #77b259;
}
.password-confirm,
.password-field,
.password-strength,
.password-confirm-match {
width: 55%;
}
.password-suggestions {
max-width: 34.7em;
margin: 0.7em 0;
padding: 0.2em 0.5em;
border: 1px solid #b4b4b4;
}
.password-suggestions ul {
margin-bottom: 0;
}
.confirm-parent,
.password-parent {
clear: left; /* LTR */
overflow: hidden;
max-width: 33em;
margin: 0;
}
[dir="rtl"] .confirm-parent,
[dir="rtl"] .password-parent {
clear: right;
}
/* Styling for the status indicator of the passwords match test. */
.password-confirm .ok {
color: #325e1c;
font-weight: bold;
}
.password-confirm .error {
color: #a51b00;
font-weight: bold;
}

View File

@ -0,0 +1,28 @@
/**
* @file
* Contains minimal layout styling for the media library.
*/
.media-library-wrapper {
display: flex;
}
.media-library-menu {
flex-basis: 20%;
flex-shrink: 0;
}
.media-library-content {
flex-grow: 1;
}
.media-library-views-form {
display: flex;
flex-wrap: wrap;
}
.media-library-views-form .media-library-item {
justify-content: space-between;
max-width: 23%;
margin: 1%;
}

View File

@ -0,0 +1,12 @@
WHAT IS THIS DIRECTORY FOR?
--------------------------------
This directory is for image files previously inherited from the Classy theme.
WHY ARE CLASSY IMAGE FILES BEING COPIED HERE?
-------------------------------------------
Classy will be deprecated during the Drupal 9 lifecycle. To prepare for Classy's
removal, image files that would otherwise be inherited from Classy are copied
here.
Image files that differ from the Classy versions should not be placed in this
directory or any subdirectory.

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

View File

@ -0,0 +1,12 @@
WHAT IS THIS DIRECTORY FOR?
--------------------------------
This directory is for JS files previously inherited from the Classy theme.
WHY ARE CLASSY JS FILES BEING COPIED HERE?
-------------------------------------------
Classy will be deprecated during the Drupal 9 lifecycle. To prepare for Classy's
removal, JS files that would otherwise be inherited from Classy are copied
here.
JS files that differ from the Classy versions should not be placed in this
directory or any subdirectory.

View File

@ -0,0 +1,22 @@
/**
* @file
* Classy theme overrides for the Media Embed CKEditor plugin.
*/
(Drupal => {
/**
* Themes the error displayed when the media embed preview fails.
*
* @param {string} error
* The error message to display
*
* @return {string}
* A string representing a DOM fragment.
*
* @see media-embed-error.html.twig
*/
Drupal.theme.mediaEmbedPreviewError = () =>
`<div class="media-embed-error media-embed-error--preview-error">${Drupal.t(
'An error occurred while trying to preview the media. Please save your work and reload this page.',
)}</div>`;
})(Drupal);

View File

@ -0,0 +1,12 @@
/**
* DO NOT EDIT THIS FILE.
* See the following change record for more information,
* https://www.drupal.org/node/2815083
* @preserve
**/
(function (Drupal) {
Drupal.theme.mediaEmbedPreviewError = function () {
return '<div class="media-embed-error media-embed-error--preview-error">' + Drupal.t('An error occurred while trying to preview the media. Please save your work and reload this page.') + '</div>';
};
})(Drupal);

View File

@ -10,8 +10,22 @@ libraries:
- umami/webfonts-scope-one
libraries-override:
classy/messages: false
classy/base: umami/classy.base
classy/book-navigation: umami/classy.book-navigation
classy/dialog: umami/classy.dialog
classy/dropbutton: umami/classy.dropbutton
classy/file: umami/classy.file
classy/forum: umami/classy.forum
classy/image-widget: umami/classy.image-widget
classy/indented: umami/classy.indented
classy/media_embed_ckeditor_theme: umami/classy.media_embed_ckeditor_theme
classy/media_embed_error: umami/classy.media_embed_error
classy/media_library: umami/classy.media_library
classy/messages: false
classy/node: umami/classy.node
classy/progress: umami/classy.progress
classy/search-results: umami/classy.search-results
classy/user: umami/classy.user
layout_builder/twocol_section:
css:
theme:
@ -28,8 +42,22 @@ libraries-override:
libraries-extend:
tour/tour-styling:
- umami/demo-umami-tour
core/drupal.dialog:
- umami/classy.dialog
core/drupal.dropbutton:
- umami/classy.dropbutton
core/drupal.progress:
- umami/classy.progress
file/drupal.file:
- umami/classy.file
media/media_embed_ckeditor_theme:
- umami/classy.media_embed_ckeditor_theme
media_library/view:
- umami/classy.media_library
media_library/widget:
- umami/classy.media_library
user/drupal.user:
- umami/classy.user
regions:
pre_header: Pre-header
@ -46,3 +74,6 @@ regions:
bottom: Bottom
page_top: 'Page top' # Needed by Drupal Core
page_bottom: 'Page bottom' # Needed by Drupal Core
ckeditor_stylesheets:
- css/classy/components/media-embed-error.css

View File

@ -131,8 +131,113 @@ oneplusfourgrid_section:
theme:
layouts/oneplusfourgrid_section/oneplusfourgrid_section.css: {}
classy.base:
version: VERSION
css:
component:
css/classy/components/action-links.css: { weight: -10 }
css/classy/components/breadcrumb.css: { weight: -10 }
css/classy/components/button.css: { weight: -10 }
css/classy/components/collapse-processed.css: { weight: -10 }
css/classy/components/container-inline.css: { weight: -10 }
css/classy/components/details.css: { weight: -10 }
css/classy/components/exposed-filters.css: { weight: -10 }
css/classy/components/field.css: { weight: -10 }
css/classy/components/form.css: { weight: -10 }
css/classy/components/icons.css: { weight: -10 }
css/classy/components/inline-form.css: { weight: -10 }
css/classy/components/item-list.css: { weight: -10 }
css/classy/components/link.css: { weight: -10 }
css/classy/components/links.css: { weight: -10 }
css/classy/components/menu.css: { weight: -10 }
css/classy/components/more-link.css: { weight: -10 }
css/classy/components/pager.css: { weight: -10 }
css/classy/components/tabledrag.css: { weight: -10 }
css/classy/components/tableselect.css: { weight: -10 }
css/classy/components/tablesort.css: { weight: -10 }
css/classy/components/tabs.css: { weight: -10 }
css/classy/components/textarea.css: { weight: -10 }
css/classy/components/ui-dialog.css: { weight: -10 }
classy.book-navigation:
version: VERSION
css:
component:
css/classy/components/book-navigation.css: {}
classy.dialog:
version: VERSION
css:
component:
css/classy/components/dialog.css: { weight: -10 }
classy.dropbutton:
version: VERSION
css:
component:
css/classy/components/dropbutton.css: { weight: -10 }
classy.file:
version: VERSION
css:
component:
css/classy/components/file.css: { weight: -10 }
classy.forum:
version: VERSION
css:
component:
css/classy/components/forum.css: { weight: -10 }
classy.image-widget:
version: VERSION
css:
component:
css/classy/components/image-widget.css: {}
classy.indented:
version: VERSION
css:
component:
css/classy/components/indented.css: {}
classy.media_embed_ckeditor_theme:
version: VERSION
js:
js/classy/media_embed_ckeditor.theme.js: {}
classy.media_embed_error:
version: VERSION
css:
component:
css/classy/components/media-embed-error.css: {}
classy.media_library:
version: VERSION
css:
layout:
css/classy/layout/media-library.css: {}
classy.node:
version: VERSION
css:
component:
css/classy/components/node.css: { weight: -10 }
classy.progress:
version: VERSION
css:
component:
css/classy/components/progress.css: { weight: -10 }
classy.search-results:
version: VERSION
css:
component:
css/classy/components/search-results.css: {}
classy.user:
version: VERSION
css:
component:
css/classy/components/user.css: { weight: -10 }

View File

@ -0,0 +1,194 @@
<?php
namespace Drupal\KernelTests\Core\Theme;
use Drupal\KernelTests\KernelTestBase;
/**
* Confirms that theme assets copied from Classy have not been changed.
*
* If a copied Classy asset is changed, it should no longer be in a /classy
* subdirectory. The files there should be exact copies from Classy. Once it has
* changed, it is custom to the theme and should be moved to a different
* location.
*
* @group Theme
*/
class ConfirmClassyCopiesTest extends KernelTestBase {
/**
* The theme handler.
*
* @var \Drupal\Core\Extension\ThemeHandlerInterface
*/
protected $themeHandler;
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->themeHandler = $this->container->get('theme_handler');
$this->container->get('theme_installer')->install([
'umami',
'bartik',
'seven',
'claro',
]);
}
/**
* Confirms that files copied from Classy have not been altered.
*
* The /classy subdirectory in a theme's css, js and images directories is for
* unaltered copies of files from Classy. If a file in that subdirectory has
* changed, then it is custom to that theme and should be moved to a different
* directory. Additional information can be found in the README.txt of each of
* those /classy subdirectories.
*
* @param string $theme
* The theme being tested.
* @param string[] $file_hashes
* Provides an md5 hash for every asset copied from Classy.
*
* @dataProvider providerTestClassyCopies
*/
public function testClassyCopies($theme, array $file_hashes) {
$theme_path = $this->root . '/' . $this->themeHandler->getTheme($theme)->getPath();
foreach (['images', 'css', 'js'] as $sub_folder) {
$asset_path = "$theme_path/$sub_folder/classy";
// If a theme has completely customized all files of a type there is
// potentially no Classy subdirectory for that type. Tests can be skipped
// for that type.
if (!file_exists($asset_path)) {
$this->assertEmpty($file_hashes[$sub_folder]);
continue;
}
// Create iterators to collect all files in a asset directory.
$directory = new \RecursiveDirectoryIterator($asset_path);
$iterator = new \RecursiveIteratorIterator($directory);
$filecount = 0;
foreach ($iterator as $fileinfo) {
$extension = $fileinfo->getExtension();
if ($extension === $sub_folder || ($sub_folder === 'images' && $extension === 'png')) {
$filecount++;
$filename = $fileinfo->getFilename();
$hash = md5_file($fileinfo->getPathname());
$this->assertNotEmpty($file_hashes[$sub_folder][$filename], "$sub_folder file: $filename not present.");
$this->assertEquals(
$file_hashes[$sub_folder][$filename],
$hash,
"$filename is in the theme's /classy subdirectory, but the file contents no longer match the original file from Classy. This should be moved to a new directory and libraries should be updated. The file can be removed from the data provider."
);
}
}
$this->assertCount($filecount, $file_hashes[$sub_folder], "Different count for $sub_folder files in the /classy subdirectory. If a file was added to /classy, it shouldn't have been. If it was intentionally removed, it should also be removed from this test's data provider.");
}
}
/**
* Provides md5 hashes for a theme's asset files copied from Classy.
*
* @return array
* Theme name and asset file hashes.
*/
public function providerTestClassyCopies() {
return [
'umami' => [
'theme-name' => 'umami',
'file-hashes' => [
'css' => [
'media-library.css' => 'bb405519d30970c721405452dfb7b38e',
'action-links.css' => '6abb88c2b3b6884c1a64fa5ca4853d45',
'file.css' => 'b644547e5e8eb6aa23505b307dc69c32',
'dropbutton.css' => 'f8e4b0b81ff60206b27f622e85a6a0ee',
'book-navigation.css' => 'e8219368d360bd4a10763610ada85a1c',
'tableselect.css' => '8e966ac85a0cc60f470717410640c8fe',
'ui-dialog.css' => '4a3d036007ba8c8c80f4a21a369c72cc',
'user.css' => '0ec6acc22567a7c9c228f04b5a97c711',
'item-list.css' => '1d519afe6007f4b01e00f22b0ba8bf33',
'image-widget.css' => '2da54829199f64a2c390930c3b0913a3',
'field.css' => '8f4718bc926eea7e007ecfd6f410ee8d',
'tablesort.css' => 'f6ed3b44832bebffa09fc3b4b6ce27ab',
'tabs.css' => 'e58827db5c767c41b67488244c14056c',
'forum.css' => '297a40db815570c2195515767c4b3144',
'progress.css' => '5147a9b07ede9f456c6a3f3efeb520e1',
'collapse-processed.css' => '95039b6f71bbdd3c986179f075f74d2f',
'details.css' => 'fdd0606ea856072f5e6a19ab1a2e850e',
'inline-form.css' => 'cc5cbfd34511d9021a53ec693c110740',
'link.css' => '22f42d430fe458080a7739c70a2d2ea5',
'textarea.css' => '2bc390c137c5205bbcd7645d6c1c86de',
'links.css' => '21fe64349f5702cd5b89104a1d3b9cd3',
'form.css' => 'f9bd159b5ed0e1bfb2ca8d759e8c031c',
'exposed-filters.css' => '396a5f76dafec5f78f4e736f69a0874f',
'tabledrag.css' => '98d24ff864c7699dfa6da9190c5e70df',
'pager.css' => 'd10589366720f9c15b66df434baab4da',
'search-results.css' => 'ce3ca8fcd54e72f142ba29da5a3a5c9a',
'button.css' => '3abebf58e144fd4150d80facdbe5d10f',
'node.css' => '81ea0a3fef211dbc32549ac7f39ec646',
'dialog.css' => '1c1f05dde2dff1b6befacaa811c019f8',
'menu.css' => 'b9587d2e8f71fe2bbc625fc40b989112',
'icons.css' => 'c067e837e6e6d576734d443b7d40447b',
'breadcrumb.css' => '14268f8071dffd40ce7a39862b8fbc56',
'media-embed-error.css' => 'c66322e308b78af92a30401326d19d52',
'container-inline.css' => 'ae9caee6071b319ac97bf0bb3e14b542',
'more-link.css' => 'b2ebfb826e035334340193b42246b180',
],
'js' => [
'media_embed_ckeditor.theme.es6.js' => 'decf95c314bf22c642fb630179502e43',
'media_embed_ckeditor.theme.js' => '1b17d61e258c4fdaa129acecf773f04e',
],
'images' => [
'x-office-spreadsheet.png' => 'fc5d4b32f259ea6d0f960b17a0886f63',
'application-octet-stream.png' => 'fef73511632890590b5ae0a13c99e4bf',
'x-office-presentation.png' => '8ba9f51c97a2b47de2c8c117aafd7dcd',
'x-office-document.png' => '48e0c92b5dec1a027f43a5c6fe190f39',
'image-x-generic.png' => '9aca2e02c3cdbb391ca721d40fa4c0c6',
'text-x-script.png' => 'f9dc156d35298536011ea48226b21682',
'text-html.png' => '9d2d3003a786ab392d42744b2d064eec',
'video-x-generic.png' => 'a5dc89b884a8a1b666c15bb41fd88ee9',
'forum-icons.png' => 'dfa091b192819cc14523ccd653e7b5ff',
'text-x-generic.png' => '1b769df473f54d6f78f7aba79ec25e12',
'application-pdf.png' => 'bb41f8b679b9d93323b30c87fde14de9',
'application-x-executable.png' => 'fef73511632890590b5ae0a13c99e4bf',
'package-x-generic.png' => 'bb8581301a2030b48ff3c67374eed88a',
'text-plain.png' => '1b769df473f54d6f78f7aba79ec25e12',
'audio-x-generic.png' => 'f7d0e6fbcde58594bd1102db95e3ea7b',
],
],
],
// Will be populated when Classy libraries are copied to Claro.
'claro' => [
'theme-name' => 'claro',
'file-hashes' => [
'css' => [],
'js' => [],
'images' => [],
],
],
// Will be populated when Classy libraries are copied to Seven.
'seven' => [
'theme-name' => 'seven',
'file-hashes' => [
'css' => [],
'js' => [],
'images' => [],
],
],
// Will be populated when Classy libraries are copied to Bartik.
'bartik' => [
'theme-name' => 'bartik',
'file-hashes' => [
'css' => [],
'js' => [],
'images' => [],
],
],
];
}
}

View File

@ -413,22 +413,7 @@ class ThemeNotUsingClassyLibraryTest extends KernelTestBase {
],
'umami' => [
'theme-name' => 'umami',
'to-skip' => [
'base',
'book-navigation',
'dialog',
'file',
'forum',
'image-widget',
'indented',
'media_library',
'node',
'progress',
'search-results',
'user',
'media_embed_error',
'media_embed_ckeditor_theme',
],
'to-skip' => [],
],
'bartik' => [
'theme-name' => 'bartik',
@ -496,15 +481,7 @@ class ThemeNotUsingClassyLibraryTest extends KernelTestBase {
],
[
'theme-name' => 'umami',
'to-skip' => [
'user/drupal.user',
'core/drupal.dialog',
'file/drupal.file',
'core/drupal.progress',
'media/media_embed_ckeditor_theme',
'media_library/view',
'media_library/widget',
],
'to-skip' => [],
],
[
'theme-name' => 'bartik',