diff --git a/composer.json b/composer.json index 023637cab24becf9c0080441fe89b2ed5e72af70..61002236a6e743270d086729772c73f719a21923 100644 --- a/composer.json +++ b/composer.json @@ -105,7 +105,7 @@ "drupal/config_update": "1.5", "drupal/console": "1.8", "drupal/content_access": "1.0-alpha1", - "drupal/core-recommended": "8.9.6", + "drupal/core-recommended": "8.9.7", "drupal/crop": "2.1", "drupal/ctools": "3.4", "drupal/devel": "2.0", diff --git a/composer.lock b/composer.lock index 4cb02a2e2e03a4cdfd0b8f6477c251740f9a2fe3..61c67ca9945befa5a1fc57c0330987909aa1d036 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a0a689eb38e0df625ca5642da5bcf83", + "content-hash": "0ea8a728f9988c587c660994aefb5915", "packages": [ { "name": "alchemy/zippy", @@ -3376,16 +3376,16 @@ }, { "name": "drupal/core", - "version": "8.9.6", + "version": "8.9.7", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "caf4e756d31dfb0c2e52cd0748e900efe4b57766" + "reference": "ded1be08c23f19211f9a2514a72e7defb1204efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/caf4e756d31dfb0c2e52cd0748e900efe4b57766", - "reference": "caf4e756d31dfb0c2e52cd0748e900efe4b57766", + "url": "https://api.github.com/repos/drupal/core/zipball/ded1be08c23f19211f9a2514a72e7defb1204efc", + "reference": "ded1be08c23f19211f9a2514a72e7defb1204efc", "shasum": "" }, "require": { @@ -3608,20 +3608,20 @@ "GPL-2.0-or-later" ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2020-09-16T11:22:21+00:00" + "time": "2020-10-07T19:37:20+00:00" }, { "name": "drupal/core-recommended", - "version": "8.9.6", + "version": "8.9.7", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "6c5c4739afc5549e6089ef34b59c712c8872f154" + "reference": "7895ddd703101bdec91fb6ae58381036a9768e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/6c5c4739afc5549e6089ef34b59c712c8872f154", - "reference": "6c5c4739afc5549e6089ef34b59c712c8872f154", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/7895ddd703101bdec91fb6ae58381036a9768e1f", + "reference": "7895ddd703101bdec91fb6ae58381036a9768e1f", "shasum": "" }, "require": { @@ -3633,7 +3633,7 @@ "doctrine/common": "v2.7.3", "doctrine/inflector": "v1.2.0", "doctrine/lexer": "1.0.2", - "drupal/core": "8.9.6", + "drupal/core": "8.9.7", "easyrdf/easyrdf": "0.9.1", "egulias/email-validator": "2.1.17", "guzzlehttp/guzzle": "6.5.4", @@ -3690,7 +3690,7 @@ "GPL-2.0-or-later" ], "description": "Locked core dependencies; require this project INSTEAD OF drupal/core.", - "time": "2020-09-16T11:22:21+00:00" + "time": "2020-10-07T19:37:20+00:00" }, { "name": "drupal/crop", @@ -8126,6 +8126,9 @@ "status": "covered", "message": "Covered by Drupal's security advisory policy" } + }, + "patches_applied": { + "3028400": "https://www.drupal.org/files/issues/2019-05-16/wrong-url-with-infinit-scroll-3028400-1.patch" } }, "notification-url": "https://packages.drupal.org/8/downloads", diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index cd76bcc7a94de02f723200f4ae7b9c805c09f756..f911db2d6f24ce5eb5f59cfb9ced3ee678574245 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -3485,17 +3485,17 @@ }, { "name": "drupal/core", - "version": "8.9.6", - "version_normalized": "8.9.6.0", + "version": "8.9.7", + "version_normalized": "8.9.7.0", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "caf4e756d31dfb0c2e52cd0748e900efe4b57766" + "reference": "ded1be08c23f19211f9a2514a72e7defb1204efc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/caf4e756d31dfb0c2e52cd0748e900efe4b57766", - "reference": "caf4e756d31dfb0c2e52cd0748e900efe4b57766", + "url": "https://api.github.com/repos/drupal/core/zipball/ded1be08c23f19211f9a2514a72e7defb1204efc", + "reference": "ded1be08c23f19211f9a2514a72e7defb1204efc", "shasum": "" }, "require": { @@ -3662,7 +3662,7 @@ "drupal/workflows": "self.version", "drupal/workspaces": "self.version" }, - "time": "2020-09-16T11:22:21+00:00", + "time": "2020-10-07T19:37:20+00:00", "type": "drupal-core", "extra": { "drupal-scaffold": { @@ -3723,17 +3723,17 @@ }, { "name": "drupal/core-recommended", - "version": "8.9.6", - "version_normalized": "8.9.6.0", + "version": "8.9.7", + "version_normalized": "8.9.7.0", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "6c5c4739afc5549e6089ef34b59c712c8872f154" + "reference": "7895ddd703101bdec91fb6ae58381036a9768e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/6c5c4739afc5549e6089ef34b59c712c8872f154", - "reference": "6c5c4739afc5549e6089ef34b59c712c8872f154", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/7895ddd703101bdec91fb6ae58381036a9768e1f", + "reference": "7895ddd703101bdec91fb6ae58381036a9768e1f", "shasum": "" }, "require": { @@ -3745,7 +3745,7 @@ "doctrine/common": "v2.7.3", "doctrine/inflector": "v1.2.0", "doctrine/lexer": "1.0.2", - "drupal/core": "8.9.6", + "drupal/core": "8.9.7", "easyrdf/easyrdf": "0.9.1", "egulias/email-validator": "2.1.17", "guzzlehttp/guzzle": "6.5.4", @@ -3796,7 +3796,7 @@ "conflict": { "webflo/drupal-core-strict": "*" }, - "time": "2020-09-16T11:22:21+00:00", + "time": "2020-10-07T19:37:20+00:00", "type": "metapackage", "notification-url": "https://packagist.org/downloads/", "license": [ diff --git a/web/core/drupalci.yml b/web/core/drupalci.yml index 8cc5f1d4883efc069dc6a4db95809f679f7ac573..1cec41cef3d5113061a47147b7514efdb2014e8b 100644 --- a/web/core/drupalci.yml +++ b/web/core/drupalci.yml @@ -5,8 +5,6 @@ build: assessment: validate_codebase: phplint: - csslint: - halt-on-fail: false eslint: # A test must pass eslinting standards check in order to continue processing. halt-on-fail: false diff --git a/web/core/includes/entity.inc b/web/core/includes/entity.inc index 34c048b35a94e66b006ad7215b5eb5e8fb72daff..3515b6ddbb30f538285bc26567efca7aaaa39ae6 100644 --- a/web/core/includes/entity.inc +++ b/web/core/includes/entity.inc @@ -233,7 +233,8 @@ function entity_load_unchanged($entity_type, $id) { * An array of entity IDs of the entities to delete. * * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use - * the entity storage's delete() method to delete multiple entities: + * the entity storage's \Drupal\Core\Entity\EntityStorageInterface::delete() + * method to delete multiple entities: * @code * $storage_handler = \Drupal::entityTypeManager()->getStorage($entity_type); * $entities = $storage_handler->loadMultiple($ids); diff --git a/web/core/lib/Drupal.php b/web/core/lib/Drupal.php index 2d5754aa94b1aac0efb59319541a314905cd6a86..0e9d50fc72a4cfb8f04e469a274276d6a6135c8e 100644 --- a/web/core/lib/Drupal.php +++ b/web/core/lib/Drupal.php @@ -82,7 +82,7 @@ class Drupal { /** * The current system version. */ - const VERSION = '8.9.6'; + const VERSION = '8.9.7'; /** * Core API compatibility. diff --git a/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php b/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php index ef200d19f1646ebf1086948ccd46e227744aa2a1..01c464701340b479514698f9617b4dccb31b1f5a 100644 --- a/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php +++ b/web/core/lib/Drupal/Component/Datetime/DateTimePlus.php @@ -624,11 +624,10 @@ public static function checkArray($array) { $valid_date = FALSE; $valid_time = TRUE; // Check for a valid date using checkdate(). Only values that - // meet that test are valid. - if (array_key_exists('year', $array) && array_key_exists('month', $array) && array_key_exists('day', $array)) { - if (@checkdate($array['month'], $array['day'], $array['year'])) { - $valid_date = TRUE; - } + // meet that test are valid. An empty value, either a string or a 0, is not + // a valid value. + if (!empty($array['year']) && !empty($array['month']) && !empty($array['day'])) { + $valid_date = checkdate($array['month'], $array['day'], $array['year']); } // Testing for valid time is reversed. Missing time is OK, // but incorrect values are not. diff --git a/web/core/lib/Drupal/Component/Utility/Unicode.php b/web/core/lib/Drupal/Component/Utility/Unicode.php index 64e066d79343311f54a9764128936627ad40631a..a44b50d0e81671d8e29d537fd42b5df729039e40 100644 --- a/web/core/lib/Drupal/Component/Utility/Unicode.php +++ b/web/core/lib/Drupal/Component/Utility/Unicode.php @@ -537,16 +537,16 @@ public static function mimeHeaderEncode($string, $shorten = FALSE) { */ public static function mimeHeaderDecode($header) { $callback = function ($matches) { - $data = ($matches[2] == 'B') ? base64_decode($matches[3]) : str_replace('_', ' ', quoted_printable_decode($matches[3])); + $data = (strtolower($matches[2]) == 'b') ? base64_decode($matches[3]) : str_replace('_', ' ', quoted_printable_decode($matches[3])); if (strtolower($matches[1]) != 'utf-8') { $data = static::convertToUtf8($data, $matches[1]); } return $data; }; // First step: encoded chunks followed by other encoded chunks (need to collapse whitespace) - $header = preg_replace_callback('/=\?([^?]+)\?(Q|B)\?([^?]+|\?(?!=))\?=\s+(?==\?)/', $callback, $header); + $header = preg_replace_callback('/=\?([^?]+)\?([Qq]|[Bb])\?([^?]+|\?(?!=))\?=\s+(?==\?)/', $callback, $header); // Second step: remaining chunks (do not collapse whitespace) - return preg_replace_callback('/=\?([^?]+)\?(Q|B)\?([^?]+|\?(?!=))\?=/', $callback, $header); + return preg_replace_callback('/=\?([^?]+)\?([Qq]|[Bb])\?([^?]+|\?(?!=))\?=/', $callback, $header); } /** diff --git a/web/core/lib/Drupal/Core/Database/Connection.php b/web/core/lib/Drupal/Core/Database/Connection.php index 00e6d6c9d0261e280597427aaf850fce06081d4c..70e0dea8744470d938b17af6fef0f7b7ef9f2edd 100644 --- a/web/core/lib/Drupal/Core/Database/Connection.php +++ b/web/core/lib/Drupal/Core/Database/Connection.php @@ -1501,8 +1501,8 @@ abstract public function nextId($existing_id = 0); /** * Prepares a statement for execution and returns a statement object * - * Emulated prepared statements does not communicate with the database server - * so this method does not check the statement. + * Emulated prepared statements do not communicate with the database server so + * this method does not check the statement. * * @param string $statement * This must be a valid SQL statement for the target database server. diff --git a/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php b/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php index 426dee11d1b6f26bfd1338a5133a6ce272ea3c75..465de1d66c8e08d3abbbf799110198e23679b539 100644 --- a/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php +++ b/web/core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php @@ -395,13 +395,16 @@ public function validateReferenceableEntities(array $ids) { */ public function createNewEntity($entity_type_id, $bundle, $label, $uid) { $entity_type = $this->entityTypeManager->getDefinition($entity_type_id); - $bundle_key = $entity_type->getKey('bundle'); - $label_key = $entity_type->getKey('label'); - $entity = $this->entityTypeManager->getStorage($entity_type_id)->create([ - $bundle_key => $bundle, - $label_key => $label, - ]); + $values = [ + $entity_type->getKey('label') => $label, + ]; + + if ($bundle_key = $entity_type->getKey('bundle')) { + $values[$bundle_key] = $bundle; + } + + $entity = $this->entityTypeManager->getStorage($entity_type_id)->create($values); if ($entity instanceof EntityOwnerInterface) { $entity->setOwnerId($uid); diff --git a/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php b/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php index af3c80a9b061ad95f8e5cd853ef5dc5b9b3f147b..d9f5b581f389f88ccb20c1d0e6690f820bcc42cb 100644 --- a/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php +++ b/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php @@ -117,7 +117,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen '#placeholder' => $this->getSetting('placeholder'), ]; - if ($this->getSelectionHandlerSetting('auto_create') && ($bundle = $this->getAutocreateBundle())) { + if ($bundle = $this->getAutocreateBundle()) { $element['#autocreate'] = [ 'bundle' => $bundle, 'uid' => ($entity instanceof EntityOwnerInterface) ? $entity->getOwnerId() : \Drupal::currentUser()->id(), @@ -154,16 +154,23 @@ public function massageFormValues(array $values, array $form, FormStateInterface * Returns the name of the bundle which will be used for autocreated entities. * * @return string - * The bundle name. + * The bundle name. If autocreate is not active, NULL will be returned. */ protected function getAutocreateBundle() { $bundle = NULL; - if ($this->getSelectionHandlerSetting('auto_create') && $target_bundles = $this->getSelectionHandlerSetting('target_bundles')) { + if ($this->getSelectionHandlerSetting('auto_create')) { + $target_bundles = $this->getSelectionHandlerSetting('target_bundles'); + // If there's no target bundle at all, use the target_type. It's the + // default for bundleless entity types. + if (empty($target_bundles)) { + $bundle = $this->getFieldSetting('target_type'); + } // If there's only one target bundle, use it. - if (count($target_bundles) == 1) { + elseif (count($target_bundles) == 1) { $bundle = reset($target_bundles); } - // Otherwise use the target bundle stored in selection handler settings. + // If there's more than one target bundle, use the autocreate bundle + // stored in selection handler settings. elseif (!$bundle = $this->getSelectionHandlerSetting('auto_create_bundle')) { // If no bundle has been set as auto create target means that there is // an inconsistency in entity reference field settings. diff --git a/web/core/lib/Drupal/Core/Form/FormBuilder.php b/web/core/lib/Drupal/Core/Form/FormBuilder.php index 444753465874429456de4e051b4d31a41ef75b11..1a422d8411a64fe5ab790843e190e48089c92409 100644 --- a/web/core/lib/Drupal/Core/Form/FormBuilder.php +++ b/web/core/lib/Drupal/Core/Form/FormBuilder.php @@ -861,7 +861,7 @@ protected function buildFormAction() { // https://www.drupal.org/node/2504709. $parsed = UrlHelper::parse($request_uri); unset($parsed['query'][static::AJAX_FORM_REQUEST], $parsed['query'][MainContentViewSubscriber::WRAPPER_FORMAT]); - $action = $parsed['path'] . ($parsed['query'] ? ('?' . UrlHelper::buildQuery($parsed['query'])) : ''); + $action = $parsed['path'] . ($parsed['query'] ? ('?' . UrlHelper::buildQuery($parsed['query'])) : ''); return UrlHelper::filterBadProtocol($action); } diff --git a/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php b/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php index 0d8e8e8304c145c5aa00bb5a1651833febe2120a..6f6e161e669d048c5f79ed9ef67eb355dce82622 100644 --- a/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php +++ b/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php @@ -60,8 +60,8 @@ private function baseFileContainsPharExtension($path) { return FALSE; } // If the stream wrapper is registered by invoking a phar file that does - // not not have .phar extension then this should be allowed. For - // example, some CLI tools recommend removing the extension. + // not have .phar extension then this should be allowed. For example, some + // CLI tools recommend removing the extension. $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); // Find the last entry in the backtrace containing a 'file' key as // sometimes the last caller is executed outside the scope of a file. For diff --git a/web/core/modules/book/src/Form/BookSettingsForm.php b/web/core/modules/book/src/Form/BookSettingsForm.php index 3189ef519e2fe071bab997c4a01e48311e373bea..19edbad09a0d92476af57a43af3718db69668ee4 100644 --- a/web/core/modules/book/src/Form/BookSettingsForm.php +++ b/web/core/modules/book/src/Form/BookSettingsForm.php @@ -47,7 +47,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#options' => $types, '#required' => TRUE, ]; - $form['array_filter'] = ['#type' => 'value', '#value' => TRUE]; return parent::buildForm($form, $form_state); } @@ -56,7 +55,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { * {@inheritdoc} */ public function validateForm(array &$form, FormStateInterface $form_state) { - $child_type = $form_state->getValue('book_child_type'); + $child_type = array_filter($form_state->getValue('book_child_type')); if ($form_state->isValueEmpty(['book_allowed_types', $child_type])) { $form_state->setErrorByName('book_child_type', $this->t('The content type for the %add-child link must be one of those selected as an allowed book outline type.', ['%add-child' => $this->t('Add child page')])); } @@ -76,7 +75,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('book.settings') // Remove unchecked types. ->set('allowed_types', $allowed_types) - ->set('child_type', $form_state->getValue('book_child_type')) + ->set('child_type', array_filter($form_state->getValue('book_child_type'))) ->save(); parent::submitForm($form, $form_state); diff --git a/web/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js b/web/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js index f90a77088d274bf6619eb8ebc04359f70ea8bfcd..e415e5a661e9b0aef684f9ac680ebe55df12c550 100644 --- a/web/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js +++ b/web/core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.es6.js @@ -215,7 +215,9 @@ 'figcaption', ); - const captionFilter = new CKEDITOR.filter(widgetDefinition.editables.caption.allowedContent); + const captionFilter = new CKEDITOR.filter( + widgetDefinition.editables.caption.allowedContent, + ); captionFilter.applyTo(caption); // Use Drupal's data-placeholder attribute to insert a CSS-based, diff --git a/web/core/modules/ckeditor/src/CKEditorPluginManager.php b/web/core/modules/ckeditor/src/CKEditorPluginManager.php index 47fa80b06cbdd07ca996d63f3f3e52ebe7d84370..e3eda0d2b1b6baefaa2f2285673fd0946d52c639 100644 --- a/web/core/modules/ckeditor/src/CKEditorPluginManager.php +++ b/web/core/modules/ckeditor/src/CKEditorPluginManager.php @@ -122,7 +122,7 @@ public static function getEnabledButtons(Editor $editor) { $toolbar_rows = []; $settings = $editor->getSettings(); foreach ($settings['toolbar']['rows'] as $row_number => $row) { - $toolbar_rows[] = array_reduce($settings['toolbar']['rows'][$row_number], function (&$result, $button_group) { + $toolbar_rows[] = array_reduce($settings['toolbar']['rows'][$row_number], function ($result, $button_group) { return array_merge($result, $button_group['items']); }, []); } diff --git a/web/core/modules/comment/comment.module b/web/core/modules/comment/comment.module index a7ba9da4a79986723140dc183a790688992df620..ed50876a3225ea58f44c5857c4f6ce9425d1ed5e 100644 --- a/web/core/modules/comment/comment.module +++ b/web/core/modules/comment/comment.module @@ -694,9 +694,8 @@ function template_preprocess_comment(&$variables) { $variables['submitted'] = t('Submitted by @username on @datetime', ['@username' => $variables['author'], '@datetime' => $variables['created']]); - if ($comment->hasParentComment()) { + if ($comment_parent = $comment->getParentComment()) { // Fetch and store the parent comment information for use in templates. - $comment_parent = $comment->getParentComment(); $account_parent = $comment_parent->getOwner(); $variables['parent_comment'] = $comment_parent; $username = [ diff --git a/web/core/modules/comment/src/CommentLazyBuilders.php b/web/core/modules/comment/src/CommentLazyBuilders.php index 455bb689ea24746ba344dae288278ed0b8aa7c66..11cb097189d4522aa85322ee56bc3511ab256f68 100644 --- a/web/core/modules/comment/src/CommentLazyBuilders.php +++ b/web/core/modules/comment/src/CommentLazyBuilders.php @@ -144,9 +144,9 @@ public function renderLinks($comment_entity_id, $view_mode, $langcode, $is_in_pr if (!$is_in_preview) { /** @var \Drupal\comment\CommentInterface $entity */ $entity = $this->entityTypeManager->getStorage('comment')->load($comment_entity_id); - $commented_entity = $entity->getCommentedEntity(); - - $links['comment'] = $this->buildLinks($entity, $commented_entity); + if ($commented_entity = $entity->getCommentedEntity()) { + $links['comment'] = $this->buildLinks($entity, $commented_entity); + } // Allow other modules to alter the comment links. $hook_context = [ diff --git a/web/core/modules/comment/src/CommentViewBuilder.php b/web/core/modules/comment/src/CommentViewBuilder.php index b3fd17e59c3060749e6e4f70baeca955ff38787a..e2da95b850abc585e40717fc7565f85306e9fd5c 100644 --- a/web/core/modules/comment/src/CommentViewBuilder.php +++ b/web/core/modules/comment/src/CommentViewBuilder.php @@ -80,9 +80,11 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode) { /** @var \Drupal\comment\CommentInterface $entity */ // Store a threading field setting to use later in self::buildComponents(). - $build['#comment_threaded'] = $entity->getCommentedEntity() - ->getFieldDefinition($entity->getFieldName()) - ->getSetting('default_mode') === CommentManagerInterface::COMMENT_MODE_THREADED; + $commented_entity = $entity->getCommentedEntity(); + $build['#comment_threaded'] = + is_null($commented_entity) + || $commented_entity->getFieldDefinition($entity->getFieldName()) + ->getSetting('default_mode') === CommentManagerInterface::COMMENT_MODE_THREADED; // If threading is enabled, don't render cache individual comments, but do // keep the cacheability metadata, so it can bubble up. if ($build['#comment_threaded']) { @@ -140,10 +142,12 @@ public function buildComponents(array &$build, array $entities, array $displays, // Commented entities already loaded after self::getBuildDefaults(). $commented_entity = $entity->getCommentedEntity(); + // Set defaults if the commented_entity does not exist. + $bundle = $commented_entity ? $commented_entity->bundle() : ''; + $is_node = $commented_entity ? $commented_entity->getEntityTypeId() === 'node' : NULL; $build[$id]['#entity'] = $entity; - $build[$id]['#theme'] = 'comment__' . $entity->getFieldName() . '__' . $commented_entity->bundle(); - + $build[$id]['#theme'] = 'comment__' . $entity->getFieldName() . '__' . $bundle; $display = $displays[$entity->bundle()]; if ($display->getComponent('links')) { $build[$id]['links'] = [ @@ -164,7 +168,7 @@ public function buildComponents(array &$build, array $entities, array $displays, $build[$id]['#attached'] = []; } $build[$id]['#attached']['library'][] = 'comment/drupal.comment-by-viewer'; - if ($attach_history && $commented_entity->getEntityTypeId() === 'node') { + if ($attach_history && $is_node) { $build[$id]['#attached']['library'][] = 'comment/drupal.comment-new-indicator'; // Embed the metadata for the comment "new" indicators on this node. diff --git a/web/core/modules/comment/src/Entity/Comment.php b/web/core/modules/comment/src/Entity/Comment.php index 5618cb0dde5e274c9bda05961767b143cbbfe277..13455fd4c4964acdf536345ad737d8c143f5b700 100644 --- a/web/core/modules/comment/src/Entity/Comment.php +++ b/web/core/modules/comment/src/Entity/Comment.php @@ -404,7 +404,8 @@ public function setSubject($subject) { * {@inheritdoc} */ public function getAuthorName() { - if ($this->get('uid')->target_id) { + // If their is a valid user id and the user entity exists return the label. + if ($this->get('uid')->target_id && $this->get('uid')->entity) { return $this->get('uid')->entity->label(); } return $this->get('name')->value ?: \Drupal::config('user.settings')->get('anonymous'); diff --git a/web/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php b/web/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php new file mode 100644 index 0000000000000000000000000000000000000000..78b7ea6fe296277da4962db1a4518f3305919f30 --- /dev/null +++ b/web/core/modules/comment/tests/src/Kernel/CommentOrphanTest.php @@ -0,0 +1,134 @@ +<?php + +namespace Drupal\Tests\comment\Kernel; + +use Drupal\Core\Datetime\Entity\DateFormat; +use Drupal\KernelTests\Core\Entity\EntityKernelTestBase; +use Drupal\Tests\EntityViewTrait; +use Drupal\field\Entity\FieldStorageConfig; + +/** + * Tests loading and rendering orphan comments. + * + * @group comment + */ +class CommentOrphanTest extends EntityKernelTestBase { + + use EntityViewTrait; + + /** + * {@inheritdoc} + */ + public static $modules = ['comment', 'node']; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->installEntitySchema('date_format'); + $this->installEntitySchema('comment'); + $this->installSchema('comment', ['comment_entity_statistics']); + } + + /** + * Test loading/deleting/rendering orphaned comments. + * + * @dataProvider providerTestOrphan + */ + public function testOrphan($property) { + + DateFormat::create([ + 'id' => 'fallback', + 'label' => 'Fallback', + 'pattern' => 'Y-m-d', + ])->save(); + + $comment_storage = $this->entityTypeManager->getStorage('comment'); + $node_storage = $this->entityTypeManager->getStorage('node'); + + // Create a page node type. + $this->entityTypeManager->getStorage('node_type')->create([ + 'type' => 'page', + 'name' => 'page', + ])->save(); + + $node = $node_storage->create([ + 'type' => 'page', + 'title' => 'test', + ]); + $node->save(); + + // Create comment field. + $this->entityTypeManager->getStorage('field_storage_config')->create([ + 'type' => 'text_long', + 'entity_type' => 'node', + 'field_name' => 'comment', + ])->save(); + + // Add comment field to page content. + $this->entityTypeManager->getStorage('field_config')->create([ + 'field_storage' => FieldStorageConfig::loadByName('node', 'comment'), + 'entity_type' => 'node', + 'bundle' => 'page', + 'label' => 'Comment', + ])->save(); + + // Make two comments + $comment1 = $comment_storage->create([ + 'field_name' => 'comment', + 'comment_body' => 'test', + 'entity_id' => $node->id(), + 'entity_type' => 'node', + 'comment_type' => 'default', + ])->save(); + + $comment_storage->create([ + 'field_name' => 'comment', + 'comment_body' => 'test', + 'entity_id' => $node->id(), + 'entity_type' => 'node', + 'comment_type' => 'default', + 'pid' => $comment1, + ])->save(); + + // Render the comments. + $renderer = \Drupal::service('renderer'); + $comments = $comment_storage->loadMultiple(); + foreach ($comments as $comment) { + $built = $this->buildEntityView($comment, 'full', NULL); + $renderer->renderPlain($built); + } + + // Make comment 2 an orphan by setting the property to an invalid value. + \Drupal::database()->update('comment_field_data') + ->fields([$property => 10]) + ->condition('cid', 2) + ->execute(); + $comment_storage->resetCache(); + $node_storage->resetCache(); + + // Render the comments with an orphan comment. + $comments = $comment_storage->loadMultiple(); + foreach ($comments as $comment) { + $built = $this->buildEntityView($comment, 'full', NULL); + $renderer->renderPlain($built); + } + + $node = $node_storage->load($node->id()); + $built = $this->buildEntityView($node, 'full', NULL); + $renderer->renderPlain($built); + } + + /** + * Provides test data for testOrphan. + */ + public function providerTestOrphan() { + return [ + ['entity_id'], + ['uid'], + ['pid'], + ]; + } + +} diff --git a/web/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php b/web/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php index 05bb2ad0d626f7946b327b2065462d7f3ee7483c..8432c2b26256a9606eb4e0977fe19702b06c974e 100644 --- a/web/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php +++ b/web/core/modules/field/src/Plugin/migrate/process/d6/FieldOptionTranslation.php @@ -40,7 +40,7 @@ public function transform($value, MigrateExecutableInterface $migrate_executable $i = 0; foreach ($list as $allowed_value) { // Get the key for this allowed value which may be a key|label pair - // or or just key. + // or just key. $value = explode("|", $allowed_value); if (isset($value[0]) && ($value[0] == $option)) { $allowed_values = ['label' => $row->getSourceProperty('translation')]; diff --git a/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php index 214704289729bb8ede067bf4b6e5e0950217281e..8d590a8c6a1c163574a62e935ab1876581c6167a 100644 --- a/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php +++ b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAutoCreateTest.php @@ -19,7 +19,7 @@ class EntityReferenceAutoCreateTest extends BrowserTestBase { use EntityReferenceTestTrait; - public static $modules = ['node', 'taxonomy']; + public static $modules = ['node', 'taxonomy', 'entity_test']; /** * {@inheritdoc} @@ -237,4 +237,51 @@ public function testMultipleTargetBundles() { // $this->assertErrorLogged($error_message); } + /** + * Tests autocreation for an entity that has no bundles. + */ + public function testNoBundles() { + $account = $this->drupalCreateUser([ + 'access content', + "create $this->referencingType content", + 'administer entity_test content', + ]); + $this->drupalLogin($account); + + $field_name = mb_strtolower($this->randomMachineName()); + $handler_settings = [ + 'auto_create' => TRUE, + ]; + $this->createEntityReferenceField('node', $this->referencingType, $field_name, $this->randomString(), 'entity_test_no_bundle_with_label', 'default', $handler_settings); + \Drupal::service('entity_display.repository') + ->getFormDisplay('node', $this->referencingType) + ->setComponent($field_name, ['type' => 'entity_reference_autocomplete']) + ->save(); + + $node_title = $this->randomMachineName(); + $name = $this->randomMachineName(); + $edit = [ + $field_name . '[0][target_id]' => $name, + 'title[0][value]' => $node_title, + ]; + + $this->drupalPostForm('node/add/' . $this->referencingType, $edit, 'Save'); + + // Assert referenced entity was created. + $result = \Drupal::entityQuery('entity_test_no_bundle_with_label') + ->condition('name', $name) + ->execute(); + $this->assertNotEmpty($result, 'Referenced entity was created.'); + $referenced_id = key($result); + + // Assert the referenced entity is associated with referencing node. + $result = \Drupal::entityQuery('node') + ->condition('type', $this->referencingType) + ->execute(); + $this->assertCount(1, $result); + $referencing_nid = key($result); + $referencing_node = Node::load($referencing_nid); + $this->assertEqual($referenced_id, $referencing_node->$field_name->target_id, 'Newly created node is referenced from the referencing entity.'); + } + } diff --git a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php index 387a63e3cd42e40814c34b178e2fe56b4f5e29f6..4806611b74b74cee81de8c1e7a585d9ecced6dd3 100644 --- a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php +++ b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldFormatterSettingsTest.php @@ -128,6 +128,8 @@ public function testMigration() { $this->assertEntity('node.blog.teaser'); $this->assertComponent('node.blog.teaser', 'body', 'text_summary_or_trimmed', 'hidden', 0); + $this->assertComponent('node.blog.default', 'field_termplain', 'entity_reference_label', 'above', 13); + $this->assertComponent('node.blog.default', 'field_termrss', 'entity_reference_label', 'above', 14); $this->assertEntity('node.book.default'); $this->assertComponent('node.book.default', 'body', 'text_default', 'hidden', 0); diff --git a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php index 561e16246023a181f8b9075f73b606491a2d10f4..fef7afb6c52169a8c13442566056acab931605bf 100644 --- a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php +++ b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php @@ -167,12 +167,8 @@ public function testFieldInstances() { $this->assertEntity('node.article.field_vocab_fixed', 'vocab_fixed', 'entity_reference', FALSE, TRUE); $this->assertEntity('node.article.field_vocab_localize', 'vocab_localize', 'entity_reference', FALSE, FALSE); $this->assertEntity('node.article.field_vocab_translate', 'vocab_translate', 'entity_reference', FALSE, TRUE); - } - /** - * Tests the migration of text field instances with different text processing. - */ - public function testTextFieldInstances() { + // Test migration of text field instances with different text processing. // All text and text_long field instances using a field base that has only // plain text instances should be migrated to string and string_long fields. // All text_with_summary field instances using a field base that has only diff --git a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php index 2fa3af38eff2454a3aee5f09749413d5daddc188..a346a447b75eb654a490d229d6f08b8402bc9fd5 100644 --- a/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php +++ b/web/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php @@ -142,12 +142,8 @@ public function testFields() { // have a datetime_type setting. $field = FieldStorageConfig::load('node.field_date_with_end_time'); $this->assertNull($field->getSetting('datetime_type')); - } - /** - * Tests the migration of text fields with different text processing. - */ - public function testTextFields() { + // Test the migration of text fields with different text processing. // All text and text_long field bases that have only plain text instances // should be migrated to string and string_long fields. // All text_with_summary field bases that have only plain text instances diff --git a/web/core/modules/file/file.module b/web/core/modules/file/file.module index c0abe888b433a54986d3b00de96a0cc812938460..16494a4301d557fde0104c0b576d26b395685375 100644 --- a/web/core/modules/file/file.module +++ b/web/core/modules/file/file.module @@ -961,18 +961,19 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL */ function _file_save_upload_single(\SplFileInfo $file_info, $form_field_name, $validators = [], $destination = FALSE, $replace = FileSystemInterface::EXISTS_REPLACE) { $user = \Drupal::currentUser(); + $original_file_name = trim($file_info->getClientOriginalName(), '.'); // Check for file upload errors and return FALSE for this file if a lower // level system error occurred. For a complete list of errors: // See http://php.net/manual/features.file-upload.errors.php. switch ($file_info->getError()) { case UPLOAD_ERR_INI_SIZE: case UPLOAD_ERR_FORM_SIZE: - \Drupal::messenger()->addError(t('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $file_info->getFilename(), '%maxsize' => format_size(Environment::getUploadMaxSize())])); + \Drupal::messenger()->addError(t('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $original_file_name, '%maxsize' => format_size(Environment::getUploadMaxSize())])); return FALSE; case UPLOAD_ERR_PARTIAL: case UPLOAD_ERR_NO_FILE: - \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', ['%file' => $file_info->getFilename()])); + \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', ['%file' => $original_file_name])); return FALSE; case UPLOAD_ERR_OK: @@ -984,7 +985,7 @@ function _file_save_upload_single(\SplFileInfo $file_info, $form_field_name, $va default: // Unknown error - \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $file_info->getFilename()])); + \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $original_file_name])); return FALSE; } @@ -992,7 +993,7 @@ function _file_save_upload_single(\SplFileInfo $file_info, $form_field_name, $va $values = [ 'uid' => $user->id(), 'status' => 0, - 'filename' => trim($file_info->getClientOriginalName(), '.'), + 'filename' => $original_file_name, 'uri' => $file_info->getRealPath(), 'filesize' => $file_info->getSize(), ]; diff --git a/web/core/modules/file/tests/src/Functional/FilePrivateTest.php b/web/core/modules/file/tests/src/Functional/FilePrivateTest.php index 93c7523de1f5990d6d5b9c8a44da567ba04f1583..462b7570cb62d7a2d9f9b3ae0572400635587e77 100644 --- a/web/core/modules/file/tests/src/Functional/FilePrivateTest.php +++ b/web/core/modules/file/tests/src/Functional/FilePrivateTest.php @@ -2,8 +2,6 @@ namespace Drupal\Tests\file\Functional; -use Drupal\Core\Entity\Plugin\Validation\Constraint\ReferenceAccessConstraint; -use Drupal\Component\Render\FormattableMarkup; use Drupal\file\Entity\File; use Drupal\node\Entity\NodeType; use Drupal\user\RoleInterface; diff --git a/web/core/modules/file/tests/src/Kernel/FileModuleTest.php b/web/core/modules/file/tests/src/Kernel/FileModuleTest.php index a1cfa2f51af4e6556a304e3279a3902bfc06ea52..a3082bb60ac259b20919b32678ca569ff914e87a 100644 --- a/web/core/modules/file/tests/src/Kernel/FileModuleTest.php +++ b/web/core/modules/file/tests/src/Kernel/FileModuleTest.php @@ -28,7 +28,7 @@ public function testFileSaveUploadSingleErrorFormSize() { $file_name = $this->randomMachineName(); $file_info = $this->createMock(UploadedFile::class); $file_info->expects($this->once())->method('getError')->willReturn(UPLOAD_ERR_FORM_SIZE); - $file_info->expects($this->once())->method('getFileName')->willReturn($file_name); + $file_info->expects($this->once())->method('getClientOriginalName')->willReturn($file_name); $this->assertFalse(\_file_save_upload_single($file_info, 'name')); $expected_message = new TranslatableMarkup('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $file_name, '%maxsize' => format_size(Environment::getUploadMaxSize())]); $this->assertEquals($expected_message, \Drupal::messenger()->all()['error'][0]); diff --git a/web/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php b/web/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php index b588ad789ce5ad19fc99c6be45f4b8dd7b8a57d1..32a31ea0a88e059e47ba49369254dd74af981c22 100644 --- a/web/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php +++ b/web/core/modules/file/tests/src/Kernel/Plugin/migrate/source/d7/FileTest.php @@ -117,6 +117,7 @@ public function providerSource() { 'filesize' => '3620', 'status' => '1', 'timestamp' => '1421727515', + 'filepath' => 'sites/default/files/cube.jpeg', ], ]; // Do an automatic count. @@ -143,6 +144,7 @@ public function providerSource() { 'filesize' => '3620', 'status' => '1', 'timestamp' => '1421727515', + 'filepath' => 'sites/default/files/cube.jpeg', ], ]; // Do an automatic count. diff --git a/web/core/modules/filter/src/Plugin/Filter/FilterCaption.php b/web/core/modules/filter/src/Plugin/Filter/FilterCaption.php index b5a58563d3e4ea8b317f87c6ab0ac39fdbe86afc..817f73b7afb0c4097b3e380cf4ac7e80c7658342 100644 --- a/web/core/modules/filter/src/Plugin/Filter/FilterCaption.php +++ b/web/core/modules/filter/src/Plugin/Filter/FilterCaption.php @@ -3,7 +3,6 @@ namespace Drupal\filter\Plugin\Filter; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Xss; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\filter\FilterPluginManager; use Drupal\filter\FilterProcessResult; diff --git a/web/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettingsTaxonomyVocabulary.php b/web/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettingsTaxonomyVocabulary.php index 4cde5687f6a4a984bddc803ffd0b2f5829c12f69..7787865b61ba1dfd1ea1adfac6ac3e6fadd0f928 100644 --- a/web/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettingsTaxonomyVocabulary.php +++ b/web/core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettingsTaxonomyVocabulary.php @@ -19,8 +19,14 @@ class LanguageContentSettingsTaxonomyVocabulary extends DrupalSqlBase { * {@inheritdoc} */ public function query() { - return $this->select('vocabulary', 'v') - ->fields('v', ['vid', 'language']); + $query = $this->select('vocabulary', 'v') + ->fields('v', ['vid']); + if ($this->getDatabase() + ->schema() + ->fieldExists('vocabulary', 'language')) { + $query->addField('v', 'language'); + } + return $query; } /** @@ -44,9 +50,9 @@ public function prepareRow(Row $row) { // 2 - Predefined language for a vocabulary and its terms. // 3 - Per-language terms, translatable (referencing terms with different // languages) but not localizable. - $i18ntaxonomy_vocabulary = $this->variableGet('i18ntaxonomy_vocabulary', NULL); + $i18ntaxonomy_vocabulary = $this->variableGet('i18ntaxonomy_vocabulary', []); $vid = $row->getSourceProperty('vid'); - $state = FALSE; + $state = 0; if (array_key_exists($vid, $i18ntaxonomy_vocabulary)) { $state = $i18ntaxonomy_vocabulary[$vid]; } diff --git a/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php b/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php index c709859f764e42438153ebcc974ba40a2b40e4a7..e4abb3d9fe68ea41197c8156b0a4ca7b9d42cd75 100644 --- a/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php +++ b/web/core/modules/language/tests/src/Kernel/Plugin/migrate/source/d6/LanguageContentTaxonomyVocabularySettingsTest.php @@ -75,7 +75,33 @@ public function providerSource() { ], ]; + // Test without a language column in the database. + $tests[1] = $tests[0]; + foreach ($tests[1]['source_data']['vocabulary'] as $key => $row) { + unset($tests[1]['source_data']['vocabulary'][$key]['language']); + } + $tests[1]['source_data']['variable'] = [ + [ + 'name' => 'i18ntaxonomy_vocabulary', + 'value' => 'a:4:{i:1;s:1:"0";i:2;s:1:"0";i:3;s:1:"3";i:5;s:1:"1";}', + ], + ]; + $tests[1]['expected_data'] = [ + [ + 'vid' => 1, + 'state' => 0, + ], + [ + 'vid' => 2, + 'state' => 0, + ], + ]; + + // Test without a i18ntaxonomy_vocabulary variable. + $tests[2] = $tests[1]; + unset($tests[2]['source_data']['variable']); return $tests; + } } diff --git a/web/core/modules/link/src/Plugin/migrate/process/FieldLink.php b/web/core/modules/link/src/Plugin/migrate/process/FieldLink.php index 143b7ea09be8ff0761bb4110746cf48fa0a956e0..14f615e3b4362caccab27c87c50b2538c4d4e3e5 100644 --- a/web/core/modules/link/src/Plugin/migrate/process/FieldLink.php +++ b/web/core/modules/link/src/Plugin/migrate/process/FieldLink.php @@ -60,10 +60,15 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition */ protected function canonicalizeUri($uri) { // If we already have a scheme, we're fine. - if (empty($uri) || parse_url($uri, PHP_URL_SCHEME)) { + if (parse_url($uri, PHP_URL_SCHEME)) { return $uri; } + // Empty URI and non-links are allowed. + if (empty($uri) || in_array($uri, ['<nolink>', '<none>'])) { + return 'route:<nolink>'; + } + // Remove the <front> component of the URL. if (strpos($uri, '<front>') === 0) { $uri = substr($uri, strlen('<front>')); diff --git a/web/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php b/web/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php index 18456aa86ac9d82938cdfb6275eb3e97bbd910ab..61853410584462eb760de196df3f8284623edfc4 100644 --- a/web/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php +++ b/web/core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php @@ -86,6 +86,18 @@ public function canonicalizeUriDataProvider() { 'http://www.example.com/page#links', 'http://www.example.com/page#links', ], + 'empty' => [ + '', + 'route:<nolink>', + ], + 'No link' => [ + '<nolink>', + 'route:<nolink>', + ], + 'none' => [ + '<none>', + 'route:<nolink>', + ], ]; } diff --git a/web/core/modules/media/src/OEmbed/Endpoint.php b/web/core/modules/media/src/OEmbed/Endpoint.php index 38d265d5bd782cb353b8c27fa3bf58edb567834d..97f97e2815fc1ad4a421dde3c7c7da2147bf4240 100644 --- a/web/core/modules/media/src/OEmbed/Endpoint.php +++ b/web/core/modules/media/src/OEmbed/Endpoint.php @@ -162,11 +162,17 @@ public function matchUrl($url) { /** * Builds and returns the endpoint URL. * + * In most situations this function should not be used. Your are probably + * looking for \Drupal\media\OEmbed\UrlResolver::getResourceUrl(), because it + * is alterable and also cached. + * * @param string $url * The canonical media URL. * * @return string * URL of the oEmbed endpoint. + * + * @see \Drupal\media\OEmbed\UrlResolver::getResourceUrl() */ public function buildResourceUrl($url) { $query = ['url' => $url]; diff --git a/web/core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php b/web/core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php index 3b885cce8ffa0b4c76d3be2541551c769ee2535f..e39b2055cc7da808211ce91ec4ff26c7a0db0cac 100644 --- a/web/core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php +++ b/web/core/modules/media/src/Plugin/Validation/Constraint/OEmbedResourceConstraintValidator.php @@ -113,8 +113,7 @@ public function validate($value, Constraint $constraint) { // Verify that resource fetching works, because some URLs might match // the schemes but don't support oEmbed. try { - $endpoints = $provider->getEndpoints(); - $resource_url = reset($endpoints)->buildResourceUrl($url); + $resource_url = $this->urlResolver->getResourceUrl($url); $this->resourceFetcher->fetchResource($resource_url); } catch (ResourceException $e) { diff --git a/web/core/modules/media/src/Plugin/media/Source/OEmbed.php b/web/core/modules/media/src/Plugin/media/Source/OEmbed.php index 6a3621a3b5a95381db6a62bf4ebbc288f0948cef..58a819c25a7bd0f1acfbc8946f3ea1fc8aec7962 100644 --- a/web/core/modules/media/src/Plugin/media/Source/OEmbed.php +++ b/web/core/modules/media/src/Plugin/media/Source/OEmbed.php @@ -394,10 +394,14 @@ protected function getLocalThumbnailUri(Resource $resource) { } $remote_thumbnail_url = $remote_thumbnail_url->toString(); + // Remove the query string, since we do not want to include it in the local + // thumbnail URI. + $local_thumbnail_url = parse_url($remote_thumbnail_url, PHP_URL_PATH); + // Compute the local thumbnail URI, regardless of whether or not it exists. $configuration = $this->getConfiguration(); $directory = $configuration['thumbnails_directory']; - $local_thumbnail_uri = "$directory/" . Crypt::hashBase64($remote_thumbnail_url) . '.' . pathinfo($remote_thumbnail_url, PATHINFO_EXTENSION); + $local_thumbnail_uri = "$directory/" . Crypt::hashBase64($local_thumbnail_url) . '.' . pathinfo($local_thumbnail_url, PATHINFO_EXTENSION); // If the local thumbnail already exists, return its URI. if (file_exists($local_thumbnail_uri)) { diff --git a/web/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php b/web/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php index 692c9bb6cf36a938fca36d93b019539739c282c0..e085785ab48d5a40a27e6bad3a33ede2e631df63 100644 --- a/web/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php +++ b/web/core/modules/media/tests/src/Kernel/OEmbedResourceConstraintValidatorTest.php @@ -4,6 +4,8 @@ use Drupal\KernelTests\KernelTestBase; use Drupal\media\Entity\Media; +use Drupal\media\OEmbed\Provider; +use Drupal\media\OEmbed\ResourceFetcher; use Drupal\media\OEmbed\UrlResolverInterface; use Drupal\media\Plugin\Validation\Constraint\OEmbedResourceConstraint; use Drupal\media\Plugin\Validation\Constraint\OEmbedResourceConstraintValidator; @@ -37,7 +39,7 @@ protected function setUp() { /** * @covers ::validate */ - public function testValidate() { + public function testValidateEmptySource() { $media = Media::create([ 'bundle' => $this->createMediaType('oembed:video')->id(), ]); @@ -52,7 +54,55 @@ public function testValidate() { $url_resolver = $this->prophesize(UrlResolverInterface::class); $url_resolver->getProviderByUrl(Argument::any())->shouldNotBeCalled(); - $value = new class ($media) { + $validator = new OEmbedResourceConstraintValidator( + $url_resolver->reveal(), + $this->container->get('media.oembed.resource_fetcher'), + $this->container->get('logger.factory') + ); + $validator->initialize($context->reveal()); + $validator->validate($this->getValue($media), $constraint); + } + + /** + * @covers ::validate + */ + public function testValidateUrlResolverInvoked() { + $media = Media::create([ + 'bundle' => $this->createMediaType('oembed:video')->id(), + 'field_media_oembed_video' => 'source value', + ]); + + $constraint = new OEmbedResourceConstraint(); + + $context = $this->prophesize(ExecutionContextInterface::class); + + $provider = $this->prophesize(Provider::class); + $provider->getName()->willReturn('YouTube'); + + $url_resolver = $this->prophesize(UrlResolverInterface::class); + $url_resolver->getProviderByUrl(Argument::any())->willReturn($provider->reveal()); + $url_resolver->getResourceUrl(Argument::any())->shouldBeCalledOnce(); + + $validator = new OEmbedResourceConstraintValidator( + $url_resolver->reveal(), + $this->prophesize(ResourceFetcher::class)->reveal(), + $this->container->get('logger.factory') + ); + $validator->initialize($context->reveal()); + $validator->validate($this->getValue($media), $constraint); + } + + /** + * Wraps a media entity in an anonymous class to mock a field value. + * + * @param \Drupal\media\Entity\Media $media + * The media object. + * + * @return object + * The mock field value to validate. + */ + protected function getValue(Media $media) { + return new class ($media) { public function __construct($entity) { $this->entity = $entity; @@ -63,14 +113,6 @@ public function getEntity() { } }; - - $validator = new OEmbedResourceConstraintValidator( - $url_resolver->reveal(), - $this->container->get('media.oembed.resource_fetcher'), - $this->container->get('logger.factory') - ); - $validator->initialize($context->reveal()); - $validator->validate($value, $constraint); } } diff --git a/web/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php b/web/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php index 180085ae04c53140bbb4abb7a5247bfc7a765bb5..d2c2414e1243a520dcb30986ce77c8dc638edb2d 100644 --- a/web/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php +++ b/web/core/modules/media/tests/src/Kernel/OEmbedSourceTest.php @@ -2,20 +2,23 @@ namespace Drupal\Tests\media\Kernel; -use Drupal\KernelTests\KernelTestBase; +use Drupal\Component\Utility\Crypt; +use Drupal\Core\Url; +use Drupal\media\Entity\Media; +use Drupal\media\OEmbed\Resource; +use Drupal\media\OEmbed\ResourceFetcherInterface; +use Drupal\media\OEmbed\UrlResolverInterface; use Drupal\media\Plugin\media\Source\OEmbed; +use GuzzleHttp\Client; +use GuzzleHttp\Psr7\Response; +use Prophecy\Argument; /** * @coversDefaultClass \Drupal\media\Plugin\media\Source\OEmbed * * @group media */ -class OEmbedSourceTest extends KernelTestBase { - - /** - * {@inheritdoc} - */ - protected static $modules = ['media']; +class OEmbedSourceTest extends MediaKernelTestBase { /** * @covers ::getMetadata @@ -34,4 +37,49 @@ public function testGetMetadata() { $this->assertNull($plugin->getMetadata($media->reveal(), 'type')); } + /** + * @covers ::getLocalThumbnailUri + */ + public function testLocalThumbnailUriQueryStringIsIgnored() { + // There's no need to resolve the resource URL in this test; we just need + // to fetch the resource. + $this->container->set( + 'media.oembed.url_resolver', + $this->prophesize(UrlResolverInterface::class)->reveal() + ); + + $thumbnail_url = Url::fromUri('internal:/core/misc/druplicon.png?foo=bar'); + + // Create a mocked resource whose thumbnail URL contains a query string. + $resource = $this->prophesize(Resource::class); + $resource->getTitle()->willReturn('Test resource'); + $resource->getThumbnailUrl()->willReturn($thumbnail_url); + + // The source plugin will try to fetch the remote thumbnail, so mock the + // HTTP client to ensure that request returns an empty "OK" response. + $http_client = $this->prophesize(Client::class); + $http_client->get(Argument::type('string'))->willReturn(new Response()); + $this->container->set('http_client', $http_client->reveal()); + + // Mock the resource fetcher so that it will return our mocked resource. + $resource_fetcher = $this->prophesize(ResourceFetcherInterface::class); + $resource_fetcher->fetchResource(NULL)->willReturn($resource->reveal()); + $this->container->set('media.oembed.resource_fetcher', $resource_fetcher->reveal()); + + $media_type = $this->createMediaType('oembed:video'); + $source = $media_type->getSource(); + + $media = Media::create([ + 'bundle' => $media_type->id(), + $source->getSourceFieldDefinition($media_type)->getName() => $this->randomString(), + ]); + $media->save(); + + // Get the local thumbnail URI and ensure that it does not contain any + // query string. + $local_thumbnail_uri = $media_type->getSource()->getMetadata($media, 'thumbnail_uri'); + $expected_uri = 'public://oembed_thumbnails/' . Crypt::hashBase64('/core/misc/druplicon.png') . '.png'; + $this->assertSame($expected_uri, $local_thumbnail_uri); + } + } diff --git a/web/core/modules/media_library/media_library.module b/web/core/modules/media_library/media_library.module index 5312b8e96dbe7404aefd7a029fc79086eef6252a..5726a80a4a62d7d03eabd0100a086fde82d51785 100644 --- a/web/core/modules/media_library/media_library.module +++ b/web/core/modules/media_library/media_library.module @@ -84,11 +84,21 @@ function media_library_help($route_name, RouteMatchInterface $route_match) { * Implements hook_media_source_info_alter(). */ function media_library_media_source_info_alter(array &$sources) { - $sources['audio_file']['forms']['media_library_add'] = FileUploadForm::class; - $sources['file']['forms']['media_library_add'] = FileUploadForm::class; - $sources['image']['forms']['media_library_add'] = FileUploadForm::class; - $sources['video_file']['forms']['media_library_add'] = FileUploadForm::class; - $sources['oembed:video']['forms']['media_library_add'] = OEmbedForm::class; + if (empty($sources['audio_file']['forms']['media_library_add'])) { + $sources['audio_file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['file']['forms']['media_library_add'])) { + $sources['file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['image']['forms']['media_library_add'])) { + $sources['image']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['video_file']['forms']['media_library_add'])) { + $sources['video_file']['forms']['media_library_add'] = FileUploadForm::class; + } + if (empty($sources['oembed:video']['forms']['media_library_add'])) { + $sources['oembed:video']['forms']['media_library_add'] = OEmbedForm::class; + } } /** diff --git a/web/core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php b/web/core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php index 84099ed3f600f638066776a585e959f5a337d6c8..348f22f1046bcfeb7e028825a6c7d273558822c9 100644 --- a/web/core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php +++ b/web/core/modules/media_library/src/MediaLibraryFieldWidgetOpener.php @@ -69,7 +69,11 @@ public function checkAccess(MediaLibraryState $state, AccountInterface $account) $storage = $this->entityTypeManager->getStorage($entity_type_id); $access_handler = $this->entityTypeManager->getAccessControlHandler($entity_type_id); - if ($parameters['entity_id']) { + if (!empty($parameters['revision_id'])) { + $entity = $storage->loadRevision($parameters['revision_id']); + $entity_access = $access_handler->access($entity, 'update', $account, TRUE); + } + elseif ($parameters['entity_id']) { $entity = $storage->load($parameters['entity_id']); $entity_access = $access_handler->access($entity, 'update', $account, TRUE); } diff --git a/web/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php b/web/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php index f957b77fddb5ca3c6f6fb28d72e877c6ebb069e2..0ab737ccf5b50a589ccd5ba744fc1d0503e66ea5 100644 --- a/web/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php +++ b/web/core/modules/media_library/src/Plugin/Field/FieldWidget/MediaLibraryWidget.php @@ -473,6 +473,10 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen // tamper-proof hash in a consistent way. if (!$entity->isNew()) { $opener_parameters['entity_id'] = (string) $entity->id(); + + if ($entity->getEntityType()->isRevisionable()) { + $opener_parameters['revision_id'] = (string) $entity->getRevisionId(); + } } $state = MediaLibraryState::create('media_library.opener.field_widget', $allowed_media_type_ids, $selected_type_id, $remaining, $opener_parameters); diff --git a/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.info.yml b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.info.yml new file mode 100644 index 0000000000000000000000000000000000000000..d2799420a8cfe07f5e9b7655a268ba7faa8f679a --- /dev/null +++ b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.info.yml @@ -0,0 +1,10 @@ +name: 'Media Library Form Overwrite test' +type: module +description: 'Test module for Media Library.' +package: Testing +dependencies: + - drupal:image + - drupal:media_library + - drupal:menu_ui + - drupal:node + - drupal:path diff --git a/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.module b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.module new file mode 100644 index 0000000000000000000000000000000000000000..f52e79dd0696dc5e0bfa85343a8c6af9c353b965 --- /dev/null +++ b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/media_library_form_overwrite_test.module @@ -0,0 +1,12 @@ +<?php + +/** + * @file + * Contains. + */ + +use Drupal\media_library_form_overwrite_test\Form\TestAddForm; + +function media_library_form_overwrite_test_media_source_info_alter(array &$sources) { + $sources['image']['forms']['media_library_add'] = TestAddForm::class; +} diff --git a/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/src/Form/TestAddForm.php b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/src/Form/TestAddForm.php new file mode 100644 index 0000000000000000000000000000000000000000..cddece17ac1f46cb4507540c693247ab76a1d4b0 --- /dev/null +++ b/web/core/modules/media_library/tests/modules/media_library_form_overwrite_test/src/Form/TestAddForm.php @@ -0,0 +1,27 @@ +<?php + +namespace Drupal\media_library_form_overwrite_test\Form; + +use Drupal\Core\Form\FormStateInterface; +use Drupal\media_library\Form\AddFormBase; + +/** + * Test add form. + */ +class TestAddForm extends AddFormBase { + + /** + * {@inheritdoc} + */ + protected function buildInputElement(array $form, FormStateInterface $form_state) { + return []; + } + + /** + * {@inheritdoc} + */ + public function getFormId() { + return 'test_add_form'; + } + +} diff --git a/web/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php b/web/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php index 51b70c97806381c69ff33727930ae8f529e44020..79a481eabd0ff4df4cf78bd7eba97a4d6367154e 100644 --- a/web/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php +++ b/web/core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php @@ -7,6 +7,7 @@ use Drupal\media_library\Form\FileUploadForm; use Drupal\media_library\Form\OEmbedForm; use Drupal\media_library\MediaLibraryState; +use Drupal\media_library_form_overwrite_test\Form\TestAddForm; use Drupal\Tests\media\Traits\MediaTypeCreationTrait; use Drupal\Tests\user\Traits\UserCreationTrait; @@ -137,4 +138,19 @@ public function testSelectedTypeValidation() { \Drupal::formBuilder()->buildForm(FileUploadForm::class, $form_state); } + /** + * Tests overwriting of the add form. + */ + public function testDifferentAddForm() { + $this->enableModules(['media_library_form_overwrite_test']); + + $entity_type_manager = \Drupal::entityTypeManager(); + $image = $entity_type_manager->getStorage('media_type')->load('image'); + + $image_source_definition = $image->getSource()->getPluginDefinition(); + + // Assert the overwritten form class is set to the media source. + $this->assertSame(TestAddForm::class, $image_source_definition['forms']['media_library_add']); + } + } diff --git a/web/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php b/web/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d5ae2d0c5325fd4a876bedf59f8126bf3e24dce9 --- /dev/null +++ b/web/core/modules/media_library/tests/src/Kernel/MediaLibraryWidgetTest.php @@ -0,0 +1,158 @@ +<?php + +namespace Drupal\Tests\media_library\Kernel; + +use Drupal\Core\Field\BaseFieldDefinition; +use Drupal\Core\Form\FormState; +use Drupal\entity_test\Entity\EntityTest; +use Drupal\entity_test\Entity\EntityTestRev; +use Drupal\KernelTests\KernelTestBase; +use Drupal\media\Entity\MediaType; +use Drupal\Tests\user\Traits\UserCreationTrait; + +/** + * Tests the media library widget. + * + * @coversDefaultClass \Drupal\media_library\Plugin\Field\FieldWidget\MediaLibraryWidget + * @group media_library + */ +class MediaLibraryWidgetTest extends KernelTestBase { + + use UserCreationTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'media', + 'media_library', + 'field', + 'image', + 'system', + 'views', + 'user', + 'entity_test', + ]; + + /** + * An admin user. + * + * @var \Drupal\user\Entity\User + */ + protected $adminUser; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + + $this->baseField = BaseFieldDefinition::create('entity_reference') + ->setName('media') + ->setSetting('target_type', 'media') + ->setSetting('handler_settings', ['target_bundles' => ['test_type' => 'test_type']]); + $this->container->get('state')->set('entity_test.additional_base_field_definitions', [ + 'media' => $this->baseField, + ]); + $this->container->get('state')->set('entity_test_rev.additional_base_field_definitions', [ + 'media' => $this->baseField, + ]); + + $this->installEntitySchema('entity_test'); + $this->installEntitySchema('entity_test_rev'); + $this->installEntitySchema('user'); + $this->installSchema('system', ['sequences', 'key_value_expire']); + $this->installConfig([ + 'system', + 'image', + 'media', + 'media_library', + ]); + + MediaType::create([ + 'id' => 'test_type', + 'label' => 'Test type', + 'source' => 'image', + ])->save(); + + // Create user 1 so the test user doesn't bypass access control. + $this->createUser(); + + $this->adminUser = $this->createUser([ + 'administer entity_test content', + 'view media', + ]); + } + + /** + * Test the media library widget access. + */ + public function testWidgetAccess() { + $entity = EntityTest::create([ + 'name' => 'sample entity', + ]); + $entity->save(); + $element = $this->buildWidgetForm($entity); + $this->assertMediaLibraryStateAccess(TRUE, $this->adminUser, $element['open_button']['#media_library_state']); + } + + /** + * Test the media library widget access with a revisionable entity type. + */ + public function testRevisionableWidgetAccess() { + $allowed_revision = EntityTestRev::create([ + 'name' => 'allowed_access', + ]); + $allowed_revision->save(); + + $denied_revision = clone $allowed_revision; + $denied_revision->setNewRevision(); + $denied_revision->name = 'forbid_access'; + $denied_revision->save(); + + $element = $this->buildWidgetForm($allowed_revision); + $this->assertMediaLibraryStateAccess(TRUE, $this->adminUser, $element['open_button']['#media_library_state']); + + $element = $this->buildWidgetForm($denied_revision); + $this->assertMediaLibraryStateAccess(FALSE, $this->adminUser, $element['open_button']['#media_library_state']); + } + + /** + * Assert if the given user has access to the given state. + * + * @param bool $access + * The access result to assert. + * @param \Drupal\Core\Session\AccountInterface $user + * The user account. + * @param \Drupal\media_library\MediaLibraryState $state + * The media library state. + * + * @throws \Exception + */ + protected function assertMediaLibraryStateAccess($access, $user, $state) { + $ui_builder = $this->container->get('media_library.ui_builder'); + $access_result = $ui_builder->checkAccess($user, $state); + $this->assertEquals($access, $access_result->isAllowed()); + } + + /** + * Build the media library widget form. + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * The entity to build the form for. + * + * @return array + * A built form array of the media library widget. + */ + protected function buildWidgetForm($entity) { + $form = [ + '#parents' => [], + ]; + return $this->container->get('plugin.manager.field.widget')->createInstance('media_library_widget', [ + 'field_definition' => $this->baseField, + 'settings' => [], + 'third_party_settings' => [], + ])->formElement($entity->media, 0, ['#description' => ''], $form, new FormState()); + } + +} diff --git a/web/core/modules/migrate/src/MigrateExecutable.php b/web/core/modules/migrate/src/MigrateExecutable.php index c3a0506419d5236cff14e781792d5d26152491a0..f15cdf69d96ba7ec4e76adb348ad5d39348a882b 100644 --- a/web/core/modules/migrate/src/MigrateExecutable.php +++ b/web/core/modules/migrate/src/MigrateExecutable.php @@ -189,7 +189,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( - $this->t('Migration failed with source plugin exception: @e', ['@e' => $e->getMessage()]), 'error'); + $this->t('Migration failed with source plugin exception: @e in @file line @line', [ + '@e' => $e->getMessage(), + '@file' => $e->getFile(), + '@line' => $e->getLine(), + ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } @@ -269,8 +273,11 @@ public function import() { } catch (\Exception $e) { $this->message->display( - $this->t('Migration failed with source plugin exception: @e', - ['@e' => $e->getMessage()]), 'error'); + $this->t('Migration failed with source plugin exception: @e in @file line @line', [ + '@e' => $e->getMessage(), + '@file' => $e->getFile(), + '@line' => $e->getLine(), + ]), 'error'); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return MigrationInterface::RESULT_FAILED; } diff --git a/web/core/modules/migrate/src/Plugin/MigrateProcessInterface.php b/web/core/modules/migrate/src/Plugin/MigrateProcessInterface.php index 8fef305f74f05b85c02c32f4ed33d8396b015911..09ff01e48a24fb99465504987f6bfcee9e4dc331 100644 --- a/web/core/modules/migrate/src/Plugin/MigrateProcessInterface.php +++ b/web/core/modules/migrate/src/Plugin/MigrateProcessInterface.php @@ -9,16 +9,9 @@ /** * An interface for migrate process plugins. * - * A process plugin will typically implement the transform() method to perform - * its work. However, it is possible instead for a process plugin to use any - * number of methods, thus offering different alternatives ways of processing. - * In this case, the transform() method should not be implemented, and the - * plugin configuration must provide the name of the method to be called via the - * "method" key. Each method must have the same signature as transform(). - * The base class \Drupal\migrate\ProcessPluginBase takes care of implementing - * transform() and calling the configured method. See - * \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty and - * d6_field_instance_widget_settings.yml for examples. + * Migrate process plugins transform the input value.For example, transform a + * human provided name into a machine name, look up an identifier in a previous + * migration and so on. * * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\ProcessPluginBase diff --git a/web/core/modules/migrate/src/Plugin/migrate/destination/Entity.php b/web/core/modules/migrate/src/Plugin/migrate/destination/Entity.php index 6bd1ec4edf99c3e204d397b92a36423be2444fbe..2978842ff96b1868c4e234fa2a2eb63d06d30a2b 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/destination/Entity.php +++ b/web/core/modules/migrate/src/Plugin/migrate/destination/Entity.php @@ -14,6 +14,10 @@ /** * Provides a generic destination to import entities. * + * Available configuration keys: + * - default_bundle: (optional) The bundle to use for this row if 'bundle' is + * not defined on the row. + * * Examples: * * @code @@ -44,8 +48,11 @@ * revision_timestamp: timestamp * destination: * plugin: entity:node + * default_bundle: custom * @endcode * + * This will save the processed, migrated row as a node of type 'custom'. + * * @MigrateDestination( * id = "entity", * deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntity" diff --git a/web/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php b/web/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php index 228caba116bc7caee255dfba547d4d65187fb137..e095c357d65b530b8a2ec9ed70e5c1c906bd5d77 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php +++ b/web/core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php @@ -85,6 +85,7 @@ * validate: true * @endcode * + * @see \Drupal\migrate\Plugin\migrate\destination\Entity * @see \Drupal\migrate\Plugin\migrate\destination\EntityRevision */ class EntityContentBase extends Entity implements HighestIdInterface, MigrateValidatableEntityInterface { diff --git a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index ec22c3f65e8ad49c9bfbbea07b45af01c1d2fcc1..cf13b463921b8f7a145da03625732cb54c683f5d 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -452,7 +452,7 @@ protected function mapJoinable() { } foreach (['username', 'password', 'host', 'port', 'namespace', 'driver'] as $key) { - if (isset($source_database_options[$key])) { + if (isset($source_database_options[$key]) && isset($id_map_database_options[$key])) { if ($id_map_database_options[$key] != $source_database_options[$key]) { return FALSE; } diff --git a/web/core/modules/migrate/src/ProcessPluginBase.php b/web/core/modules/migrate/src/ProcessPluginBase.php index b6a0f5aaf84f915202c1af5bf6e33426b2b3396c..2aea55660ee08100acefe374b8ccc84891825b49 100644 --- a/web/core/modules/migrate/src/ProcessPluginBase.php +++ b/web/core/modules/migrate/src/ProcessPluginBase.php @@ -12,10 +12,18 @@ * transform a human provided name into a machine name, look up an identifier * in a previous migration and so on. * + * Process plugins extending this class can use any number of methods, thus + * offering different alternative ways of processing. In this case, the + * transform() method should not be implemented, and the plugin configuration + * must provide the name of the method to be called via the "method" key. Each + * method must have the same signature as transform(). + * * @see https://www.drupal.org/node/2129651 * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\Plugin\MigrateProcessInterface * @see \Drupal\migrate\Annotation\MigrateProcessPlugin + * @see \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty + * @see d7_field_formatter_settings.yml * @see plugin_api * * @ingroup migration diff --git a/web/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/web/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php index 5acc995666a94fd6b50d3f2431dbdb14ab7de5b1..2bcb0a6e321774353530f99eb8d919ebf5f91346 100644 --- a/web/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php +++ b/web/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php @@ -66,12 +66,16 @@ public function testImportWithFailingRewind() { $source->expects($this->once()) ->method('rewind') ->will($this->throwException(new \Exception($exception_message))); + // The exception message contains the line number where it is thrown. Save + // it for the testing the exception message. + $line = (__LINE__) - 3; $this->migration->expects($this->any()) ->method('getSourcePlugin') ->will($this->returnValue($source)); // Ensure that a message with the proper message was added. + $exception_message .= " in " . __FILE__ . " line $line"; $this->message->expects($this->once()) ->method('display') ->with("Migration failed with source plugin exception: " . Html::escape($exception_message)); diff --git a/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php index 372ffa6d0b4f81f90a9929d70c2425b4f777b95a..4398566cb7702aad3c7ba927c97103758cf86507 100644 --- a/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php +++ b/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php @@ -4512,6 +4512,36 @@ 'translatable' => '1', 'deleted' => '0', )) +->values(array( + 'id' => '54', + 'field_name' => 'field_termplain', + 'type' => 'taxonomy_term_reference', + 'module' => 'taxonomy', + 'active' => '1', + 'storage_type' => 'field_sql_storage', + 'storage_module' => 'field_sql_storage', + 'storage_active' => '1', + 'locked' => '0', + 'data' => 'a:7:{s:12:"translatable";s:1:"0";s:12:"entity_types";a:0:{}s:8:"settings";a:3:{s:14:"allowed_values";a:1:{i:0;a:2:{s:10:"vocabulary";s:4:"tags";s:6:"parent";s:1:"0";}}s:21:"options_list_callback";s:29:"title_taxonomy_allowed_values";s:23:"entity_translation_sync";b:0;}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:26:"field_data_field_termplain";a:1:{s:3:"tid";s:19:"field_termplain_tid";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:30:"field_revision_field_termplain";a:1:{s:3:"tid";s:19:"field_termplain_tid";}}}}}s:12:"foreign keys";a:1:{s:3:"tid";a:2:{s:5:"table";s:18:"taxonomy_term_data";s:7:"columns";a:1:{s:3:"tid";s:3:"tid";}}}s:7:"indexes";a:1:{s:3:"tid";a:1:{i:0;s:3:"tid";}}s:2:"id";s:2:"55";}', + 'cardinality' => '1', + 'translatable' => '1', + 'deleted' => '0', +)) +->values(array( + 'id' => '55', + 'field_name' => 'field_termrss', + 'type' => 'taxonomy_term_reference', + 'module' => 'taxonomy', + 'active' => '1', + 'storage_type' => 'field_sql_storage', + 'storage_module' => 'field_sql_storage', + 'storage_active' => '1', + 'locked' => '0', + 'data' => 'a:7:{s:12:"translatable";i:0;s:12:"entity_types";a:0:{}s:8:"settings";a:3:{s:14:"allowed_values";a:1:{i:0;a:2:{s:10:"vocabulary";s:19:"sujet_de_discussion";s:6:"parent";s:1:"0";}}s:21:"options_list_callback";s:29:"title_taxonomy_allowed_values";s:23:"entity_translation_sync";b:0;}s:7:"storage";a:5:{s:4:"type";s:17:"field_sql_storage";s:8:"settings";a:0:{}s:6:"module";s:17:"field_sql_storage";s:6:"active";s:1:"1";s:7:"details";a:1:{s:3:"sql";a:2:{s:18:"FIELD_LOAD_CURRENT";a:1:{s:24:"field_data_field_termrss";a:1:{s:3:"tid";s:17:"field_termrss_tid";}}s:19:"FIELD_LOAD_REVISION";a:1:{s:28:"field_revision_field_termrss";a:1:{s:3:"tid";s:17:"field_termrss_tid";}}}}}s:12:"foreign keys";a:1:{s:3:"tid";a:2:{s:5:"table";s:18:"taxonomy_term_data";s:7:"columns";a:1:{s:3:"tid";s:3:"tid";}}}s:7:"indexes";a:1:{s:3:"tid";a:1:{i:0;s:3:"tid";}}s:2:"id";s:2:"56";}', + 'cardinality' => '1', + 'translatable' => '1', + 'deleted' => '0', +)) ->execute(); $connection->schema()->createTable('field_config_instance', array( 'fields' => array( @@ -5291,6 +5321,24 @@ 'data' => 'a:6:{s:5:"label";s:7:"Comment";s:8:"settings";a:2:{s:15:"text_processing";i:1;s:18:"user_register_form";b:0;}s:8:"required";b:1;s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:6:"weight";i:0;s:8:"settings";a:0:{}s:6:"module";s:4:"text";}}s:6:"widget";a:4:{s:4:"type";s:13:"text_textarea";s:8:"settings";a:1:{s:4:"rows";i:5;}s:6:"weight";i:0;s:6:"module";s:4:"text";}s:11:"description";s:0:"";}', 'deleted' => '0', )) +->values(array( + 'id' => '84', + 'field_id' => '54', + 'field_name' => 'field_termplain', + 'entity_type' => 'node', + 'bundle' => 'blog', + 'data' => 'a:6:{s:5:"label";s:9:"termplain";s:6:"widget";a:4:{s:4:"type";s:15:"options_buttons";s:6:"weight";s:2:"15";s:8:"settings";a:0:{}s:6:"module";s:7:"options";}s:8:"settings";a:2:{s:18:"user_register_form";b:0;s:23:"entity_translation_sync";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:29:"taxonomy_term_reference_plain";s:6:"weight";s:2:"13";s:8:"settings";a:0:{}s:6:"module";s:8:"taxonomy";}}s:8:"required";b:0;s:11:"description";s:0:"";}', + 'deleted' => '0', +)) +->values(array( + 'id' => '85', + 'field_id' => '55', + 'field_name' => 'field_termrss', + 'entity_type' => 'node', + 'bundle' => 'blog', + 'data' => 'a:7:{s:5:"label";s:7:"termrss";s:6:"widget";a:5:{s:6:"weight";s:2:"16";s:4:"type";s:15:"options_buttons";s:6:"module";s:7:"options";s:6:"active";i:1;s:8:"settings";a:0:{}}s:8:"settings";a:2:{s:18:"user_register_form";b:0;s:23:"entity_translation_sync";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:36:"taxonomy_term_reference_rss_category";s:6:"weight";s:2:"14";s:8:"settings";a:0:{}s:6:"module";s:8:"taxonomy";}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}', + 'deleted' => '0', +)) ->execute(); $connection->schema()->createTable('field_data_body', array( 'fields' => array( @@ -8437,6 +8485,128 @@ 'field_tags_tid' => '17', )) ->execute(); +$connection->schema()->createTable('field_data_field_termplain', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_termplain_tid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_data_field_termrss', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_termrss_tid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + $connection->schema()->createTable('field_data_field_term_entityreference', array( 'fields' => array( 'entity_type' => array( @@ -14521,6 +14691,131 @@ 'field_term_entityreference_target_id' => '15', )) ->execute(); + +$connection->schema()->createTable('field_revision_field_termplain', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_termplain_tid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('field_revision_field_termrss', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_termrss_tid' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); + $connection->schema()->createTable('field_revision_field_term_reference', array( 'fields' => array( 'entity_type' => array( diff --git a/web/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php b/web/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php index bb90e06eaf85bfd639948d2e6280c925c2d6292a..cf2c3d70e7712650c1881266d92a6e1a351b5251 100644 --- a/web/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php +++ b/web/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php @@ -203,6 +203,8 @@ public function addAllFieldProcessesAltersData() { 'map' => [ 'taxonomy_term_reference' => [ 'taxonomy_term_reference_link' => 'entity_reference_label', + 'taxonomy_term_reference_plain' => 'entity_reference_label', + 'taxonomy_term_reference_rss_category' => 'entity_reference_label', 'i18n_taxonomy_term_reference_link' => 'entity_reference_label', 'entityreference_entity_view' => 'entity_reference_entity_view', ], diff --git a/web/core/modules/migrate_drupal_ui/src/Controller/MigrateController.php b/web/core/modules/migrate_drupal_ui/src/Controller/MigrateController.php index 2054766a13ab2f4c359a38feedc4c618b23cf7b6..0947004adbd17c77e235afd2bd07581111a3b8d3 100644 --- a/web/core/modules/migrate_drupal_ui/src/Controller/MigrateController.php +++ b/web/core/modules/migrate_drupal_ui/src/Controller/MigrateController.php @@ -16,9 +16,11 @@ class MigrateController extends ControllerBase { * A redirect response object that may be returned by the controller. */ public function showLog() { + // Sets both the session and the query parameter so that it works correctly + // with both the watchdog view and the fallback. $_SESSION['dblog_overview_filter'] = []; $_SESSION['dblog_overview_filter']['type'] = ['migrate_drupal_ui' => 'migrate_drupal_ui']; - return $this->redirect('dblog.overview'); + return $this->redirect('dblog.overview', [], ['query' => ['type' => ['migrate_drupal_ui']]]); } } diff --git a/web/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php b/web/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php index 54b431f9ff41c18bb3d6997d4bec0f194aa01d17..4e8d621fe89e62eec059d3c6584fef2e62b1861a 100644 --- a/web/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php +++ b/web/core/modules/migrate_drupal_ui/src/Form/CredentialForm.php @@ -90,11 +90,6 @@ public function buildForm(array $form, FormStateInterface $form_state) { $drivers = $this->getDatabaseTypes(); $drivers_keys = array_keys($drivers); - // @todo https://www.drupal.org/node/2678510 Because this is a multi-step - // form, the form is not rebuilt during submission. Ideally we would get - // the chosen driver from form input, if available, in order to use - // #limit_validation_errors in the same way - // \Drupal\Core\Installer\Form\SiteSettingsForm does. $default_driver = current($drivers_keys); $default_options = []; @@ -134,10 +129,11 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['database']['driver']['#options'][$key] = $driver->name(); $form['database']['settings'][$key] = $driver->getFormOptions($default_options); - // @todo https://www.drupal.org/node/2678510 Using - // #limit_validation_errors in the submit does not work so it is not - // possible to require the database and username for mysql and pgsql. - // This is because this is a multi-step form. + unset($form['database']['settings'][$key]['advanced_options']['prefix']['#description']); + + // This is a multi-step form and is not rebuilt during submission so + // #limit_validation_errors is not used. The database and username fields + // for mysql and pgsql must not be required. $form['database']['settings'][$key]['database']['#required'] = FALSE; $form['database']['settings'][$key]['username']['#required'] = FALSE; $form['database']['settings'][$key]['#prefix'] = '<h2 class="js-hide">' . $this->t('@driver_name settings', ['@driver_name' => $driver->name()]) . '</h2>'; diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9b0d8efdf8ca16d9f2c7a1c51386fb91dafd5c86 --- /dev/null +++ b/web/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateControllerTest.php @@ -0,0 +1,96 @@ +<?php + +namespace Drupal\Tests\migrate_drupal_ui\Functional; + +use Drupal\views\Entity\View; +use Drupal\Tests\BrowserTestBase; + +/** + * Tests for the MigrateController class. + * + * @group migrate_drupal_ui + */ +class MigrateControllerTest extends BrowserTestBase { + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'dblog', + 'migrate_drupal_ui', + 'views_ui', + ]; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + + // Log in as user 1. Migrations in the UI can only be performed as user 1. + $this->drupalLogin($this->rootUser); + + // Create a migrate message for testing purposes. + \Drupal::logger('migrate_drupal_ui')->notice('A test message'); + + } + + /** + * Tests the upgrade report with the view enabled, disabled and uninstalled. + */ + public function testUpgradeReport() { + $session = $this->assertSession(); + + $this->assertTrue(View::load('watchdog')->status(), 'Watchdog view is enabled'); + // Tests redirection to report page when the watchdog view is enabled. + $this->drupalGet('admin/reports/upgrade'); + $session->optionExists('type[]', 'migrate_drupal_ui')->isSelected(); + $session->pageTextContainsOnce('A test message'); + + // Disable the watchdog view. + $this->drupalGet('admin/structure/views'); + $this->assertTrue($this->clickViewsOperationsLink('Disable', '/watchdog/')); + $session->statusCodeEquals(200); + + // Tests redirection to report page when the watchdog view is disabled. + $this->drupalGet('admin/reports/upgrade'); + $session->optionExists('type[]', 'migrate_drupal_ui')->isSelected(); + $session->pageTextContainsOnce('A test message'); + + \Drupal::service('module_installer')->uninstall(['views_ui', 'views']); + // Tests redirection to report page when views is uninstalled. + $this->drupalGet('admin/reports/upgrade'); + $session->optionExists('type[]', 'migrate_drupal_ui')->isSelected(); + $session->pageTextContainsOnce('A test message'); + } + + /** + * Clicks a view link to perform an operation. + * + * @param string $label + * Text between the anchor tags of the link. + * @param string $href_part + * A unique string that is expected to occur within the href of the link. + * + * @return bool + * TRUE when link found and clicked, otherwise FALSE. + */ + public function clickViewsOperationsLink($label, $href_part) { + $links = $this->xpath('//a[normalize-space(text())=:label]', [':label' => (string) $label]); + foreach ($links as $link_index => $link) { + $position = strpos($link->getAttribute('href'), $href_part); + if ($position !== FALSE) { + $index = $link_index; + $this->clickLink((string) $label, $index); + return TRUE; + } + } + return FALSE; + } + +} diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php index 327710d15be9bc47e299706003a6959349082164..8517c5da2a2e0dc3a9e10ee9f8945e877eecc125 100644 --- a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php +++ b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php @@ -89,8 +89,8 @@ protected function getEntityCounts() { 'contact_form' => 3, 'contact_message' => 0, 'editor' => 2, - 'field_config' => 79, - 'field_storage_config' => 60, + 'field_config' => 81, + 'field_storage_config' => 62, 'file' => 3, 'filter_format' => 7, 'image_style' => 6, diff --git a/web/core/modules/node/node.views.inc b/web/core/modules/node/node.views.inc new file mode 100644 index 0000000000000000000000000000000000000000..83e2ccf02056c322af1cd5716bca156874f92593 --- /dev/null +++ b/web/core/modules/node/node.views.inc @@ -0,0 +1,52 @@ +<?php + +/** + * @file + * Provide views data for node.module. + */ + +use Drupal\user\RoleInterface; +use Drupal\views\ViewExecutable; +use Drupal\user\Entity\Role; +use Drupal\views\Analyzer; + +/** + * Implements hook_views_analyze(). + */ +function node_views_analyze(ViewExecutable $view) { + $ret = []; + // Check for something other than the default display: + if ($view->storage->get('base_table') == 'node') { + foreach ($view->displayHandlers as $display) { + if (!$display->isDefaulted('access') || !$display->isDefaulted('filters')) { + // check for no access control + $access = $display->getOption('access'); + if (empty($access['type']) || $access['type'] == 'none') { + $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID); + $anonymous_has_access = $anonymous_role && $anonymous_role->hasPermission('access content'); + $authenticated_role = Role::load(RoleInterface::AUTHENTICATED_ID); + $authenticated_has_access = $authenticated_role && $authenticated_role->hasPermission('access content'); + if (!$anonymous_has_access || !$authenticated_has_access) { + $ret[] = Analyzer::formatMessage(t('Some roles lack permission to access content, but display %display has no access control.', ['%display' => $display->display['display_title']]), 'warning'); + } + $filters = $display->getOption('filters'); + foreach ($filters as $filter) { + if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) { + continue 2; + } + } + $ret[] = Analyzer::formatMessage(t('Display %display has no access control but does not contain a filter for published nodes.', ['%display' => $display->display['display_title']]), 'warning'); + } + } + } + } + foreach ($view->displayHandlers as $display) { + if ($display->getPluginId() == 'page') { + if ($display->getOption('path') == 'node/%') { + $ret[] = Analyzer::formatMessage(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use Layout Builder.', ['%display' => $display->display['display_title']]), 'warning'); + } + } + } + + return $ret; +} diff --git a/web/core/modules/node/node.views_execution.inc b/web/core/modules/node/node.views_execution.inc index 4d834a11e3556ba5e1628458faebd8a0fba2226d..f5401b17b4a123e94c6d3c82474dd08ce710005a 100644 --- a/web/core/modules/node/node.views_execution.inc +++ b/web/core/modules/node/node.views_execution.inc @@ -5,9 +5,7 @@ * Provide views runtime hooks for node.module. */ -use Drupal\user\RoleInterface; use Drupal\views\ViewExecutable; -use Drupal\user\Entity\Role; /** * Implements hook_views_query_substitutions(). @@ -20,44 +18,3 @@ function node_views_query_substitutions(ViewExecutable $view) { '***BYPASS_NODE_ACCESS***' => intval($account->hasPermission('bypass node access')), ]; } - -/** - * Implements hook_views_analyze(). - */ -function node_views_analyze(ViewExecutable $view) { - $ret = []; - // Check for something other than the default display: - if ($view->storage->get('base_table') == 'node') { - foreach ($view->displayHandlers as $display) { - if (!$display->isDefaulted('access') || !$display->isDefaulted('filters')) { - // check for no access control - $access = $display->getOption('access'); - if (empty($access['type']) || $access['type'] == 'none') { - $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID); - $anonymous_has_access = $anonymous_role && $anonymous_role->hasPermission('access content'); - $authenticated_role = Role::load(RoleInterface::AUTHENTICATED_ID); - $authenticated_has_access = $authenticated_role && $authenticated_role->hasPermission('access content'); - if (!$anonymous_has_access || !$authenticated_has_access) { - $ret[] = Analyzer::formatMessage(t('Some roles lack permission to access content, but display %display has no access control.', ['%display' => $display->display['display_title']]), 'warning'); - } - $filters = $display->getOption('filters'); - foreach ($filters as $filter) { - if ($filter['table'] == 'node' && ($filter['field'] == 'status' || $filter['field'] == 'status_extra')) { - continue 2; - } - } - $ret[] = Analyzer::formatMessage(t('Display %display has no access control but does not contain a filter for published nodes.', ['%display' => $display->display['display_title']]), 'warning'); - } - } - } - } - foreach ($view->displayHandlers as $display) { - if ($display->getPluginId() == 'page') { - if ($display->getOption('path') == 'node/%') { - $ret[] = Analyzer::formatMessage(t('Display %display has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use panels.', ['%display' => $display->display['display_title']]), 'warning'); - } - } - } - - return $ret; -} diff --git a/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_views_analyze.yml b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_views_analyze.yml new file mode 100644 index 0000000000000000000000000000000000000000..df2a8cb66ec3e381d62245435bfd6cc83691ad28 --- /dev/null +++ b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_views_analyze.yml @@ -0,0 +1,180 @@ +langcode: en +status: true +dependencies: + module: + - node + - user +id: test_node_views_analyze +label: test_node_views_analyze +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access content' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: mini + options: + items_per_page: 10 + offset: 0 + id: 0 + total_pages: null + expose: + items_per_page: false + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + tags: + previous: ‹‹ + next: ›› + style: + type: default + row: + type: 'entity:node' + options: + view_mode: teaser + fields: + title: + id: title + table: node_field_data + field: title + entity_type: node + entity_field: title + label: '' + alter: + alter_text: false + make_link: false + absolute: false + trim: false + word_boundary: false + ellipsis: false + strip_tags: false + html: false + hide_empty: false + empty_zero: false + settings: + link_to_entity: true + plugin_id: field + relationship: none + group_type: group + admin_label: '' + exclude: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_alter_empty: true + click_sort_column: value + type: string + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + filters: + status: + value: '1' + table: node_field_data + field: status + plugin_id: boolean + entity_type: node + entity_field: status + id: status + expose: + operator: '' + operator_limit_selection: false + operator_list: { } + group: 1 + sorts: + created: + id: created + table: node_field_data + field: created + order: DESC + entity_type: node + entity_field: created + plugin_id: date + relationship: none + group_type: group + admin_label: '' + exposed: false + expose: + label: '' + granularity: second + title: test_node_views_analyze + header: { } + footer: { } + empty: { } + relationships: { } + arguments: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } + page_1: + display_plugin: page + id: page_1 + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: node/% + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + - user.permissions + tags: { } diff --git a/web/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php b/web/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a94983a2ff3d46f3051b61edbd8c7a986134c41c --- /dev/null +++ b/web/core/modules/node/tests/src/Functional/Views/NodeViewsAnalyzeTest.php @@ -0,0 +1,47 @@ +<?php + +namespace Drupal\Tests\node\Functional\Views; + +/** + * Tests node_views_analyze(). + * + * @group node + */ +class NodeViewsAnalyzeTest extends NodeTestBase { + + /** + * {@inheritdoc} + */ + public static $modules = ['views_ui', 'node_test_views']; + + /** + * {@inheritdoc} + */ + protected $defaultTheme = 'stark'; + + /** + * Views used by this test. + * + * @var array + */ + public static $testViews = ['test_node_views_analyze']; + + /** + * Tests the implementation of node_views_analyze(). + */ + public function testNodeViewsAnalyze() { + // Create user with permission to view analyze message on views_ui. + $admin_user = $this->createUser(['administer views']); + + $this->drupalLogin($admin_user); + + // Access to views analyze page. + $this->drupalGet('admin/structure/views/nojs/analyze/test_node_views_analyze/page_1'); + + // Should return 200 with correct permission. + $this->assertSession()->statusCodeEquals(200); + + $this->assertSession()->responseContains('has set node/% as path. This will not produce what you want. If you want to have multiple versions of the node view, use Layout Builder.'); + } + +} diff --git a/web/core/modules/path_alias/tests/src/Kernel/AliasTest.php b/web/core/modules/path_alias/tests/src/Kernel/AliasTest.php index 111f9bff35781a1febe302f1139fd1044355c240..1ae306d6f34d068507f8dfe770008060d9d855d2 100644 --- a/web/core/modules/path_alias/tests/src/Kernel/AliasTest.php +++ b/web/core/modules/path_alias/tests/src/Kernel/AliasTest.php @@ -179,7 +179,6 @@ public function testWhitelistCacheDeletionMidRequest() { // Create AliasManager and Path object. $whitelist = new AliasWhitelist('path_alias_whitelist', $memoryCounterBackend, $this->container->get('lock'), $this->container->get('state'), $this->container->get('path_alias.repository')); - $aliasManager = new AliasManager($this->container->get('path_alias.repository'), $whitelist, $this->container->get('language_manager'), $memoryCounterBackend); // Whitelist cache should not exist at all yet. $this->assertFalse($memoryCounterBackend->get('path_alias_whitelist')); diff --git a/web/core/modules/search/src/SearchQuery.php b/web/core/modules/search/src/SearchQuery.php index 6e342ca202c168c5520345d85ffb89aca7bac882..bba7fe9c0379ba72ad234c74b2789c3b3b9d21d9 100644 --- a/web/core/modules/search/src/SearchQuery.php +++ b/web/core/modules/search/src/SearchQuery.php @@ -520,7 +520,7 @@ public function addScore($score, $arguments = [], $multiply = FALSE) { // search expression. So, use string replacement to change this to a // calculated query expression, counting the number of occurrences so // in the execute() method we can add arguments. - while (($pos = strpos($score, 'i.relevance')) !== FALSE) { + while (strpos($score, 'i.relevance') !== FALSE) { $pieces = explode('i.relevance', $score, 2); $score = implode('((ROUND(:normalization_' . $this->relevance_count . ', 4)) * i.score * t.count)', $pieces); $this->relevance_count++; diff --git a/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php b/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php new file mode 100644 index 0000000000000000000000000000000000000000..84771f84955a7d1f23b8fed23f7c8f8c1a8c4d85 --- /dev/null +++ b/web/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestNoBundleWithLabel.php @@ -0,0 +1,28 @@ +<?php + +namespace Drupal\entity_test\Entity; + +/** + * Test entity class with no bundle but with label. + * + * @ContentEntityType( + * id = "entity_test_no_bundle_with_label", + * label = @Translation("Entity Test without bundle but with label"), + * base_table = "entity_test_no_bundle_with_label", + * handlers = { + * "views_data" = "Drupal\views\EntityViewsData" + * }, + * entity_keys = { + * "id" = "id", + * "label" = "name", + * "revision" = "revision_id", + * }, + * admin_permission = "administer entity_test content", + * links = { + * "add-form" = "/entity_test_no_bundle_with_label/add", + * }, + * ) + */ +class EntityTestNoBundleWithLabel extends EntityTest { + +} diff --git a/web/core/modules/system/tests/src/Functional/File/ConfigTest.php b/web/core/modules/system/tests/src/Functional/File/ConfigTest.php index cac94da53ef07e45b3e6b3cc243cb49446f3221e..d3085b3f1be8ef4f5a215bc51e5dc558b54cb029 100644 --- a/web/core/modules/system/tests/src/Functional/File/ConfigTest.php +++ b/web/core/modules/system/tests/src/Functional/File/ConfigTest.php @@ -32,7 +32,6 @@ public function testFileConfigurationPage() { // Set the file paths to non-default values. // The respective directories are created automatically // upon form submission. - $file_path = $this->publicFilesDirectory; $fields = [ 'file_default_scheme' => 'private', ]; diff --git a/web/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php b/web/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php index 5623648c316d7b6aca95de1681c5ddc223b3dfb7..dc04e2ca7fa36e0ab40fda7e773ad830f0778292 100644 --- a/web/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php +++ b/web/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php @@ -24,6 +24,8 @@ class TaxonomyTermReference extends FieldPluginBase { public function getFieldFormatterMap() { return [ 'taxonomy_term_reference_link' => 'entity_reference_label', + 'taxonomy_term_reference_plain' => 'entity_reference_label', + 'taxonomy_term_reference_rss_category' => 'entity_reference_label', 'i18n_taxonomy_term_reference_link' => 'entity_reference_label', 'entityreference_entity_view' => 'entity_reference_entity_view', ]; diff --git a/web/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/web/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index 5a88acea4d8bdbbf7538ef9454771fe99ed07738..621f43d04e3dda6c959a2d6424976d9125c3b591 100644 --- a/web/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/web/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -133,7 +133,9 @@ public function query() { $query = Database::getConnection()->select('taxonomy_term_field_data', 'td'); $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid'); $query->condition('td.vid', array_filter($this->options['vids']), 'IN'); - $query->addTag('taxonomy_term_access'); + if (empty($this->query->options['disable_sql_rewrite'])) { + $query->addTag('taxonomy_term_access'); + } $query->fields('td'); $query->fields('tn', ['nid']); $def['table formula'] = $query; diff --git a/web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php b/web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php index c78a511b3c76e44a908296107ee69d90e6768385..5de4e0a7e174d6837aed13c27a82b2d3d5098fb6 100644 --- a/web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php +++ b/web/core/modules/taxonomy/tests/src/Functional/Views/RelationshipNodeTermDataTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\taxonomy\Functional\Views; use Drupal\views\Views; +use Drupal\views\ViewExecutable; /** * Tests the taxonomy term on node relationship handler. @@ -60,4 +61,52 @@ public function testViewsHandlerRelationshipNodeTermData() { $this->assertIdenticalResultset($view, $expected_result, $column_map); } + /** + * Tests that the 'taxonomy_term_access' tag is added to the Views query. + */ + public function testTag() { + // Change the view to test relation limited by vocabulary. + $this->config('views.view.test_taxonomy_node_term_data') + ->set('display.default.display_options.relationships.term_node_tid.vids', ['views_testing_tags']) + ->save(); + $view = Views::getView('test_taxonomy_node_term_data'); + $this->executeView($view, [$this->term1->id()]); + + // By default, view has taxonomy_term_access tag. + $this->assertQueriesTermAccessTag($view, TRUE); + + // The term_access tag is not set if disable_sql_rewrite is set. + $view = Views::getView('test_taxonomy_node_term_data'); + $display = $view->getDisplay(); + $display_options = $display->getOption('query'); + $display_options['options']['disable_sql_rewrite'] = TRUE; + $display->setOption('query', $display_options); + $view->save(); + $this->executeView($view, [$this->term1->id()]); + + $this->assertQueriesTermAccessTag($view, FALSE); + } + + /** + * Assert views queries have taxonomy_term_access tag. + * + * @param \Drupal\views\ViewExecutable $view + * The View to check for the term access tag. + * @param bool $hasTag + * The expected existence of taxonomy_term_access tag. + */ + protected function assertQueriesTermAccessTag(ViewExecutable $view, $hasTag) { + $main_query = $view->build_info['query']; + $count_query = $view->build_info['count_query']; + + foreach ([$main_query, $count_query] as $query) { + $tables = $query->getTables(); + foreach ($tables as $join_table) { + if (is_object($join_table['table'])) { + $this->assertSame($join_table['table']->hasTag('taxonomy_term_access'), $hasTag); + } + } + } + } + } diff --git a/web/core/scripts/css/compile.js b/web/core/scripts/css/compile.js index 0fe45e8bb706abe8df5f86bfb7d7149d2740576d..1e5a68ce65f30f9b60673a9e735ee8bc86a1aecd 100644 --- a/web/core/scripts/css/compile.js +++ b/web/core/scripts/css/compile.js @@ -12,7 +12,24 @@ module.exports = (filePath, callback) => { // Transform the file. fs.readFile(filePath, (err, css) => { postcss([ - postcssImport(), + postcssImport({ + plugins: [ + // On import, remove the comments from variables.pcss.css so they don't + // appear as useless comments at the top files that import these + // variables. + postcss.plugin('remove-unwanted-comments-from-variables', (options) => { + return css => { + if (css.source.input.file.indexOf('variables.pcss.css') !== -1) { + css.walk(node => { + if (node.type === 'comment') { + node.remove(); + } + }); + } + }; + }), + ], + }), postcssCustomProperties({ // Remove converted properties from the generated code. This needs to be // set to ensure that CSS minifiers don't remove the generated values. diff --git a/web/core/tests/Drupal/Nightwatch/Tests/langcodeTest.js b/web/core/tests/Drupal/Nightwatch/Tests/langcodeTest.js index 7248f2a8a3d92bd968dfb27b265ab2f94f3367df..4fbce176495c0e939b8904f078a8b1c6ce41d2b0 100644 --- a/web/core/tests/Drupal/Nightwatch/Tests/langcodeTest.js +++ b/web/core/tests/Drupal/Nightwatch/Tests/langcodeTest.js @@ -2,7 +2,8 @@ module.exports = { '@tags': ['core'], before(browser) { browser.drupalInstall({ - setupFile: 'core/tests/Drupal/TestSite/TestSiteInstallTestScript.php', + setupFile: + 'core/tests/Drupal/TestSite/TestSiteMultilingualInstallTestScript.php', langcode: 'fr', }); }, diff --git a/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php index ca280d582b0ab0f0b7ac0700087296d1f816d647..cde8dacad80fd955dc4aa1e80596a1e2560de143 100644 --- a/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +++ b/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php @@ -112,6 +112,23 @@ public function testInvalidDateArrays($input, $timezone, $class) { ); } + /** + * Tests DateTimePlus::checkArray(). + * + * @param mixed $array + * Input argument for DateTimePlus::checkArray(). + * @param bool $expected + * The expected result of DateTimePlus::checkArray(). + * + * @dataProvider providerTestCheckArray + */ + public function testCheckArray(array $array, $expected) { + $this->assertSame( + $expected, + DateTimePlus::checkArray($array) + ); + } + /** * Test creating dates from timestamps, and manipulating timezones. * @@ -442,6 +459,30 @@ public function providerTestInvalidDateArrays() { ]; } + /** + * Data provider for testCheckArray. + * + * @return array + * An array of arrays, each containing: + * - 'array' - Input for DateTimePlus::checkArray(). + * - 'expected' - Expected output for DateTimePlus::checkArray(). + * + * @see testCheckArray + */ + public function providerTestCheckArray() { + return [ + 'Date array, date only' => [['year' => 2010, 'month' => 2, 'day' => 28], TRUE], + 'Date array with hour' => [['year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 10], TRUE], + 'One year larger than the documented upper limit of checkdate()' => [['year' => 32768, 'month' => 1, 'day' => 8, 'hour' => 8, 'minute' => 0, 'second' => 0], FALSE], + 'One year smaller than the documented lower limit of checkdate()' => [['year' => 0, 'month' => 1, 'day' => 8, 'hour' => 8, 'minute' => 0, 'second' => 0], FALSE], + 'Invalid month from date array' => [['year' => 2010, 'month' => 27, 'day' => 8, 'hour' => 8, 'minute' => 0, 'second' => 0], FALSE], + 'Invalid hour from date array' => [['year' => 2010, 'month' => 2, 'day' => 28, 'hour' => 80, 'minute' => 0, 'second' => 0], FALSE], + 'Invalid minute from date array.' => [['year' => 2010, 'month' => 7, 'day' => 8, 'hour' => 8, 'minute' => 88, 'second' => 0], FALSE], + 'Missing day' => [['year' => 2059, 'month' => 1, 'second' => 1], FALSE], + 'Zero day' => [['year' => 2059, 'month' => 1, 'day' => 0], FALSE], + ]; + } + /** * Provides data for testDateTimezone. * diff --git a/web/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php b/web/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php index 5fed24ed13ef0fc364824de438853d3957e405a5..50bdc8b519917c88292aa04113041f39cac173cb 100644 --- a/web/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php +++ b/web/core/tests/Drupal/Tests/Component/Utility/UnicodeTest.php @@ -23,15 +23,13 @@ public function testSetStatus() { } /** - * Tests multibyte encoding and decoding. + * Tests multibyte encoding. * * @dataProvider providerTestMimeHeader * @covers ::mimeHeaderEncode - * @covers ::mimeHeaderDecode */ - public function testMimeHeader($value, $encoded) { + public function testMimeHeaderEncode($value, $encoded) { $this->assertEquals($encoded, Unicode::mimeHeaderEncode($value)); - $this->assertEquals($value, Unicode::mimeHeaderDecode($encoded)); } /** @@ -44,9 +42,49 @@ public function testMimeHeader($value, $encoded) { */ public function providerTestMimeHeader() { return [ - ['tést.txt', '=?UTF-8?B?dMOpc3QudHh0?='], - // Simple ASCII characters. - ['ASCII', 'ASCII'], + "Base64 encoding" => ['tést.txt', '=?UTF-8?B?dMOpc3QudHh0?='], + "ASCII characters only" => ['test.txt', 'test.txt'], + ]; + } + + /** + * Tests multibyte decoding. + * + * @dataProvider providerTestMimeHeaderDecode + * @covers ::mimeHeaderDecode + */ + public function testMimeHeaderDecode($value, $encoded) { + $this->assertEquals($value, Unicode::mimeHeaderDecode($encoded)); + } + + /** + * Data provider for testMimeHeaderDecode(). + * + * @return array + * An array containing a string and its encoded value. + */ + public function providerTestMimeHeaderDecode() { + return [ + 'Uppercase base64 encoding' => [ + 'tést.txt', + '=?utf-8?B?dMOpc3QudHh0?=', + ], + 'Uppercase quoted-printable encoding' => [ + 'tést.txt', + '=?UTF-8?Q?t=C3=A9st.txt?=', + ], + 'Lowercase base64 encoding' => [ + 'tést.txt', + '=?utf-8?b?dMOpc3QudHh0?=', + ], + 'Lowercase quoted-printable encoding' => [ + 'tést.txt', + '=?UTF-8?q?t=C3=A9st.txt?=', + ], + 'ASCII characters only' => [ + 'test.txt', + 'test.txt', + ], ]; } diff --git a/web/core/themes/claro/css/base/elements.css b/web/core/themes/claro/css/base/elements.css index 9d17479b876193959a606e2c54430546d33fc11b..6caeda07fb1d0aabfece63043052e4d2d9a982b3 100644 --- a/web/core/themes/claro/css/base/elements.css +++ b/web/core/themes/claro/css/base/elements.css @@ -9,50 +9,6 @@ * Generic elements. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - html { font-family: BlinkMacSystemFont , diff --git a/web/core/themes/claro/css/components/accordion.css b/web/core/themes/claro/css/components/accordion.css index 00092a224487ad84f308d0e1c808c2f2d4caed64..968e5dab837a50d95cc70ddd63d9263e3fec54db 100644 --- a/web/core/themes/claro/css/components/accordion.css +++ b/web/core/themes/claro/css/components/accordion.css @@ -10,50 +10,6 @@ * Accordion styles. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .accordion { color: #222330; border: 1px solid rgba(216, 217, 224, 0.8); diff --git a/web/core/themes/claro/css/components/action-link.css b/web/core/themes/claro/css/components/action-link.css index c76e40f91446d5d4bc0c1071774d89f8302c9cc8..4eb59c835acef7b2b24098c65d77d78d3bbe6375 100644 --- a/web/core/themes/claro/css/components/action-link.css +++ b/web/core/themes/claro/css/components/action-link.css @@ -12,50 +12,6 @@ * Contains Action link component and the action-links layout styles. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Action links layout. */ diff --git a/web/core/themes/claro/css/components/ajax-progress.module.css b/web/core/themes/claro/css/components/ajax-progress.module.css index b17d3e9ec4a337a328c0ec50ff279c59f6ece7f9..e7b098cb43c27f8f6aee76672c47efe91433e1eb 100644 --- a/web/core/themes/claro/css/components/ajax-progress.module.css +++ b/web/core/themes/claro/css/components/ajax-progress.module.css @@ -10,50 +10,6 @@ * Throbber. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .ajax-progress { display: inline-block; } diff --git a/web/core/themes/claro/css/components/autocomplete-loading.module.css b/web/core/themes/claro/css/components/autocomplete-loading.module.css index 4c49059d3e1bec9be8f4d782eb73724086c43c8f..be8328ac410348892a83a85905a26026f1abba1a 100644 --- a/web/core/themes/claro/css/components/autocomplete-loading.module.css +++ b/web/core/themes/claro/css/components/autocomplete-loading.module.css @@ -12,50 +12,6 @@ * @see autocomplete.js */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Since the autocomplete library is attached conditionally and not globally, * we can be 99% sure that the default icon will be used. diff --git a/web/core/themes/claro/css/components/breadcrumb.css b/web/core/themes/claro/css/components/breadcrumb.css index b496acca6775eca92f9f79ff1e965994d241103a..1a15aebe8bfc3f6f15c609254ffe3ff8a5dfabda 100644 --- a/web/core/themes/claro/css/components/breadcrumb.css +++ b/web/core/themes/claro/css/components/breadcrumb.css @@ -10,50 +10,6 @@ * Breadcrumbs. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .breadcrumb { padding: 0; color: #222330; diff --git a/web/core/themes/claro/css/components/button.css b/web/core/themes/claro/css/components/button.css index 8594ae4390c9f72833c71d5c91307d55e3763f96..cfb6a50d02842ab5e3c3b3e34a77fcaf05b21c3e 100644 --- a/web/core/themes/claro/css/components/button.css +++ b/web/core/themes/claro/css/components/button.css @@ -12,50 +12,6 @@ * Apply these classes to button elements (<button>, <input type="button" />). */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Buttons. * diff --git a/web/core/themes/claro/css/components/card.css b/web/core/themes/claro/css/components/card.css index 533f019841687d1a59b261a3829903334079a07f..e859249008a5407d7e1d8ad76eabedd4f75e615c 100644 --- a/web/core/themes/claro/css/components/card.css +++ b/web/core/themes/claro/css/components/card.css @@ -10,50 +10,6 @@ * Card. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .card { display: flex; flex-direction: column; diff --git a/web/core/themes/claro/css/components/content-header.css b/web/core/themes/claro/css/components/content-header.css index 47ae19d73fbcddf71f589472128848ec018e61a8..05f31281e97a43febf5f2c7b17b18978fd5a69d9 100644 --- a/web/core/themes/claro/css/components/content-header.css +++ b/web/core/themes/claro/css/components/content-header.css @@ -9,50 +9,6 @@ * Content header. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .content-header { overflow: hidden; margin-bottom: 0.75rem; diff --git a/web/core/themes/claro/css/components/details.css b/web/core/themes/claro/css/components/details.css index a36ce5dd2a162b8374d0403acc89fd3e6887cac1..556c25c728f34e682430412b9079d24b4610c610 100644 --- a/web/core/themes/claro/css/components/details.css +++ b/web/core/themes/claro/css/components/details.css @@ -12,50 +12,6 @@ * @see collapse.js */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Available modifiers are: * - .claro-details--accordion diff --git a/web/core/themes/claro/css/components/divider.css b/web/core/themes/claro/css/components/divider.css index 2bd585d19026e06b0f69a7fc1eca56fbc2df64c2..247e6ab34ef50328f301f88d7dfb675b3a06ce78 100644 --- a/web/core/themes/claro/css/components/divider.css +++ b/web/core/themes/claro/css/components/divider.css @@ -9,50 +9,6 @@ * Divider. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .divider { height: 1px; background-color: rgba(142, 146, 156, 0.5); diff --git a/web/core/themes/claro/css/components/dropbutton.css b/web/core/themes/claro/css/components/dropbutton.css index 6c1c90aa790f02f80e3fb6e6505324be52e8a8d2..05a22b046860e5dea6d973d2700795985050001d 100644 --- a/web/core/themes/claro/css/components/dropbutton.css +++ b/web/core/themes/claro/css/components/dropbutton.css @@ -14,50 +14,6 @@ * contrast mode Firefox. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /** * Dropbutton diff --git a/web/core/themes/claro/css/components/entity-meta.css b/web/core/themes/claro/css/components/entity-meta.css index 6245dea4db96f2ff77ad0c8205ab1c1738fe72a4..eb5bee4553829887e0ba948d8491bfb0aab885b9 100644 --- a/web/core/themes/claro/css/components/entity-meta.css +++ b/web/core/themes/claro/css/components/entity-meta.css @@ -10,50 +10,6 @@ * Entity meta. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .entity-meta__header { padding: 0.5rem 1rem 1rem; color: #222330; diff --git a/web/core/themes/claro/css/components/fieldset.css b/web/core/themes/claro/css/components/fieldset.css index 06329f359349e4dfc7c61bc1937e377e7e3faebd..e228680ed7f1fbbcdfae987ae56ea2c8aa5ae6d0 100644 --- a/web/core/themes/claro/css/components/fieldset.css +++ b/web/core/themes/claro/css/components/fieldset.css @@ -10,50 +10,6 @@ * Fieldset styles. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .fieldset { min-width: 0; margin: 1rem 0; diff --git a/web/core/themes/claro/css/components/file.css b/web/core/themes/claro/css/components/file.css index 30d5f44cf173a318155e74d6391d82748d260d72..0311964cdf017996bb1fdc7ab9eee047de337b21 100644 --- a/web/core/themes/claro/css/components/file.css +++ b/web/core/themes/claro/css/components/file.css @@ -10,50 +10,6 @@ * Extends styles of the file link. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .file { min-height: 1.0625rem; padding-left: 1.5rem; /* LTR */ diff --git a/web/core/themes/claro/css/components/form--checkbox-radio--ie.css b/web/core/themes/claro/css/components/form--checkbox-radio--ie.css index 77aa8b72411d3bee22657040cd5118cf66f08f5a..a516e5a5829d700fcdd4c048a6185a48e498669a 100644 --- a/web/core/themes/claro/css/components/form--checkbox-radio--ie.css +++ b/web/core/themes/claro/css/components/form--checkbox-radio--ie.css @@ -10,50 +10,6 @@ * Checkbox and radio input elements styles for IE11 and below. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .form-boolean::-ms-check { display: inline-block; box-sizing: border-box; diff --git a/web/core/themes/claro/css/components/form--checkbox-radio.css b/web/core/themes/claro/css/components/form--checkbox-radio.css index ff7aa40edabcb2d429ec081e0bb440262cba16ef..8ee90532b64b73948e683ba64e051fba078afce8 100644 --- a/web/core/themes/claro/css/components/form--checkbox-radio.css +++ b/web/core/themes/claro/css/components/form--checkbox-radio.css @@ -10,50 +10,6 @@ * Checkbox and radio input elements. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Form item modifiers. */ diff --git a/web/core/themes/claro/css/components/form--field-multiple.css b/web/core/themes/claro/css/components/form--field-multiple.css index 67f9110a576d581b8bec0fe4dcbf1f841a2c6ece..8502d6ec4c525c29dd90348b375151b37e74c189 100644 --- a/web/core/themes/claro/css/components/form--field-multiple.css +++ b/web/core/themes/claro/css/components/form--field-multiple.css @@ -10,50 +10,6 @@ * Styles for multiple field tables. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .field-multiple-table { margin-top: 1rem; margin-bottom: 1rem; diff --git a/web/core/themes/claro/css/components/form--managed-file.css b/web/core/themes/claro/css/components/form--managed-file.css index 4fa4b2ea4118325629be78bb98986a19f565acd1..e846d16fcf399a0265825aa1eac84b4fe157a9e1 100644 --- a/web/core/themes/claro/css/components/form--managed-file.css +++ b/web/core/themes/claro/css/components/form--managed-file.css @@ -12,50 +12,6 @@ * This includes the styles for the file widgets and the image widgets. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * The root element of the file/image widget. */ diff --git a/web/core/themes/claro/css/components/form--password-confirm.css b/web/core/themes/claro/css/components/form--password-confirm.css index 304b1b702ef3bccc978c8ccde7b75e93aed6273c..5caa69a07ab09632347ec93057c841d56a4d48bf 100644 --- a/web/core/themes/claro/css/components/form--password-confirm.css +++ b/web/core/themes/claro/css/components/form--password-confirm.css @@ -10,50 +10,6 @@ * Visual styles for the Password widgets. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /* Weak */ /* Fair */ diff --git a/web/core/themes/claro/css/components/form--select.css b/web/core/themes/claro/css/components/form--select.css index 989ed67d32c1198ef4b5bc653c77c7e1e38f271e..bb1036155f55a6eb755cf9778aefe12d2ca330c4 100644 --- a/web/core/themes/claro/css/components/form--select.css +++ b/web/core/themes/claro/css/components/form--select.css @@ -10,50 +10,6 @@ * Select input elements. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .form-element--type-select { padding-right: calc(2rem - 1px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke-width='1.5' d='M1 1L7 7L13 1' stroke='%23545560'/%3E%3C/svg%3E%0A"); diff --git a/web/core/themes/claro/css/components/form--text.css b/web/core/themes/claro/css/components/form--text.css index f7c7923296c3b14fdcf924ea136b055ca966bfca..86948a5d07ca11ffd60c06f6bafba4526f2ca6fb 100644 --- a/web/core/themes/claro/css/components/form--text.css +++ b/web/core/themes/claro/css/components/form--text.css @@ -10,50 +10,6 @@ * Text and textarea input elements. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .form-element { box-sizing: border-box; max-width: 100%; diff --git a/web/core/themes/claro/css/components/form.css b/web/core/themes/claro/css/components/form.css index ac3f76feab3d4f3dc008604c931ac9a03ee32675..82c4619368d5f6f664cadde65ad06461262d532f 100644 --- a/web/core/themes/claro/css/components/form.css +++ b/web/core/themes/claro/css/components/form.css @@ -10,50 +10,6 @@ * Main form and form item styles. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :-ms-input-placeholder { color: #8e929c; } diff --git a/web/core/themes/claro/css/components/image-preview.css b/web/core/themes/claro/css/components/image-preview.css index 3d1a03f53c8df0d6403a4806480aa3a94af72f02..965c02e3ddb19090928f37adfe42ec291fabd367 100644 --- a/web/core/themes/claro/css/components/image-preview.css +++ b/web/core/themes/claro/css/components/image-preview.css @@ -10,50 +10,6 @@ * Image preview component. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Image preview. */ diff --git a/web/core/themes/claro/css/components/jquery.ui/theme.css b/web/core/themes/claro/css/components/jquery.ui/theme.css index a24a1af1ed6adeaf0522a965e9f7e28564733614..abb365dc914f2a6abf49796b3831c7f7a3eb61a8 100644 --- a/web/core/themes/claro/css/components/jquery.ui/theme.css +++ b/web/core/themes/claro/css/components/jquery.ui/theme.css @@ -11,50 +11,6 @@ * Overrides /core/assets/vendor/jquery.ui/themes/base/theme.css. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Component containers */ diff --git a/web/core/themes/claro/css/components/messages.css b/web/core/themes/claro/css/components/messages.css index 76985ea47415f249993bc14f9a628e0ac3d115bb..f02aecb611fb95c4572743d3651b742bc751674e 100644 --- a/web/core/themes/claro/css/components/messages.css +++ b/web/core/themes/claro/css/components/messages.css @@ -12,50 +12,6 @@ * has been resolved. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .messages-list { margin-top: 2.5rem; margin-bottom: 2.5rem; diff --git a/web/core/themes/claro/css/components/page-title.css b/web/core/themes/claro/css/components/page-title.css index 959a33edcaf3b1e0f1de2891fce665258f819b9b..590d0fa2e36901929f296c8a1241249bc4eaa56e 100644 --- a/web/core/themes/claro/css/components/page-title.css +++ b/web/core/themes/claro/css/components/page-title.css @@ -10,50 +10,6 @@ * Page title. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .block-page-title-block { margin-bottom: 0.75rem; } diff --git a/web/core/themes/claro/css/components/pager.css b/web/core/themes/claro/css/components/pager.css index 8af345573b84a8bada636cacc3fd47d4e0299c74..23225581f43191cf88b57987c11fca2e82338566 100644 --- a/web/core/themes/claro/css/components/pager.css +++ b/web/core/themes/claro/css/components/pager.css @@ -10,50 +10,6 @@ * Styles for Claro's Pagination. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /** * Pager. diff --git a/web/core/themes/claro/css/components/progress.css b/web/core/themes/claro/css/components/progress.css index 4e86569a9d8266418d4b9c123e672bbf968470ba..69f23f382f9cc54e11c07b9d0d8d9b5323474f97 100644 --- a/web/core/themes/claro/css/components/progress.css +++ b/web/core/themes/claro/css/components/progress.css @@ -12,50 +12,6 @@ * @see progress.js */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .progress::after { display: table; clear: both; diff --git a/web/core/themes/claro/css/components/shortcut.css b/web/core/themes/claro/css/components/shortcut.css index a77f8697d483b6ceab62d6f66e62c07df05bb7b2..811c6e813dd03a1bd7a6ffc170fdc7d095b15f77 100644 --- a/web/core/themes/claro/css/components/shortcut.css +++ b/web/core/themes/claro/css/components/shortcut.css @@ -10,50 +10,6 @@ * Styling for the shortcut module. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /** * Shortcut action. diff --git a/web/core/themes/claro/css/components/system-admin--admin-list.css b/web/core/themes/claro/css/components/system-admin--admin-list.css index 1a8b935fedda2cec3b6678f5af2275a15a2af63c..4bce6e4b9c821bdd0adb88f6021feb7d61f5b1b4 100644 --- a/web/core/themes/claro/css/components/system-admin--admin-list.css +++ b/web/core/themes/claro/css/components/system-admin--admin-list.css @@ -10,50 +10,6 @@ * Admin list and admin item modules. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Admin list (wrapper of admin items). */ diff --git a/web/core/themes/claro/css/components/system-admin--panel.css b/web/core/themes/claro/css/components/system-admin--panel.css index 5fee5d9361af8383913cfa45947822c87f3ab145..025c5810a3ddff9f6615c53fcb107cd52072a18d 100644 --- a/web/core/themes/claro/css/components/system-admin--panel.css +++ b/web/core/themes/claro/css/components/system-admin--panel.css @@ -10,50 +10,6 @@ * System admin module: Panel styling. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .panel { margin-top: 1em; margin-bottom: 3em; diff --git a/web/core/themes/claro/css/components/table--file-multiple-widget.css b/web/core/themes/claro/css/components/table--file-multiple-widget.css index 4f3f3558b6fcbaef49579b3504c23e39c3e7bbac..38cc7234093084ac60b5e15f42707afb2571192a 100644 --- a/web/core/themes/claro/css/components/table--file-multiple-widget.css +++ b/web/core/themes/claro/css/components/table--file-multiple-widget.css @@ -10,50 +10,6 @@ * Styles for multiple file widget table. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .table-file-multiple-widget tbody { vertical-align: top; } diff --git a/web/core/themes/claro/css/components/tabledrag.css b/web/core/themes/claro/css/components/tabledrag.css index bf968f446a16b22a600b85327e8acb29fdd1632e..e3d01f24ee13d2990f2d2edf1c55f3fa35a6a56e 100644 --- a/web/core/themes/claro/css/components/tabledrag.css +++ b/web/core/themes/claro/css/components/tabledrag.css @@ -15,50 +15,6 @@ * @see tabledrag.js */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - body.drag { cursor: move; } diff --git a/web/core/themes/claro/css/components/tables.css b/web/core/themes/claro/css/components/tables.css index 8996753aff64ca216add53930e71582728bb23d7..e7c8dd62321af6b5e6ec442d05126ded203b452d 100644 --- a/web/core/themes/claro/css/components/tables.css +++ b/web/core/themes/claro/css/components/tables.css @@ -10,50 +10,6 @@ * Claro styles for Tables. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - table { width: 100%; margin-top: 1.5rem; diff --git a/web/core/themes/claro/css/components/tableselect.css b/web/core/themes/claro/css/components/tableselect.css index 0f6bf1e402544a59848922abccf62fa62acafb06..9fed12185a6982595919da8c9e9de69cd25a139a 100644 --- a/web/core/themes/claro/css/components/tableselect.css +++ b/web/core/themes/claro/css/components/tableselect.css @@ -12,50 +12,6 @@ * @see tableselect.js */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - td.checkbox, th.checkbox { text-align: center; diff --git a/web/core/themes/claro/css/components/tabs.css b/web/core/themes/claro/css/components/tabs.css index 969feff8594191562e708890cdb0345076659a85..14b26b1d03a0892ae48f2da30887a937dec6b26b 100644 --- a/web/core/themes/claro/css/components/tabs.css +++ b/web/core/themes/claro/css/components/tabs.css @@ -9,50 +9,6 @@ * Tabs. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /** * Tabs. diff --git a/web/core/themes/claro/css/components/vertical-tabs.css b/web/core/themes/claro/css/components/vertical-tabs.css index 9ef276898513d7ff642b0e5d1337845be3d90343..b55f177a0e1b02a236b384705e3db903359b99d1 100644 --- a/web/core/themes/claro/css/components/vertical-tabs.css +++ b/web/core/themes/claro/css/components/vertical-tabs.css @@ -12,50 +12,6 @@ * Replaces /core/misc/vertical-tabs.css. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Main wrapper of vertical tabs. * This wrapper div is added by JavaScript. diff --git a/web/core/themes/claro/css/components/views-exposed-form.css b/web/core/themes/claro/css/components/views-exposed-form.css index 1ba2cc82a0f1ddd6a1ebb65581a1eb545d560d57..4aace8f7527a45f43c9ec3f4bdfe2ec89800edc9 100644 --- a/web/core/themes/claro/css/components/views-exposed-form.css +++ b/web/core/themes/claro/css/components/views-exposed-form.css @@ -10,50 +10,6 @@ * Visual styles for views exposed form. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Use flexbox and some margin resets to make the fields + actions go inline. * diff --git a/web/core/themes/claro/css/layout/breadcrumb.css b/web/core/themes/claro/css/layout/breadcrumb.css index d87cb095b781f0cc4eb605e6e561f992b78e1d66..f2dc4c79a21d8d3e8977d3bde5818676cda3e382 100644 --- a/web/core/themes/claro/css/layout/breadcrumb.css +++ b/web/core/themes/claro/css/layout/breadcrumb.css @@ -10,50 +10,6 @@ * Breadcrumb region. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .region-breadcrumb { min-height: 1.25rem; } diff --git a/web/core/themes/claro/css/layout/card-list.css b/web/core/themes/claro/css/layout/card-list.css index 5e67aadb3d937deea4205d92246fac9ebd4755ae..40eeba401f2ff164059db8769900d0c02296a665 100644 --- a/web/core/themes/claro/css/layout/card-list.css +++ b/web/core/themes/claro/css/layout/card-list.css @@ -10,50 +10,6 @@ * Cards list. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - :root { /* Using 100% as base causes issues in IE11. */ } diff --git a/web/core/themes/claro/css/layout/local-actions.css b/web/core/themes/claro/css/layout/local-actions.css index 38786c74a4d2955c0ab6b89affb83957a04292bd..2b7eb3ef85357d2ac0e28f584cae3db2c6239be5 100644 --- a/web/core/themes/claro/css/layout/local-actions.css +++ b/web/core/themes/claro/css/layout/local-actions.css @@ -10,50 +10,6 @@ * Layout styles for local actions. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Action link layout styles. */ diff --git a/web/core/themes/claro/css/layout/node-add.css b/web/core/themes/claro/css/layout/node-add.css index b92d66f7fbbdcaa759e0717e68e647004e6a648c..13d3003a199731eccc95b7e136748010a6e1b8ab 100644 --- a/web/core/themes/claro/css/layout/node-add.css +++ b/web/core/themes/claro/css/layout/node-add.css @@ -9,50 +9,6 @@ * Layout overrides for node add/edit form. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .layout-region-node-footer__content { margin-top: 1.5em; } diff --git a/web/core/themes/claro/css/theme/ckeditor-dialog.css b/web/core/themes/claro/css/theme/ckeditor-dialog.css index 7772914c29ff0f12ce13bfe891e7da19c70681eb..12c71ab0d79a9d68a49fddc9a3e764b98a59ee25 100644 --- a/web/core/themes/claro/css/theme/ckeditor-dialog.css +++ b/web/core/themes/claro/css/theme/ckeditor-dialog.css @@ -10,50 +10,6 @@ * CKEditor-native dialogs theming. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .cke_dialog_background_cover { display: none; } diff --git a/web/core/themes/claro/css/theme/ckeditor-editor.css b/web/core/themes/claro/css/theme/ckeditor-editor.css index 8fad4a5f7d9b2893d4fd64a2b79082cd6dc3d0f7..815c03d90089eca89bfe50459753b13bb1b6012e 100644 --- a/web/core/themes/claro/css/theme/ckeditor-editor.css +++ b/web/core/themes/claro/css/theme/ckeditor-editor.css @@ -8,49 +8,6 @@ * @file * CKEditor appearance overrides. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} :root { /* 1px */ /* Inner border size must be based on chrome border size. */ /* 1px */ /* Inner border radius must be based on chrome border radius and size. */ diff --git a/web/core/themes/claro/css/theme/ckeditor-frame.css b/web/core/themes/claro/css/theme/ckeditor-frame.css index d31034199232c667ac85cd0904afa23d98ca883d..cc0c24930c0e3ffeda24b18d9540cf44a8ffebd5 100644 --- a/web/core/themes/claro/css/theme/ckeditor-frame.css +++ b/web/core/themes/claro/css/theme/ckeditor-frame.css @@ -10,50 +10,6 @@ * CKEditor frame styles. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - .cke_editable:not(.cke_editable_inline) { margin: 1em calc(1em - 2px); } diff --git a/web/core/themes/claro/css/theme/field-ui.admin.css b/web/core/themes/claro/css/theme/field-ui.admin.css index 9ab712aa5b5185b4d4285fd15b986d6aa4ad4408..848eed52d0c0529e829d99c60cc73ca7f3cae74e 100644 --- a/web/core/themes/claro/css/theme/field-ui.admin.css +++ b/web/core/themes/claro/css/theme/field-ui.admin.css @@ -10,50 +10,6 @@ * Replacement styles for Field UI admin. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /* 'Manage fields' and 'Manage display' overviews */ .field-ui-overview .region-title td { diff --git a/web/core/themes/claro/css/theme/filter.theme.css b/web/core/themes/claro/css/theme/filter.theme.css index 1b1f503c869b5779517b01ecd43734dbb4f6ab46..7ad0b201ddd4ca8b7ac0f20ab56876795b3298a6 100644 --- a/web/core/themes/claro/css/theme/filter.theme.css +++ b/web/core/themes/claro/css/theme/filter.theme.css @@ -10,50 +10,6 @@ * Styling for the Filter module. */ -:root { - /* - * Color Palette. - */ - /* Secondary. */ - /* Variations. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 10% darker than base. */ /* 20% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ /* 5% darker than base. */ /* 10% darker than base. */ - /* - * Base. - */ - /* - * Typography. - */ /* 1rem = 16px if font root is 100% ands browser defaults are used. */ /* ~32px */ /* ~29px */ /* ~26px */ /* ~23px */ /* ~20px */ /* 18px */ /* ~14px */ /* ~13px */ /* ~11px */ - /** - * Spaces. - */ /* 3 * 16px = 48px */ /* 1.5 * 16px = 24px */ /* 1 * 16px = 16px */ /* 0.75 * 16px = 12px */ /* 0.5 * 16px = 8px */ - /* - * Common. - */ - /* - * Inputs. - */ /* Absolute zero with opacity. */ /* Davy's grey with 0.6 opacity. */ /* Light gray with 0.3 opacity on white bg. */ /* Old silver with 0.5 opacity on white bg. */ /* (1/8)em ~ 2px */ /* (1/16)em ~ 1px */ /* Font size is too big to use 1rem for extrasmall line-height */ /* 7px inside the form element label. */ /* 8px with the checkbox width of 19px */ - /* - * Details. - */ - /** - * Buttons. - */ - /** - * jQuery.UI dropdown. - */ /* Light gray with 0.8 opacity. */ /* Text color with 0.1 opacity. */ - /** - * Progress bar. - */ - /** - * Tabledrag icon size. - */ /* 17px */ - /** - * Ajax progress. - */ - /** - * Breadcrumb. - */ -} - /** * Filter information under field. */