02-07-specificity-arms-race.html 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Specificity arms race</title>
  6. <style>
  7. body {
  8. color: black;
  9. font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
  10. }
  11. .intro {
  12. font-size: 1.2em;
  13. color: gray;
  14. padding: 1em;
  15. }
  16. .intro a {
  17. color: blue;
  18. }
  19. .news .intro {
  20. color: blue;
  21. }
  22. #home .intro {
  23. color: black;
  24. background: lightgray;
  25. }
  26. #home .intro a {
  27. color: green;
  28. }
  29. a.call-to-action {
  30. /*display: inline-block;*/
  31. background-color: green;
  32. color: white;
  33. padding: .25em;
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <!-- Emulate the "home page" with a div, given the id that would normally be on the body etc -->
  39. <div id="home">
  40. <h1>Home page</h1>
  41. <section class="intro">
  42. <p>Lorem ipsum <a href="#">And a link</a> to something</p>
  43. <p>Some more text. <a href="#" class="call-to-action">Buy my product</a></p>
  44. </section>
  45. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia, quam earum aut dignissimos sunt vitae qui doloremque illo obcaecati asperiores! Maiores, nobis officia velit nam consequatur sed sint alias nisi.</p>
  46. <p><a href="#" class="call-to-action">Buy my product</a></p>
  47. </div>
  48. <hr>
  49. <div>
  50. <h1>Normal page</h1>
  51. <section class="intro">
  52. <p>Lorem ipsum <a href="#">And a link</a> to something</p>
  53. <p>Some more text. <a href="#" class="call-to-action">Buy my product</a></p>
  54. </section>
  55. <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Mollitia, quam earum aut dignissimos sunt vitae qui doloremque illo obcaecati asperiores! Maiores, nobis officia velit nam consequatur sed sint alias nisi.</p>
  56. <p><a href="#" class="call-to-action">Buy my product</a></p>
  57. </div>
  58. </body>
  59. </html>