From e306226ac8c3ba71817b48fd38fbbc5a89ca2a69 Mon Sep 17 00:00:00 2001 From: luxick Date: Thu, 22 Jan 2026 21:20:09 +0100 Subject: [PATCH] Temp fix for edit styling --- README.md | 10 ++++++++++ action.php | 26 ++++++++++++++++++++++++++ temp-input-colors.css | 22 ++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 temp-input-colors.css diff --git a/README.md b/README.md index c141436..1b83092 100644 --- a/README.md +++ b/README.md @@ -157,6 +157,16 @@ style file at `conf/tpl//style.ini` under the __luxtools_locationlink__ = "#b57d35" ; @ini_luxtools_locationlink ``` +### Temporary global input styling + +Because the target template is not ready yet, the plugin currently ships a +temporary stylesheet that applies `@ini_text`, `@ini_background`, and +`@ini_border` to all `input`, `textarea`, and `select` elements site-wide. +This file is explicitly marked as a temporary fix and should be removed once +the template provides proper form control styles. + +Temporary file: [temp-input-colors.css](temp-input-colors.css) + ## Features and usage diff --git a/action.php b/action.php index d1f5c8b..41cd1e7 100644 --- a/action.php +++ b/action.php @@ -18,6 +18,12 @@ class action_plugin_luxtools extends ActionPlugin $this, "addScripts", ); + $controller->register_hook( + "CSS_STYLES_INCLUDED", + "BEFORE", + $this, + "addTemporaryInputStyles", + ); $controller->register_hook( "TOOLBAR_DEFINE", "AFTER", @@ -52,6 +58,26 @@ class action_plugin_luxtools extends ActionPlugin } } + /** + * Include temporary global input styling via css.php so @ini_* placeholders resolve. + * + * @param Event $event + * @param mixed $param + * @return void + */ + public function addTemporaryInputStyles(Event $event, $param) + { + if (!isset($event->data['mediatype']) || $event->data['mediatype'] !== 'screen') { + return; + } + + if (!isset($event->data['files']) || !is_array($event->data['files'])) { + return; + } + + $event->data['files'][DOKU_PLUGIN . 'luxtools/temp-input-colors.css'] = DOKU_BASE . 'lib/plugins/luxtools/'; + } + /** * Add custom toolbar button for code blocks. * diff --git a/temp-input-colors.css b/temp-input-colors.css new file mode 100644 index 0000000..7112753 --- /dev/null +++ b/temp-input-colors.css @@ -0,0 +1,22 @@ +/* TEMPORARY FIX + * Apply template color placeholders to all form controls. + * Remove this file once the template provides proper input styling. + */ + +input, +textarea, +select, +button { + color: @ini_text !important; + background-color: @ini_background !important; + border: 1px solid @ini_border !important; +} + +button:not(.toolbutton) { + background: @ini_background !important; +} + +select option { + color: @ini_text; + background-color: @ini_background; +}