30

Writing a CSS parser in Nim, I'm testing it on Stack Overflow's all.css file and found the following invalid selector.

.badge1-alternate::last-child,.badge2-alternate::last-child,.badge3-alternate::last-child,.badge-how-to::last-child {
    margin-right: 0
}

Each ::last-child should be :last-child. Right now the entire rule will be ignored, so perhaps it's not needed and can be removed entirely. Just thought I'd throw it out there.

I guess this should be phrased as a question... so is this a bug or does Stack Overflow intend for this selector to be written as is? :-)

3
  • The setup for this question is hilarious.
    – BoltClock Mod
    Commented Apr 26, 2015 at 6:21
  • I'd guess it was just a thinko of someone updating pseudo-elements to the more modern :: form accidentally doing it with this pesudo-class too.
    – Jon Hanna
    Commented Apr 26, 2015 at 14:00
  • 1
    @JonHanna: Most likely that's the case. @ BoltClock: Always nice to see the tools we write do the job they're supposed to. :-)
    – Lye Fish
    Commented Apr 26, 2015 at 15:55

1 Answer 1

5

Thanks for taking the time to point this out. This has been updated.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .