From e736ee51c463e0d12326330f8b58cc0d9455dfae Mon Sep 17 00:00:00 2001 From: Drazen Musa Date: Mon, 8 Jun 2026 08:06:26 +0200 Subject: [PATCH] Add maxlength to 255 on font selectors. Fixes: #821 --- features/sooper-fonts/fonts-theme-settings.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/features/sooper-fonts/fonts-theme-settings.inc b/features/sooper-fonts/fonts-theme-settings.inc index 765683ad..c0a72a0d 100755 --- a/features/sooper-fonts/fonts-theme-settings.inc +++ b/features/sooper-fonts/fonts-theme-settings.inc @@ -105,6 +105,7 @@ function fonts_theme_settings(array &$form, $theme) { $form['dxpr_theme_settings']['fonts']['body_font_face_selector'] = [ '#type' => 'textfield', '#title' => t('CSS Selector'), + '#maxlength' => 255, '#ai_description' => 'CSS selector where the body font applies. Default body covers everything. Rarely needs changing unless you want body font only on specific elements.', '#default_value' => ((theme_get_setting('body_font_face_selector') !== NULL)) ? theme_get_setting('body_font_face_selector') : 'body', ]; @@ -120,6 +121,7 @@ function fonts_theme_settings(array &$form, $theme) { $form['dxpr_theme_settings']['fonts']['headings_font_face_selector'] = [ '#type' => 'textfield', '#title' => t('CSS Selector'), + '#maxlength' => 255, '#ai_description' => 'CSS selector for headings font. Default covers h1-h6, display classes, labels, and page title. Extend to add custom heading classes.', '#default_value' => ((theme_get_setting('headings_font_face_selector') !== NULL)) ? theme_get_setting('headings_font_face_selector') : 'h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6,.display-1,.display-2,.display-3,.display-4,.display-5,.display-6,label,.field--label,.page-title', ]; @@ -135,6 +137,7 @@ function fonts_theme_settings(array &$form, $theme) { $form['dxpr_theme_settings']['fonts']['nav_font_face_selector'] = [ '#type' => 'textfield', '#title' => t('CSS Selector'), + '#maxlength' => 255, '#ai_description' => 'CSS selector for navigation font. Default .dxpr-theme-header .nav targets the main menu.', '#default_value' => ((theme_get_setting('nav_font_face_selector') !== NULL)) ? theme_get_setting('nav_font_face_selector') : '.dxpr-theme-header .nav', ]; @@ -150,6 +153,7 @@ function fonts_theme_settings(array &$form, $theme) { $form['dxpr_theme_settings']['fonts']['sitename_font_face_selector'] = [ '#type' => 'textfield', '#title' => t('CSS Selector'), + '#maxlength' => 255, '#ai_description' => 'CSS selector for site name font. Default covers .site-name and .navbar-brand.', '#default_value' => ((theme_get_setting('sitename_font_face_selector') !== NULL)) ? theme_get_setting('sitename_font_face_selector') : '.site-name, .navbar-brand', ]; @@ -165,6 +169,7 @@ function fonts_theme_settings(array &$form, $theme) { $form['dxpr_theme_settings']['fonts']['blockquote_font_face_selector'] = [ '#type' => 'textfield', '#title' => t('CSS Selector'), + '#maxlength' => 255, '#ai_description' => 'CSS selector for blockquote font. Default covers blockquote and blockquote p elements.', '#default_value' => ((theme_get_setting('blockquote_font_face_selector') !== NULL)) ? theme_get_setting('blockquote_font_face_selector') : 'blockquote, blockquote p', ];