selector: Remove a misleading error message

Duplicate selectors are indeed fine and shouldn't cause errors.
You want to use them to up specificity.
This commit is contained in:
Benjamin Otte 2012-02-15 17:18:22 +01:00
parent 67d0b8195d
commit eb013767bb
4 changed files with 4 additions and 14 deletions

View File

@ -187,14 +187,6 @@ parse_selector_pseudo_class (GtkCssParser *parser,
{
if (g_ascii_strcasecmp (name, classes[i].name) == 0)
{
if ((*region_to_modify & classes[i].region_flag) ||
(*state_to_modify & classes[i].state_flag))
{
if (classes == nth_child_classes)
_gtk_css_parser_error (parser, "Duplicate pseudo-class 'nth-child(%s)'", name);
else
_gtk_css_parser_error (parser, "Duplicate pseudo-class '%s'", name);
}
*region_to_modify |= classes[i].region_flag;
*state_to_modify |= classes[i].state_flag;

View File

@ -296,7 +296,6 @@ EXTRA_DIST += \
pseudo-classes-unknown.errors \
pseudo-classes-unknown.ref.css \
selector.css \
selector.errors \
selector.ref.css \
shorthand.css \
shorthand.ref.css \

View File

@ -1 +0,0 @@
selector.css:201: error: GTK_CSS_PROVIDER_ERROR_SYNTAX

View File

@ -86,10 +86,6 @@ a > b {
int-property: 42;
}
:hover {
int-property: 42;
}
a.b {
int-property: 42;
}
@ -166,6 +162,10 @@ a > :hover {
int-property: 42;
}
:hover:hover {
int-property: 42;
}
:hover :hover {
int-property: 42;
}