mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
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:
parent
67d0b8195d
commit
eb013767bb
@ -187,14 +187,6 @@ parse_selector_pseudo_class (GtkCssParser *parser,
|
|||||||
{
|
{
|
||||||
if (g_ascii_strcasecmp (name, classes[i].name) == 0)
|
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;
|
*region_to_modify |= classes[i].region_flag;
|
||||||
*state_to_modify |= classes[i].state_flag;
|
*state_to_modify |= classes[i].state_flag;
|
||||||
|
|
||||||
|
@ -296,7 +296,6 @@ EXTRA_DIST += \
|
|||||||
pseudo-classes-unknown.errors \
|
pseudo-classes-unknown.errors \
|
||||||
pseudo-classes-unknown.ref.css \
|
pseudo-classes-unknown.ref.css \
|
||||||
selector.css \
|
selector.css \
|
||||||
selector.errors \
|
|
||||||
selector.ref.css \
|
selector.ref.css \
|
||||||
shorthand.css \
|
shorthand.css \
|
||||||
shorthand.ref.css \
|
shorthand.ref.css \
|
||||||
|
@ -1 +0,0 @@
|
|||||||
selector.css:201: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
|
@ -86,10 +86,6 @@ a > b {
|
|||||||
int-property: 42;
|
int-property: 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
:hover {
|
|
||||||
int-property: 42;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.b {
|
a.b {
|
||||||
int-property: 42;
|
int-property: 42;
|
||||||
}
|
}
|
||||||
@ -170,6 +166,10 @@ a > :hover {
|
|||||||
int-property: 42;
|
int-property: 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:hover :hover {
|
||||||
|
int-property: 42;
|
||||||
|
}
|
||||||
|
|
||||||
:hover > :hover {
|
:hover > :hover {
|
||||||
int-property: 42;
|
int-property: 42;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user