diff --git a/core/modules/user/css/user.admin.css b/core/modules/user/css/user.admin.css new file mode 100644 index 0000000000000000000000000000000000000000..09387a3e6d94b59662eed54587695a885f1cb05f --- /dev/null +++ b/core/modules/user/css/user.admin.css @@ -0,0 +1,24 @@ +/** + * @file + * Admin styling for the User module. + */ + +#permissions td.module { + font-weight: bold; +} +#permissions td.permission { + padding-left: 1.5em; /* LTR */ +} +[dir="rtl"] #permissions td.permission { + padding-left: 0; + padding-right: 1.5em; +} +#permissions tr.odd .form-item, +#permissions tr.even .form-item { + white-space: normal; +} + +#user-admin-settings .details-description { + font-size: 0.85em; + padding-bottom: .5em; +} diff --git a/core/modules/user/css/user.module.css b/core/modules/user/css/user.module.css index 8a03bdb20b0c1e9e47f5832a381a4e0909eb8ced..869d0168949b97d0bc326d6d43fee24207de3ee9 100644 --- a/core/modules/user/css/user.module.css +++ b/core/modules/user/css/user.module.css @@ -1,22 +1,3 @@ -#permissions td.module { - font-weight: bold; -} -#permissions td.permission { - padding-left: 1.5em; /* LTR */ -} -[dir="rtl"] #permissions td.permission { - padding-left: 0; - padding-right: 1.5em; -} -#permissions tr.odd .form-item, -#permissions tr.even .form-item { - white-space: normal; -} -#user-admin-settings .details-description { - font-size: 0.85em; - padding-bottom: .5em; -} - /** * Password strength indicator. */ diff --git a/core/modules/user/src/AccountSettingsForm.php b/core/modules/user/src/AccountSettingsForm.php index 28f9b7b9f22f0d384d7cd3a5876c8d42c80e1192..bce6a6064f7e87c19027b32fe2a25cd31b1597bb 100644 --- a/core/modules/user/src/AccountSettingsForm.php +++ b/core/modules/user/src/AccountSettingsForm.php @@ -65,6 +65,8 @@ public function buildForm(array $form, FormStateInterface $form_state) { $mail_config = $this->config('user.mail'); $site_config = $this->config('system.site'); + $form['#attached']['library'][] = 'user/drupal.user.admin'; + // Settings for anonymous users. $form['anonymous_settings'] = array( '#type' => 'details', diff --git a/core/modules/user/user.libraries.yml b/core/modules/user/user.libraries.yml index c32a17165fb685edf9c974fd4720a4ef5dbd76a7..037023a6fbcd5cea3c968dc463523c2c7d44fb59 100644 --- a/core/modules/user/user.libraries.yml +++ b/core/modules/user/user.libraries.yml @@ -10,6 +10,12 @@ drupal.user: - core/drupal - core/jquery.once +drupal.user.admin: + version: VERSION + css: + theme: + css/user.admin.css: {} + drupal.user.permissions: version: VERSION js: @@ -19,6 +25,7 @@ drupal.user.permissions: - core/jquery.once - core/drupal - core/drupalSettings + - user/drupal.user.admin drupal.user.icons: version: VERSION diff --git a/core/modules/user/user.module b/core/modules/user/user.module index c2037de051bba52064510ed4d852b84cf14c2dfe..9c49486f6c87ce379b56efcd2e05a6ff16882531 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -107,14 +107,6 @@ function user_theme() { ); } -/** - * Implements hook_page_attachments(). - */ -function user_page_attachments(array &$page) { - $path = drupal_get_path('module', 'user'); - $page['#attached']['css'][$path . '/css/user.module.css'] = array('every_page' => TRUE); -} - /** * Implements hook_js_alter(). */