devcss_test.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. Copyright 2008 The Closure Library Authors. All Rights Reserved.
  5. Use of this source code is governed by the Apache License, Version 2.0.
  6. See the COPYING file for details.
  7. -->
  8. <!--
  9. -->
  10. <head>
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  12. <meta charset="UTF-8" />
  13. <title>
  14. Closure Unit Tests - CSS Object Model helper
  15. </title>
  16. <script src="../../base.js">
  17. </script>
  18. <script>
  19. goog.require('goog.debug.DevCssTest');
  20. </script>
  21. <style>
  22. @import "devcss_test_import_1.css";
  23. .css-style-1 {
  24. background-color: rgb(173,216,230); /* lightblue */
  25. padding: 10px;
  26. }
  27. .css-style-2 {
  28. display: block;
  29. background-color: transparent;
  30. margin-top: 1px;
  31. margin-left: 1px;
  32. padding: 10px;
  33. }
  34. .css-style-3 {
  35. background-color: orange;
  36. padding: 10px;
  37. }
  38. .compound1.compound2 {
  39. -goog-ie6-selector: ".compound1_compound2";
  40. background-color: rgb(255,192,203); /* aka pink */
  41. }
  42. .USERAGENT-OPERA .css-style-2,
  43. .USERAGENT-GECKO .css-style-2,
  44. .USERAGENT-MOBILE .css-style-2 {
  45. background-color: rgb(255,192,203); /* aka pink */
  46. }
  47. .USERAGENT-OPERA .css-style-2,
  48. .USERAGENT-WEBKIT-GTE255 .css-style-2,
  49. .USERAGENT-MOBILE .css-style-2 {
  50. margin-top: 20px;
  51. }
  52. .USERAGENT-OPERA .css-style-2,
  53. .USERAGENT-WEBKIT-LTE200 .css-style-2,
  54. .USERAGENT-MOBILE .css-style-2 {
  55. margin-left: 15px;
  56. }
  57. .USERAGENT-GECKO #devcss-gecko-1,
  58. .USERAGENT-GECKO #devcss-gecko-2 {
  59. background-color: rgb(255,192,203); /* aka pink */
  60. }
  61. .USERAGENT-IE-8 #devcss-ie8-1,
  62. .USERAGENT-IE-8 #devcss-ie8-2 {
  63. background-color: rgb(255,192,203); /* aka pink */
  64. }
  65. #devcss-test-ie6 {
  66. background-color: purple;
  67. }
  68. .USERAGENT-IE-6 #devcss-test-ie6 {
  69. background-color: rgb(255,192,203); /* aka pink */
  70. }
  71. @keyframes spin {
  72. 0% {
  73. @mixin transform(rotate(0deg));
  74. }
  75. 100% {
  76. @mixin transform(rotate(360deg));
  77. }
  78. }
  79. </style>
  80. <style>
  81. @import "devcss_test_import_2.css";
  82. </style>
  83. </head>
  84. <body>
  85. <div id="devcss-test-2" class="css-style-2">
  86. <ul>
  87. <li>
  88. Should end up background-color:rgb(255, 192, 203) aka pink.
  89. </li>
  90. <li>
  91. Should end up with margin-top: 20px; margin-left: 15px;
  92. </li>
  93. </ul>
  94. </div>
  95. <br>
  96. <br>
  97. <div id="devcss-test-ie6">
  98. <ul>
  99. <li>
  100. Should end up background-color:rgb(255, 192, 203) aka pink, not black or purple.
  101. </li>
  102. </ul>
  103. </div>
  104. <!--
  105. TODO(user): Re-enable if we ever come up with a way to make imports
  106. work.
  107. <div id="devcss-test-importfixer-1" class="css-style-3">
  108. <ul>
  109. <li>
  110. Should end up yellow from the first import of
  111. devcss_test_import_2.css, overriding the previous orange setting and
  112. ignoring the second import of devcss_test_import_1.css which would set
  113. it grey.
  114. </li>
  115. </ul>
  116. </div>
  117. <div id="devcss-test-importfixer-2" class="css-style-1">
  118. <ul>
  119. <li>
  120. Should end up lightblue, which is a revert back to the setting in this
  121. test file, after disabling the second import of
  122. devcss_test_import_1.css
  123. </li>
  124. </ul>
  125. </div>
  126. -->
  127. <br>
  128. <br>
  129. <div id="devcss-ie8-1">
  130. This element should be pink for IE8.
  131. </div>
  132. <div id="devcss-ie8-2">
  133. This element should also be pink for IE8.
  134. </div>
  135. <br>
  136. <br>
  137. <div id="devcss-gecko-1">
  138. This element should be pink for Gecko.
  139. </div>
  140. <div id="devcss-gecko-2">
  141. This element should also be pink for Gecko.
  142. </div>
  143. <br>
  144. <br>
  145. <div id="devcss-test-compound1" class="compound1">
  146. This (class="compound1") should have no bg.
  147. </div>
  148. <div id="devcss-test-compound2" class="compound2">
  149. This (class="compound2") should have no bg.
  150. </div>
  151. <div id="devcss-test-compound1-2" class="compound1 compound2 compound1_compound2">
  152. This (class="compound1 compound2 compound1_compound2") should have
  153. a pink bg for IE6.
  154. </div>
  155. <br>
  156. <br>
  157. <input id="devcss-test-combined1" type="hidden" class="ie6-1 ie6-2">
  158. <input id="devcss-test-combined2" type="hidden" class="ie6-3 ie6-1 ie6-2">
  159. <input id="devcss-test-notcombined1" type="hidden" class="ie6-1">
  160. <input id="devcss-test-notcombined2" type="hidden" class="ie6-2">
  161. <input id="devcss-test-notcombined3" type="hidden" class="ie6-3">
  162. </body>
  163. </html>