mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-01 21:33:32 +02:00
add basic CSS highlighting to :hi, and fixed some small visual glitches
This commit is contained in:
@@ -19,7 +19,7 @@ function Highlights(name, store, serial)
|
|||||||
String color: green;
|
String color: green;
|
||||||
|
|
||||||
Normal color: black; background: white;
|
Normal color: black; background: white;
|
||||||
ErrorMsg color: white; background: red;
|
ErrorMsg color: white; background: red; font-weight: bold;
|
||||||
InfoMsg color: black; background: white;
|
InfoMsg color: black; background: white;
|
||||||
ModeMsg color: black; background: white;
|
ModeMsg color: black; background: white;
|
||||||
MoreMsg color: green; background: white;
|
MoreMsg color: green; background: white;
|
||||||
@@ -478,8 +478,6 @@ liberator.registerObserver("load_commands", function ()
|
|||||||
;
|
;
|
||||||
display: inline-block !important;
|
display: inline-block !important;
|
||||||
position: static !important;
|
position: static !important;
|
||||||
width: 3em !important; min-width: 3em !important; max-width: 3em !important;
|
|
||||||
height: 1em !important; min-height: 1em !important; max-height: 1em !important;
|
|
||||||
margin: 0px !important; padding: 0px !important;
|
margin: 0px !important; padding: 0px !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
]]>;
|
]]>;
|
||||||
@@ -491,7 +489,8 @@ liberator.registerObserver("load_commands", function ()
|
|||||||
["padding: 0 1em 0 0; vertical-align: top"],
|
["padding: 0 1em 0 0; vertical-align: top"],
|
||||||
([h.class,
|
([h.class,
|
||||||
<span style={"text-align: center; line-height: 1em;" + h.value + style}>XXX</span>,
|
<span style={"text-align: center; line-height: 1em;" + h.value + style}>XXX</span>,
|
||||||
h.value]
|
template.maybeXML(h.value.replace(/\s+/g, "\u00a0")
|
||||||
|
.replace(/\b([-\w]+):/g, "<span class=\"hl-Filter\">$1:</span>"))]
|
||||||
for (h in highlight)
|
for (h in highlight)
|
||||||
if (!key || h.class.indexOf(key) > -1)));
|
if (!key || h.class.indexOf(key) > -1)));
|
||||||
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ const template = {
|
|||||||
return str;
|
return str;
|
||||||
if (str == "")
|
if (str == "")
|
||||||
return <>{str}</>;
|
return <>{str}</>;
|
||||||
|
|
||||||
let lcstr = String(str).toLowerCase();
|
let lcstr = String(str).toLowerCase();
|
||||||
let lcfilter = filter.toLowerCase();
|
let lcfilter = filter.toLowerCase();
|
||||||
str = String(str).replace(" ", "\u00a0");
|
str = String(str).replace(" ", "\u00a0");
|
||||||
|
|||||||
Reference in New Issue
Block a user