summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2009-08-10 07:13:15 +1000
committerDoug Kearns <dougkearns@gmail.com>2009-08-10 07:13:15 +1000
commitc43dbf510e4cc92d9fd882a183891d7d5203886c (patch)
treed5fe9abdce170ecec667796c7739f311f58ba539
parent519908eb2ecf049082b6ddaca3a53a5ac12437b4 (diff)
downloadpentadactyl-c43dbf510e4cc92d9fd882a183891d7d5203886c.tar.gz
Fix #326 (:style -append not working as expected).
-rwxr-xr-xcommon/content/style.js2
-rw-r--r--vimperator/locale/en-US/styling.txt29
-rw-r--r--xulmus/locale/en-US/styling.txt29
3 files changed, 35 insertions, 25 deletions
diff --git a/common/content/style.js b/common/content/style.js
index 11512a68..5b5d12db 100755
--- a/common/content/style.js
+++ b/common/content/style.js
@@ -583,7 +583,7 @@ liberator.registerObserver("load_commands", function () {
if (sheet)
{
filter = sheet.sites.concat(filter).join(",");
- css = sheet.css.replace(/;?\s*$/, "; " + css);
+ css = sheet.css + " " + css;
}
}
let err = styles.addSheet(false, name, filter, css);
diff --git a/vimperator/locale/en-US/styling.txt b/vimperator/locale/en-US/styling.txt
index 5d785943..a5273157 100644
--- a/vimperator/locale/en-US/styling.txt
+++ b/vimperator/locale/en-US/styling.txt
@@ -15,13 +15,15 @@ The ColorScheme autocommand is triggered after the color scheme has been
sourced.
________________________________________________________________________________
+
|:hi| |:highlight| +
||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| +
________________________________________________________________________________
-Highlight {group} with {css}. Normally, {css} is checked for valid
-syntax before it's applied. Once you're certain it's valid, [!] can be
-used to skip the check to speed up Vimperator startup. {selector} can
-be any valid CSS selector, such as [c]:hover[c], and, if provided, will
+Highlight {group} with {css}. {css} is one or more comma separated CSS
+declarations (E.g. *color: blue; background-color: red*). Normally, {css} is
+checked for valid syntax before it's applied. Once you're certain it's valid,
+[!] can be used to skip the check to speed up Vimperator startup. {selector}
+can be any valid CSS selector, such as [c]:hover[c], and, if provided, will
restrict the match to matching elements.
Valid groups are:
@@ -92,6 +94,7 @@ appended to its current value. If {css} is not provided, any styles matching
{group} are listed, or all styles if no {group} provided.
________________________________________________________________________________
+
|:highlight-clear| +
||:hi[ghlight] clear [{group} [{selector}]]|| +
________________________________________________________________________________
@@ -103,18 +106,20 @@ ________________________________________________________________________________
|:sty| |:style| +
||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| +
________________________________________________________________________________
-Add CSS styles to the browser or to web pages. {filter} is a comma
-separated list of URLs to match. URLs ending with *** are matched as
-prefixes, URLs not containing any *:* or */* characters are
-matched as domains. If {name} (short option: *-n*) is provided, any
-existing style with the same name is overridden, and the style may later
-be deleted using {name}. If *-append* (short option: *-a*) is provided
-along with *-name*, {css} and {filter} are appended to its current
-value.
+Add CSS styles to the browser or to web pages. {filter} is a comma separated
+list of URLs to match. URLs ending with *** are matched as prefixes, URLs not
+containing any *:* or */* characters are matched as domains. {css} is a full
+CSS rule set (E.g. *body { color: blue; }*).
+
+If {name} (short option: *-n*) is provided, any existing style with the same
+name is overridden, and the style may later be deleted using {name}. If
+*-append* (short option: *-a*) is provided along with *-name*, {css} and
+{filter} are appended to its current value.
If {css} isn't provided, matching styles are listed.
________________________________________________________________________________
+
|:dels| |:delstyle| +
||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| +
________________________________________________________________________________
diff --git a/xulmus/locale/en-US/styling.txt b/xulmus/locale/en-US/styling.txt
index d539cd67..5f3fbec7 100644
--- a/xulmus/locale/en-US/styling.txt
+++ b/xulmus/locale/en-US/styling.txt
@@ -15,13 +15,15 @@ The ColorScheme autocommand is triggered after the color scheme has been
sourced.
________________________________________________________________________________
+
|:hi| |:highlight| +
||:hi[ghlight][!] [-append] {group} [[{selector}] {css}]|| +
________________________________________________________________________________
-Highlight {group} with {css}. Normally, {css} is checked for valid
-syntax before it's applied. Once you're certain it's valid, [!] can be
-used to skip the check to speed up Vimperator startup. {selector} can
-be any valid CSS selector, such as [c]:hover[c], and, if provided, will
+Highlight {group} with {css}. {css} is one or more comma separated CSS
+declarations (E.g. *color: blue; background-color: red*). Normally, {css} is
+checked for valid syntax before it's applied. Once you're certain it's valid,
+[!] can be used to skip the check to speed up Vimperator startup. {selector}
+can be any valid CSS selector, such as [c]:hover[c], and, if provided, will
restrict the match to matching elements.
Valid groups are:
@@ -92,6 +94,7 @@ appended to its current value. If {css} is not provided, any styles matching
{group} are listed, or all styles if no {group} provided.
________________________________________________________________________________
+
|:highlight-clear| +
||:hi[ghlight] clear [{group} [{selector}]]|| +
________________________________________________________________________________
@@ -103,18 +106,20 @@ ________________________________________________________________________________
|:sty| |:style| +
||:sty[le][!] [-name={name}] [-append] {filter} [{css}]|| +
________________________________________________________________________________
-Add CSS styles to the player or to web pages. {filter} is a comma
-separated list of URLs to match. URLs ending with *** are matched as
-prefixes, URLs not containing any *:* or */* characters are
-matched as domains. If {name} (short option: *-n*) is provided, any
-existing style with the same name is overridden, and the style may later
-be deleted using {name}. If *-append* (short option: *-a*) is provided
-along with *-name*, {css} and {filter} are appended to its current
-value.
+Add CSS styles to the browser or to web pages. {filter} is a comma separated
+list of URLs to match. URLs ending with *** are matched as prefixes, URLs not
+containing any *:* or */* characters are matched as domains. {css} is a full
+CSS rule set (E.g. *body { color: blue; }*).
+
+If {name} (short option: *-n*) is provided, any existing style with the same
+name is overridden, and the style may later be deleted using {name}. If
+*-append* (short option: *-a*) is provided along with *-name*, {css} and
+{filter} are appended to its current value.
If {css} isn't provided, matching styles are listed.
________________________________________________________________________________
+
|:dels| |:delstyle| +
||:dels[tyle] [-name={name}] [-index={index}] [{filter}] [{css}]|| +
________________________________________________________________________________