Skip to content
Snippets Groups Projects
Commit 1e3f117c authored by git's avatar git Committed by Andrey Troeglazov
Browse files

Issue #2837413 by sasanikolic, aleanna, demonde, andrey.troeglazov: Remove...

Issue #2837413 by sasanikolic, aleanna, demonde, andrey.troeglazov: Remove Google Fonts or make them optional
parent abd2b542
No related branches found
No related tags found
1 merge request!10Auto complete Hover style changes
......@@ -4,6 +4,12 @@ global-styling:
base:
css/adminimal.css: {}
google-fonts:
version: VERSION
css:
base:
css/adminimal_fonts.css: {}
custom-styling:
version: VERSION
css:
......
disable_google_fonts: FALSE
......@@ -24,6 +24,10 @@ function adminimal_theme_preprocess_html(&$variables) {
if (theme_get_setting('custom_css')) {
$variables['#attached']['library'][] = 'adminimal_theme/custom-styling';
}
// Add Open Sans font styles based on the theme setting.
if (!theme_get_setting('disable_google_fonts')) {
$variables['#attached']['library'][] = 'adminimal_theme/google-fonts';
}
}
/**
......@@ -109,4 +113,17 @@ function adminimal_theme_form_system_theme_settings_alter(&$form, \Drupal\Core\F
],
];
}
$form['adminimal_theme_settings'] = [
'#type' => 'details',
'#title' => t('Adminimal theme settings'),
'#open' => TRUE,
];
$form['adminimal_theme_settings']['disable_google_fonts'] = [
'#type' => 'checkbox',
'#title' => t('Avoid using "Open Sans" font'),
'#default_value' => theme_get_setting('disable_google_fonts'),
'#description' => t('Useful for languages that are not well supported by the "Open sans" font. Like Japanese for example.'),
];
}
/* Adminimal Theme overrides file. All selectors must start with ".adminimal" */
/* Import the Open Sans webfont from Google CDN */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRsxEYwM7FgeyaSgU71cLG0.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/uYKcPVoh6c5R0NpdEY5A-Q.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNShsxEYwM7FgeyaSgU71cLG0.woff) format('woff');
}
/*html {
zoom: 1.1;
}*/
......@@ -29,10 +9,6 @@
zoom: 0.9;
}*/
body.adminimal {
font: normal 81.3%/1.538em "Open Sans", sans-serif;
}
.adminimal .page-title,
.adminimal .heading-a {
color: #fff;
......@@ -424,10 +400,6 @@ body.adminimal {
margin-bottom: 0.3em;
}
.adminimal .toolbar {
font-family: "Open Sans";
}
.adminimal.toolbar-fixed.toolbar-vertical {
padding-top: 32px !important;
}
......
/* Import the Open Sans webfont from Google CDN */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTRsxEYwM7FgeyaSgU71cLG0.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/uYKcPVoh6c5R0NpdEY5A-Q.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(https://themes.googleusercontent.com/static/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNShsxEYwM7FgeyaSgU71cLG0.woff) format('woff');
}
body.adminimal {
font: normal 81.3%/1.538em "Open Sans", sans-serif;
}
.adminimal .toolbar {
font-family: "Open Sans";
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment