summaryrefslogtreecommitdiff
path: root/src/parse/properties/utils.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-01-21 21:19:26 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-01-21 21:19:26 +0000
commit02769080aa7f89aa0197cba28801c2c41aaaf28d (patch)
treef5958c0b0c6cf3ed9a1fb071c6b6756e222e26a7 /src/parse/properties/utils.c
parent37b918aa14749dee34f0041678a00fd75335ab96 (diff)
downloadlibcss-02769080aa7f89aa0197cba28801c2c41aaaf28d.tar.gz
libcss-02769080aa7f89aa0197cba28801c2c41aaaf28d.tar.bz2
Add transparent keyword to colour value parsing
svn path=/trunk/libcss/; revision=11436
Diffstat (limited to 'src/parse/properties/utils.c')
-rw-r--r--src/parse/properties/utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index 1641353..71296f4 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -421,6 +421,12 @@ css_error css__parse_colour_specifier(css_language *c,
}
if (token->type == CSS_TOKEN_IDENT) {
+ if ((lwc_string_caseless_isequal(
+ token->idata, c->strings[TRANSPARENT],
+ &match) == lwc_error_ok && match)) {
+ *result = 0; /* black transparent */
+ return CSS_OK;
+ }
error = css__parse_named_colour(c, token->idata, result);
if (error != CSS_OK && c->sheet->quirks_allowed) {
error = css__parse_hash_colour(token->idata, result);