diff --git a/core/modules/color/color.js b/core/modules/color/color.js index 62eab38..f5be4c3 100644 --- a/core/modules/color/color.js +++ b/core/modules/color/color.js @@ -11,7 +11,7 @@ attach: function (context, settings) { var i, j, colors; // This behavior attaches by ID, so is only valid once on a page. - var form = $(context).find('#system-theme-settings .color-form').once('color'); + var form = $(context).find('#system-theme-settings [data-drupal-color-form]').once('color'); if (form.length === 0) { return; } diff --git a/core/modules/color/templates/color-scheme-form.html.twig b/core/modules/color/templates/color-scheme-form.html.twig index 694c6f7..bbe4cdf 100644 --- a/core/modules/color/templates/color-scheme-form.html.twig +++ b/core/modules/color/templates/color-scheme-form.html.twig @@ -15,9 +15,9 @@ * @ingroup themeable */ #} -
+
{{ form.scheme }} -
+
{{ form.palette }}
{{ form|without('scheme', 'palette') }} diff --git a/core/themes/classy/templates/color-scheme-form.html.twig b/core/themes/classy/templates/color-scheme-form.html.twig new file mode 100644 index 0000000..aa66f8c --- /dev/null +++ b/core/themes/classy/templates/color-scheme-form.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Default theme implementation for a theme's color form. + * + * Available variables: + * - form: Form elements for the color scheme form, including: + * - scheme: A color scheme form element. For example: a select element with + * color theme presets, or a color picker widget. + * - palette: Color fields that can be changed by entering in a new hex value. + * - html_preview: A HTML preview of the theme's current color scheme. + * + * @see template_preprocess_color_scheme_form() + * + * @ingroup themeable + */ +#} +
+ {{ form.scheme }} +
+ {{ form.palette }} +
+ {{ form|without('scheme', 'palette') }} +

{{ 'Preview'|t }}

+ {{ html_preview }} +