<!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>More than one class selector</title>
   <script src="/resources/testharness.js"></script>
   <script src="/resources/testharnessreport.js"></script>
  <style type="text/css"><![CDATA[p { background-color : red ; border : thick solid red ; padding : 1em }
p.t1 { background-color : lime }
p.t2 { border : thick solid green }

div { background: green; color: white; }
div.teST { background: red; color: yellow; }
div.te { background: red; color: yellow; }
div.st { background: red; color: yellow; }
div.te.st { background: red; color: yellow; }]]></style>
  <link rel="author" title="Daniel Glazman" href="http://glazman.org/"/>
  <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="target1" class="t1 t2">This paragraph
should have a green background and a green thick solid border because
it carries both classes t1 and t2.</p>

<div id="target2" class="test">This line
should be green.</div>

<script><![CDATA[
test(function() {
  const t1 = document.getElementById('target1');
  assert_equals(getComputedStyle(t1).backgroundColor, 'rgb(0, 255, 0)', 'background-color');
  assert_equals(getComputedStyle(t1).borderLeftColor, 'rgb(0, 128, 0)', 'border-left-color');
  assert_equals(getComputedStyle(t1).borderLeftStyle, 'solid', 'border-left-style');
}, "p.t1.t2 should have green background and border");

test(function() {
  const t2 = document.getElementById('target2');
  assert_equals(getComputedStyle(t2).backgroundColor, 'rgb(0, 128, 0)', 'background-color');
}, "div.test should have green background");
]]></script>
</body>
</html>