Skip to content
Snippets Groups Projects
Unverified Commit dfdf93cb authored by Kris Booghmans's avatar Kris Booghmans
Browse files

Fix css and js issues.

parent 9fdf07c4
No related branches found
No related tags found
1 merge request!4Resolve #3473023 "Fix the issues"
Pipeline #424806 passed with warnings
......@@ -8,8 +8,8 @@
.admin-toolbar__header.navigation-extra--env {
color: var(--env-color);
background-color: var(--env-background);
border-radius: var(--admin-toolbar-space-8);
background-color: var(--env-background);
}
.admin-toolbar__header.navigation-extra--env .admin-toolbar__logo svg rect {
......@@ -20,9 +20,12 @@
fill: var(--env-color);
}
.admin-toolbar__header.navigation-extra--env .toolbar-button.toolbar-button--icon--navigation-version,
.admin-toolbar__header.navigation-extra--env .toolbar-button.toolbar-button--icon--navigation-version.current,
.admin-toolbar__header.navigation-extra--env .toolbar-button.toolbar-button--icon--navigation-version.current.is-active {
.admin-toolbar__header.navigation-extra--env
.toolbar-button.toolbar-button--icon--navigation-version,
.admin-toolbar__header.navigation-extra--env
.toolbar-button.toolbar-button--icon--navigation-version.current,
.admin-toolbar__header.navigation-extra--env
.toolbar-button.toolbar-button--icon--navigation-version.current.is-active {
color: var(--env-color);
background-color: var(--env-background);
}
......@@ -20,11 +20,11 @@
once(
'navigation-extra--version',
'a.admin-toolbar__logo',
context
context,
).forEach((logo) => {
const doc = document.documentElement;
const version = doc.querySelector(
'a.toolbar-button--icon--navigation-version'
'a.toolbar-button--icon--navigation-version',
);
const listItem = version.parentElement;
......@@ -46,14 +46,14 @@
const styleSheet = document.styleSheets[0];
styleSheet.insertRule(
'a.toolbar-button.toolbar-button--icon--navigation-version::before { content: var(--pseudo-before-content); }',
styleSheet.cssRules.length
styleSheet.cssRules.length,
);
// Hide the version button if collapsed, otherwise it shrinks
// the logo.
styleSheet.insertRule(
'[data-admin-toolbar="collapsed"] a.toolbar-button.toolbar-button--icon--navigation-version { display: none; }',
styleSheet.cssRules.length
styleSheet.cssRules.length,
);
});
}
......@@ -68,15 +68,16 @@
*/
attach: (context) => {
if (context === document) {
const environmentBgColor =
drupalSettings.navigation_extra.environment.background;
const environmentBgColor = drupalSettings.navigation_extra.environment.background;
const environmentColor = drupalSettings.navigation_extra.environment.color;
const environmentColor =
drupalSettings.navigation_extra.environment.color;
once(
'navigation-extra--environment',
'.admin-toolbar__header',
context
context,
).forEach((header) => {
const doc = document.documentElement;
......@@ -86,7 +87,7 @@
// Disable the menu item icon by removing the ::before style.
header.style.setProperty('--env-color', environmentColor);
header.classList.add("navigation-extra--env");
header.classList.add('navigation-extra--env');
});
}
},
......
......@@ -36,7 +36,7 @@ class SettingsForm extends ConfigFormBase {
*/
public function __construct(
ConfigFactoryInterface $configFactory,
protected $typedConfigManager,
protected $typedConfigManager, // @phpstan-ignore-line
protected ModuleHandlerInterface $moduleHandler,
protected NavigationExtraPluginManagerInterface $pluginManager,
protected MenuLinkManagerInterface $menuLinkManager,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment