summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-01-27 23:52:06 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2012-01-27 23:52:06 (GMT)
commite638e1a286156d53816563c290524c241a570de6 (patch)
treeb3a1b06fe9ff0af943504675ecb2f25b50a0135f
parentefc349e0e597a3f0030b46fee03c21bd670fdac1 (diff)
downloadlibcss-e638e1a286156d53816563c290524c241a570de6.tar.gz
libcss-e638e1a286156d53816563c290524c241a570de6.tar.bz2
Fix \!important for opacity property.
svn path=/trunk/libcss/; revision=13410
-rw-r--r--src/parse/important.c5
-rw-r--r--test/data/parse/colours.dat24
2 files changed, 29 insertions, 0 deletions
diff --git a/src/parse/important.c b/src/parse/important.c
index 73d64ac..8587afd 100644
--- a/src/parse/important.c
+++ b/src/parse/important.c
@@ -306,6 +306,11 @@ void css__make_style_important(css_style *style)
offset += 2; /* length + units */
break;
+ case CSS_PROP_OPACITY:
+ if (value == OPACITY_SET)
+ offset++; /* value */
+ break;
+
case CSS_PROP_ORPHANS:
case CSS_PROP_PITCH_RANGE:
case CSS_PROP_RICHNESS:
diff --git a/test/data/parse/colours.dat b/test/data/parse/colours.dat
index b7cab9c..edcde8a 100644
--- a/test/data/parse/colours.dat
+++ b/test/data/parse/colours.dat
@@ -72,6 +72,30 @@
| 0x02000063 0x000000e1
#reset
+#data
+* { opacity: 0.22 !important }
+#errors
+#expected
+| 1 *
+| 0x02000463 0x000000e1
+#reset
+
+#data
+* { opacity: inherit }
+#errors
+#expected
+| 1 *
+| 0x00000863
+#reset
+
+#data
+* { opacity: inherit !important }
+#errors
+#expected
+| 1 *
+| 0x00000c63
+#reset
+
## Out-of-range rgb() parameters
#data