From 1900ddb58953aa749dd9171bd47da96a9311a5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sun, 22 May 2022 23:14:13 +0200 Subject: [PATCH] variant: fix primary color and avoid sorting of stylesheet #239 --- static/js/variant.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/variant.js b/static/js/variant.js index e14f52825e..9ce1c2de37 100644 --- a/static/js/variant.js +++ b/static/js/variant.js @@ -415,7 +415,7 @@ var variants = { var style = '/* ' + this.customvariantname + ' */\n' + ':root {\n' + - this.variantvariables.sort( function( l, r ){ return l.name.localeCompare(r.name); } ).reduce( function( a, e ){ return a + this.generateColorVariable( e, read_style ); }.bind( this ), '' ) + + this.variantvariables.reduce( function( a, e ){ return a + this.generateColorVariable( e, read_style ); }.bind( this ), '' ) + '}\n'; console.log( style ); return style; @@ -517,7 +517,7 @@ var variants = { }, variantvariables: [ - { name: 'PRIMARY-color', group: 'content', default: '#7dc903', tooltip: 'brand primary color', }, + { name: 'PRIMARY-color', group: 'content', fallback: 'MENU-HEADER-BG-color', tooltip: 'brand primary color', }, { name: 'SECONDARY-color', group: 'content', fallback: 'MAIN-LINK-color', tooltip: 'brand secondary color', }, { name: 'MAIN-TEXT-color', group: 'content', default: '#101010', tooltip: 'text color of content and h1 titles', },