Css Inheritance Edge Case Hackerrank Javascript