Temp fix for edit styling

This commit is contained in:
2026-01-22 21:20:09 +01:00
parent 4eaec5c7b1
commit e306226ac8
3 changed files with 58 additions and 0 deletions

View File

@@ -157,6 +157,16 @@ style file at `conf/tpl/<your-template>/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

View File

@@ -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.
*

22
temp-input-colors.css Normal file
View File

@@ -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;
}