Drop nth-child support of all negative sequences
This removes parsing support for selectors such as :nth-child(-n-6). According to the CSS spec this isn't valid anyway (confirmed by testing it in Chromium). As a result there's no point in supporting it in any way.
This commit is contained in:
1 parent
b31288b7d2
commit
8d8d74ec41
3 files changed
+1
-24
No files matched your search
@@ -413,12 +413,8 @@ end
|
||||
compare = :lte
|
||||
end
|
||||
|
||||
# -n-6, -n-4, etc
|
||||
if !step and non_positive_number?(offset)
|
||||
node = s(:eq, count_call, s(:int, -1))
|
||||
|
||||
# 2n+2, 2n-4, etc
|
||||
elsif offset
|
||||
if offset
|
||||
# -2n
|
||||
if step and non_positive_number?(step)
|
||||
mod_val = s(:int, -step.children[0])
|
||||
|
||||
Reference in new issue
Block a user