<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>Syntax and parsing of class selectors</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="common.js"></script>
  <style type="text/css"><![CDATA[
p { color: green; }
..test { background: red; color: yellow; }
.foo..quux { background: red; color: yellow; }
.bar. { background: red; color: yellow; }
]]></style>
  <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/>
  <link rel="help" href="https://www.w3.org/TR/css3-selectors/#selectors"/> <!-- bogus link to make sure it gets found -->
 </head>
 <body>
<p id="t1" class="test">This text should be green.</p>
<p id="t2" class=".test">This text should be green.</p>
<p id="t3" class="foo">This text should be green.</p>
<p id="t4" class="foo quux">This text should be green.</p>
<p id="t5" class="foo  quux">This text should be green.</p>
<p id="t6" class=" bar ">This text should be green.</p>
<script><![CDATA[
test(function() {
  assert_color('t1', GREEN);
  assert_not_background_color('t1', RED);
  assert_color('t2', GREEN);
  assert_not_background_color('t2', RED);
  assert_color('t3', GREEN);
  assert_not_background_color('t3', RED);
  assert_color('t4', GREEN);
  assert_not_background_color('t4', RED);
  assert_color('t5', GREEN);
  assert_not_background_color('t5', RED);
  assert_color('t6', GREEN);
  assert_not_background_color('t6', RED);
}, 'Syntax and parsing of class selectors');
]]></script>
</body>
</html>
