Temp fix for edit styling
This commit is contained in:
10
README.md
10
README.md
@@ -157,6 +157,16 @@ style file at `conf/tpl/<your-template>/style.ini` under the
|
|||||||
__luxtools_locationlink__ = "#b57d35" ; @ini_luxtools_locationlink
|
__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
|
## Features and usage
|
||||||
|
|
||||||
|
|||||||
26
action.php
26
action.php
@@ -18,6 +18,12 @@ class action_plugin_luxtools extends ActionPlugin
|
|||||||
$this,
|
$this,
|
||||||
"addScripts",
|
"addScripts",
|
||||||
);
|
);
|
||||||
|
$controller->register_hook(
|
||||||
|
"CSS_STYLES_INCLUDED",
|
||||||
|
"BEFORE",
|
||||||
|
$this,
|
||||||
|
"addTemporaryInputStyles",
|
||||||
|
);
|
||||||
$controller->register_hook(
|
$controller->register_hook(
|
||||||
"TOOLBAR_DEFINE",
|
"TOOLBAR_DEFINE",
|
||||||
"AFTER",
|
"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.
|
* Add custom toolbar button for code blocks.
|
||||||
*
|
*
|
||||||
|
|||||||
22
temp-input-colors.css
Normal file
22
temp-input-colors.css
Normal 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;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user