lsd_rails 0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (991) hide show
  1. data/Packages/Sheet.js/Demo/index.html +78 -0
  2. data/Packages/Sheet.js/Demo/pp.css +69 -0
  3. data/Packages/Sheet.js/Demo/subtlegradient-jslib.js +450 -0
  4. data/Packages/Sheet.js/LICENSE +21 -0
  5. data/Packages/Sheet.js/README.md +59 -0
  6. data/Packages/Sheet.js/Source/Sheet.DOM.js +65 -0
  7. data/Packages/Sheet.js/Source/Sheet.js +80 -0
  8. data/Packages/Sheet.js/Source/SheetParser.CSS.js +194 -0
  9. data/Packages/Sheet.js/Source/SheetParser.Property.js +227 -0
  10. data/Packages/Sheet.js/Source/SheetParser.Styles.js +115 -0
  11. data/Packages/Sheet.js/Source/SheetParser.Value.js +114 -0
  12. data/Packages/Sheet.js/Source/sg-regex-tools.js +42 -0
  13. data/Packages/Sheet.js/Test/DOM-styleSheet.api.js +404 -0
  14. data/Packages/Sheet.js/Test/Sheet.test.js +25 -0
  15. data/Packages/Sheet.js/Test/SheetParser.CSS.RegExp.test.js +108 -0
  16. data/Packages/Sheet.js/Test/SheetParser.Property.test.js +230 -0
  17. data/Packages/Sheet.js/Test/SheetParser.Value.test.js +94 -0
  18. data/Packages/Sheet.js/Test/all-types.mock.css +103 -0
  19. data/Packages/Sheet.js/Test/document.styleSheets.test.js +7 -0
  20. data/Packages/Sheet.js/Test/index.html +12 -0
  21. data/Packages/Sheet.js/Test/lib/qunit/package.json +21 -0
  22. data/Packages/Sheet.js/Test/lib/qunit/qunit/qunit.css +196 -0
  23. data/Packages/Sheet.js/Test/lib/qunit/qunit/qunit.js +1303 -0
  24. data/Packages/Sheet.js/Test/lib/sg-assert-helpers.js +93 -0
  25. data/Packages/Sheet.js/Test/lib/sg-qunit-testrunner.js +40 -0
  26. data/Packages/Sheet.js/Test/lib/sg-testrunner.js +49 -0
  27. data/Packages/Sheet.js/Test/properties.html +39 -0
  28. data/Packages/Sheet.js/Test/run.html +43 -0
  29. data/Packages/Sheet.js/Test/run.js +10 -0
  30. data/Packages/Sheet.js/Test/test-browser.html +47 -0
  31. data/Packages/Sheet.js/Test/values.html +38 -0
  32. data/Packages/Sheet.js/package.json +59 -0
  33. data/Packages/Sheet.js/test-all +13 -0
  34. data/Packages/art/Docs/ART/ART.Group.md +106 -0
  35. data/Packages/art/Docs/ART/ART.Path.md +167 -0
  36. data/Packages/art/Docs/ART/ART.Shape.md +106 -0
  37. data/Packages/art/Docs/ART/ART.Transform.md +148 -0
  38. data/Packages/art/Docs/ART/ART.md +113 -0
  39. data/Packages/art/Docs/Modes/ART.Base.md +10 -0
  40. data/Packages/art/Docs/Modes/ART.SVG.md +9 -0
  41. data/Packages/art/Docs/Modes/ART.VML.md +12 -0
  42. data/Packages/art/Docs/Shapes/ART.Font.md +15 -0
  43. data/Packages/art/Docs/Shapes/ART.Shapes.md +63 -0
  44. data/Packages/art/Docs/Shapes/ART.Text.md +14 -0
  45. data/Packages/art/Fonts/Moderna.Bold.js +31 -0
  46. data/Packages/art/Fonts/Moderna.js +31 -0
  47. data/Packages/art/README.md +3 -0
  48. data/Packages/art/Source/ART.Base.js +33 -0
  49. data/Packages/art/Source/ART.Font.js +89 -0
  50. data/Packages/art/Source/ART.Path.js +440 -0
  51. data/Packages/art/Source/ART.SVG.js +593 -0
  52. data/Packages/art/Source/ART.Shapes.js +136 -0
  53. data/Packages/art/Source/ART.VML.js +772 -0
  54. data/Packages/art/Source/ART.js +202 -0
  55. data/Packages/art/license.txt +21 -0
  56. data/Packages/art/package.yml +24 -0
  57. data/Packages/art-morph/Demos/index.html +18 -0
  58. data/Packages/art-morph/Demos/morph.js +30 -0
  59. data/Packages/art-morph/README.md +3 -0
  60. data/Packages/art-morph/Source/ART.Path.Morph.js +76 -0
  61. data/Packages/art-morph/license.txt +21 -0
  62. data/Packages/lsd/CHANGELOG +152 -0
  63. data/Packages/lsd/README.md +233 -0
  64. data/Packages/lsd/Source/ART/ART.Element.js +51 -0
  65. data/Packages/lsd/Source/ART/ART.Glyphs.js +51 -0
  66. data/Packages/lsd/Source/ART/ART.SVG.js +122 -0
  67. data/Packages/lsd/Source/ART/ART.Shape.Arrow.js +104 -0
  68. data/Packages/lsd/Source/ART/ART.Shape.Ellipse.js +42 -0
  69. data/Packages/lsd/Source/ART/ART.Shape.Flower.js +71 -0
  70. data/Packages/lsd/Source/ART/ART.Shape.Rectangle.js +67 -0
  71. data/Packages/lsd/Source/ART/ART.Shape.Star.js +57 -0
  72. data/Packages/lsd/Source/ART/ART.js +41 -0
  73. data/Packages/lsd/Source/Action/Clone.js +36 -0
  74. data/Packages/lsd/Source/Action/Counter.js +98 -0
  75. data/Packages/lsd/Source/Action/Create.js +26 -0
  76. data/Packages/lsd/Source/Action/Delete.js +32 -0
  77. data/Packages/lsd/Source/Action/Display.js +50 -0
  78. data/Packages/lsd/Source/Action/Edit.js +138 -0
  79. data/Packages/lsd/Source/Action/Focus.js +29 -0
  80. data/Packages/lsd/Source/Action/History.js +27 -0
  81. data/Packages/lsd/Source/Action/Invoke.js +34 -0
  82. data/Packages/lsd/Source/Action/List.js +40 -0
  83. data/Packages/lsd/Source/Action/Set.js +36 -0
  84. data/Packages/lsd/Source/Action/State.js +33 -0
  85. data/Packages/lsd/Source/Action/Submit.js +60 -0
  86. data/Packages/lsd/Source/Action/Toggle.js +41 -0
  87. data/Packages/lsd/Source/Action/Update.js +79 -0
  88. data/Packages/lsd/Source/Action.js +169 -0
  89. data/Packages/lsd/Source/Behavior.js +68 -0
  90. data/Packages/lsd/Source/Command.js +135 -0
  91. data/Packages/lsd/Source/Document.js +188 -0
  92. data/Packages/lsd/Source/Interpolation.js +103 -0
  93. data/Packages/lsd/Source/LSD.js +163 -0
  94. data/Packages/lsd/Source/Layer/Color.js +43 -0
  95. data/Packages/lsd/Source/Layer/Offset.js +37 -0
  96. data/Packages/lsd/Source/Layer/Position.js +35 -0
  97. data/Packages/lsd/Source/Layer/Radius.js +39 -0
  98. data/Packages/lsd/Source/Layer/Scale.js +36 -0
  99. data/Packages/lsd/Source/Layer/Shadow.Blur.js +41 -0
  100. data/Packages/lsd/Source/Layer/Shadow.Inset.js +99 -0
  101. data/Packages/lsd/Source/Layer/Shadow.Native.js +35 -0
  102. data/Packages/lsd/Source/Layer/Shadow.Onion.js +105 -0
  103. data/Packages/lsd/Source/Layer/Shadow.js +46 -0
  104. data/Packages/lsd/Source/Layer/Shape.js +56 -0
  105. data/Packages/lsd/Source/Layer/Size.js +38 -0
  106. data/Packages/lsd/Source/Layer/Stroke.js +61 -0
  107. data/Packages/lsd/Source/Layer.js +212 -0
  108. data/Packages/lsd/Source/Layout.js +445 -0
  109. data/Packages/lsd/Source/Mixin/Animation.js +77 -0
  110. data/Packages/lsd/Source/Mixin/Choice.js +62 -0
  111. data/Packages/lsd/Source/Mixin/Command.js +98 -0
  112. data/Packages/lsd/Source/Mixin/ContentEditable.js +124 -0
  113. data/Packages/lsd/Source/Mixin/Draggable.js +113 -0
  114. data/Packages/lsd/Source/Mixin/Fieldset.js +235 -0
  115. data/Packages/lsd/Source/Mixin/Focusable.js +122 -0
  116. data/Packages/lsd/Source/Mixin/Invokable.js +83 -0
  117. data/Packages/lsd/Source/Mixin/List.js +99 -0
  118. data/Packages/lsd/Source/Mixin/Placeholder.js +77 -0
  119. data/Packages/lsd/Source/Mixin/Request.js +120 -0
  120. data/Packages/lsd/Source/Mixin/Resizable.js +182 -0
  121. data/Packages/lsd/Source/Mixin/Resource.js +81 -0
  122. data/Packages/lsd/Source/Mixin/Root.js +41 -0
  123. data/Packages/lsd/Source/Mixin/Scrollable.js +69 -0
  124. data/Packages/lsd/Source/Mixin/Sortable.js +134 -0
  125. data/Packages/lsd/Source/Mixin/Submittable.js +64 -0
  126. data/Packages/lsd/Source/Mixin/Target.js +102 -0
  127. data/Packages/lsd/Source/Mixin/Touchable.js +41 -0
  128. data/Packages/lsd/Source/Mixin/Unselectable.js +35 -0
  129. data/Packages/lsd/Source/Mixin/Uploader.js +277 -0
  130. data/Packages/lsd/Source/Mixin/Validity.js +102 -0
  131. data/Packages/lsd/Source/Mixin/Value.js +160 -0
  132. data/Packages/lsd/Source/Module/Accessories/Actions.js +79 -0
  133. data/Packages/lsd/Source/Module/Accessories/Attributes.js +192 -0
  134. data/Packages/lsd/Source/Module/Accessories/Chain.js +232 -0
  135. data/Packages/lsd/Source/Module/Accessories/Dimensions.js +114 -0
  136. data/Packages/lsd/Source/Module/Accessories/Element.js +233 -0
  137. data/Packages/lsd/Source/Module/Accessories/Events.js +352 -0
  138. data/Packages/lsd/Source/Module/Accessories/Options.js +112 -0
  139. data/Packages/lsd/Source/Module/Accessories/Shortcuts.js +46 -0
  140. data/Packages/lsd/Source/Module/Accessories/States.js +28 -0
  141. data/Packages/lsd/Source/Module/Accessories/Styles.js +230 -0
  142. data/Packages/lsd/Source/Module/Accessories/Tag.js +145 -0
  143. data/Packages/lsd/Source/Module/Accessories.js +47 -0
  144. data/Packages/lsd/Source/Module/Ambient/Allocations.js +184 -0
  145. data/Packages/lsd/Source/Module/Ambient/Container.js +56 -0
  146. data/Packages/lsd/Source/Module/Ambient/DOM.js +355 -0
  147. data/Packages/lsd/Source/Module/Ambient/Expectations.js +358 -0
  148. data/Packages/lsd/Source/Module/Ambient/Layout.js +97 -0
  149. data/Packages/lsd/Source/Module/Ambient/Mutations.js +101 -0
  150. data/Packages/lsd/Source/Module/Ambient/Proxies.js +84 -0
  151. data/Packages/lsd/Source/Module/Ambient/Relations.js +99 -0
  152. data/Packages/lsd/Source/Module/Ambient/Selectors.js +136 -0
  153. data/Packages/lsd/Source/Module/Ambient.js +39 -0
  154. data/Packages/lsd/Source/Module/Graphics/Layers.js +177 -0
  155. data/Packages/lsd/Source/Module/Graphics/Render.js +96 -0
  156. data/Packages/lsd/Source/Module/Graphics/Shape.js +56 -0
  157. data/Packages/lsd/Source/Module/Graphics.js +30 -0
  158. data/Packages/lsd/Source/Relation.js +397 -0
  159. data/Packages/lsd/Source/Sheet.js +324 -0
  160. data/Packages/lsd/Source/Trait/Date.js +66 -0
  161. data/Packages/lsd/Source/Trait/Input.js +65 -0
  162. data/Packages/lsd/Source/Trait/Menu.js +21 -0
  163. data/Packages/lsd/Source/Trait/Slider.js +93 -0
  164. data/Packages/lsd/Source/Type.js +92 -0
  165. data/Packages/lsd/Source/Widget.js +60 -0
  166. data/Packages/lsd/UNLICENSE +24 -0
  167. data/Packages/lsd/package.yml +114 -0
  168. data/Packages/lsd-mobile/Source/Body/Dialog.js +57 -0
  169. data/Packages/lsd-mobile/Source/Body/Page.js +50 -0
  170. data/Packages/lsd-mobile/Source/Body.js +30 -0
  171. data/Packages/lsd-mobile/Source/Dialog.js +0 -0
  172. data/Packages/lsd-mobile/Source/Document.js +78 -0
  173. data/Packages/lsd-mobile/Source/Input/Date.js +119 -0
  174. data/Packages/lsd-mobile/Source/Input.js +24 -0
  175. data/Packages/lsd-mobile/Source/Mobile.js +27 -0
  176. data/Packages/lsd-mobile/package.yml +15 -0
  177. data/Packages/lsd-native/README.md +0 -0
  178. data/Packages/lsd-native/Source/Input/Checkbox.js +42 -0
  179. data/Packages/lsd-native/Source/Input/Date.js +33 -0
  180. data/Packages/lsd-native/Source/Input/File.js +23 -0
  181. data/Packages/lsd-native/Source/Input/Hidden.js +23 -0
  182. data/Packages/lsd-native/Source/Input/Password.js +29 -0
  183. data/Packages/lsd-native/Source/Input/Radio.js +42 -0
  184. data/Packages/lsd-native/Source/Input/Search.js +23 -0
  185. data/Packages/lsd-native/Source/Input.js +48 -0
  186. data/Packages/lsd-native/Source/Select.js +29 -0
  187. data/Packages/lsd-native/Source/Textarea.js +27 -0
  188. data/Packages/lsd-native/package.yml +18 -0
  189. data/Packages/lsd-specs/Compiled/includes.js +217 -0
  190. data/Packages/lsd-specs/Configuration.js +124 -0
  191. data/Packages/lsd-specs/compile.sh +1 -0
  192. data/Packages/lsd-specs/index.html +26 -0
  193. data/Packages/lsd-specs/lsd/Action/Counter.js +35 -0
  194. data/Packages/lsd-specs/lsd/Layout.js +146 -0
  195. data/Packages/lsd-specs/lsd/Module/Accessories/Attributes.js +68 -0
  196. data/Packages/lsd-specs/lsd/Module/Accessories/Chain.js +385 -0
  197. data/Packages/lsd-specs/lsd/Module/Accessories/Dimensions.js +53 -0
  198. data/Packages/lsd-specs/lsd/Module/Accessories/Element.js +112 -0
  199. data/Packages/lsd-specs/lsd/Module/Accessories/Events.js +151 -0
  200. data/Packages/lsd-specs/lsd/Module/Accessories/Options.js +36 -0
  201. data/Packages/lsd-specs/lsd/Module/Accessories/Shortcuts.js +0 -0
  202. data/Packages/lsd-specs/lsd/Module/Accessories/States.js +0 -0
  203. data/Packages/lsd-specs/lsd/Module/Accessories/Styles.js +14 -0
  204. data/Packages/lsd-specs/lsd/Module/Accessories/Tag.js +84 -0
  205. data/Packages/lsd-specs/lsd/Module/Ambient/DOM.js +394 -0
  206. data/Packages/lsd-specs/lsd/Module/Ambient/Expectations.js +199 -0
  207. data/Packages/lsd-specs/lsd/Module/Ambient/Layout.js +0 -0
  208. data/Packages/lsd-specs/lsd/Module/Ambient/Relations.js +7 -0
  209. data/Packages/lsd-specs/lsd/Module/Behavior/Target.Parser.js +123 -0
  210. data/Packages/lsd-specs/lsd/Module/Behavior/Target.js +0 -0
  211. data/Packages/lsd-specs/lsd/Relation.js +428 -0
  212. data/Packages/lsd-specs/lsd/Trait/Dimensions.js +216 -0
  213. data/Packages/lsd-specs/lsd/Trait/Layers.js +66 -0
  214. data/Packages/lsd-specs/lsd/Type.js +27 -0
  215. data/Packages/lsd-specs/outdated/Focus.js +137 -0
  216. data/Packages/lsd-widgets/Source/Body/Dialog.js +68 -0
  217. data/Packages/lsd-widgets/Source/Body/Page.js +38 -0
  218. data/Packages/lsd-widgets/Source/Body.js +27 -0
  219. data/Packages/lsd-widgets/Source/Button.js +34 -0
  220. data/Packages/lsd-widgets/Source/Form.js +43 -0
  221. data/Packages/lsd-widgets/Source/Input/Checkbox.js +31 -0
  222. data/Packages/lsd-widgets/Source/Input/Date.js +43 -0
  223. data/Packages/lsd-widgets/Source/Input/File.js +63 -0
  224. data/Packages/lsd-widgets/Source/Input/HTML.js +54 -0
  225. data/Packages/lsd-widgets/Source/Input/Radio.js +31 -0
  226. data/Packages/lsd-widgets/Source/Input/Range.js +61 -0
  227. data/Packages/lsd-widgets/Source/Input/Submit.js +55 -0
  228. data/Packages/lsd-widgets/Source/Input.js +62 -0
  229. data/Packages/lsd-widgets/Source/Label.js +66 -0
  230. data/Packages/lsd-widgets/Source/Menu/Context.js +39 -0
  231. data/Packages/lsd-widgets/Source/Menu/List.js +49 -0
  232. data/Packages/lsd-widgets/Source/Menu/Toolbar.Menu.js +65 -0
  233. data/Packages/lsd-widgets/Source/Menu/Toolbar.js +30 -0
  234. data/Packages/lsd-widgets/Source/Menu.js +38 -0
  235. data/Packages/lsd-widgets/Source/Progress.js +45 -0
  236. data/Packages/lsd-widgets/Source/Scrollbar.js +131 -0
  237. data/Packages/lsd-widgets/Source/Select.js +81 -0
  238. data/Packages/lsd-widgets/Source/Table/Calendar.js +127 -0
  239. data/Packages/lsd-widgets/Source/Table.js +100 -0
  240. data/Packages/lsd-widgets/Source/Textarea.js +32 -0
  241. data/Packages/lsd-widgets/package.yml +32 -0
  242. data/Packages/mootools-color/README.md +4 -0
  243. data/Packages/mootools-color/Source/Color.js +167 -0
  244. data/Packages/mootools-color/license.txt +21 -0
  245. data/Packages/mootools-color/package.yml +20 -0
  246. data/Packages/mootools-core/Docs/Browser/Browser.md +102 -0
  247. data/Packages/mootools-core/Docs/Class/Class.Extras.md +453 -0
  248. data/Packages/mootools-core/Docs/Class/Class.md +133 -0
  249. data/Packages/mootools-core/Docs/Core/Core.md +385 -0
  250. data/Packages/mootools-core/Docs/Element/Element.Dimensions.md +235 -0
  251. data/Packages/mootools-core/Docs/Element/Element.Event.md +330 -0
  252. data/Packages/mootools-core/Docs/Element/Element.Style.md +121 -0
  253. data/Packages/mootools-core/Docs/Element/Element.md +1924 -0
  254. data/Packages/mootools-core/Docs/Fx/Fx.CSS.md +12 -0
  255. data/Packages/mootools-core/Docs/Fx/Fx.Morph.md +225 -0
  256. data/Packages/mootools-core/Docs/Fx/Fx.Transitions.md +157 -0
  257. data/Packages/mootools-core/Docs/Fx/Fx.Tween.md +303 -0
  258. data/Packages/mootools-core/Docs/Fx/Fx.md +172 -0
  259. data/Packages/mootools-core/Docs/Intro.md +37 -0
  260. data/Packages/mootools-core/Docs/Request/Request.HTML.md +179 -0
  261. data/Packages/mootools-core/Docs/Request/Request.JSON.md +61 -0
  262. data/Packages/mootools-core/Docs/Request/Request.md +461 -0
  263. data/Packages/mootools-core/Docs/Types/Array.md +797 -0
  264. data/Packages/mootools-core/Docs/Types/Event.md +204 -0
  265. data/Packages/mootools-core/Docs/Types/Function.md +409 -0
  266. data/Packages/mootools-core/Docs/Types/Number.md +212 -0
  267. data/Packages/mootools-core/Docs/Types/Object.md +599 -0
  268. data/Packages/mootools-core/Docs/Types/String.md +400 -0
  269. data/Packages/mootools-core/Docs/Utilities/Cookie.md +95 -0
  270. data/Packages/mootools-core/Docs/Utilities/DOMReady.md +21 -0
  271. data/Packages/mootools-core/Docs/Utilities/JSON.md +56 -0
  272. data/Packages/mootools-core/Docs/Utilities/Swiff.md +90 -0
  273. data/Packages/mootools-core/Docs/license.md +8 -0
  274. data/Packages/mootools-core/README.md +6 -0
  275. data/Packages/mootools-core/Source/Browser/Browser.js +264 -0
  276. data/Packages/mootools-core/Source/Class/Class.Extras.js +121 -0
  277. data/Packages/mootools-core/Source/Class/Class.js +115 -0
  278. data/Packages/mootools-core/Source/Core/Core.js +511 -0
  279. data/Packages/mootools-core/Source/Element/Element.Dimensions.js +283 -0
  280. data/Packages/mootools-core/Source/Element/Element.Event.js +175 -0
  281. data/Packages/mootools-core/Source/Element/Element.Style.js +184 -0
  282. data/Packages/mootools-core/Source/Element/Element.js +862 -0
  283. data/Packages/mootools-core/Source/Fx/Fx.CSS.js +149 -0
  284. data/Packages/mootools-core/Source/Fx/Fx.Morph.js +77 -0
  285. data/Packages/mootools-core/Source/Fx/Fx.Transitions.js +113 -0
  286. data/Packages/mootools-core/Source/Fx/Fx.Tween.js +103 -0
  287. data/Packages/mootools-core/Source/Fx/Fx.js +179 -0
  288. data/Packages/mootools-core/Source/Request/Request.HTML.js +88 -0
  289. data/Packages/mootools-core/Source/Request/Request.JSON.js +46 -0
  290. data/Packages/mootools-core/Source/Request/Request.js +278 -0
  291. data/Packages/mootools-core/Source/Slick/Slick.Finder.js +970 -0
  292. data/Packages/mootools-core/Source/Slick/Slick.Parser.js +230 -0
  293. data/Packages/mootools-core/Source/Types/Array.js +178 -0
  294. data/Packages/mootools-core/Source/Types/Event.js +135 -0
  295. data/Packages/mootools-core/Source/Types/Function.js +118 -0
  296. data/Packages/mootools-core/Source/Types/Number.js +52 -0
  297. data/Packages/mootools-core/Source/Types/Object.js +209 -0
  298. data/Packages/mootools-core/Source/Types/String.js +82 -0
  299. data/Packages/mootools-core/Source/Utilities/Cookie.js +74 -0
  300. data/Packages/mootools-core/Source/Utilities/DOMReady.js +105 -0
  301. data/Packages/mootools-core/Source/Utilities/JSON.js +81 -0
  302. data/Packages/mootools-core/Source/Utilities/Swiff.js +113 -0
  303. data/Packages/mootools-core/Source/license.txt +21 -0
  304. data/Packages/mootools-core/build +40 -0
  305. data/Packages/mootools-core/package.yml +43 -0
  306. data/Packages/mootools-custom-event/Demos/index.html +147 -0
  307. data/Packages/mootools-custom-event/Demos/mootools-core.js +3183 -0
  308. data/Packages/mootools-custom-event/Demos/style.css +44 -0
  309. data/Packages/mootools-custom-event/LICENSE +24 -0
  310. data/Packages/mootools-custom-event/README.md +128 -0
  311. data/Packages/mootools-custom-event/Source/Element.defineCustomEvent.js +90 -0
  312. data/Packages/mootools-custom-event/package.yml +20 -0
  313. data/Packages/mootools-ext/Examples/Class.Includes.js +47 -0
  314. data/Packages/mootools-ext/Examples/Class.Macros.js +69 -0
  315. data/Packages/mootools-ext/Examples/Class.States.js +20 -0
  316. data/Packages/mootools-ext/Examples/_includes.haml +17 -0
  317. data/Packages/mootools-ext/Examples/examples.js +8 -0
  318. data/Packages/mootools-ext/Examples/index.haml +22 -0
  319. data/Packages/mootools-ext/README.md +8 -0
  320. data/Packages/mootools-ext/Rakefile +5 -0
  321. data/Packages/mootools-ext/Source/Core/Class.Binds.Remover.js +21 -0
  322. data/Packages/mootools-ext/Source/Core/Class.Includes.js +68 -0
  323. data/Packages/mootools-ext/Source/Core/Class.Macros.js +90 -0
  324. data/Packages/mootools-ext/Source/Core/Class.Mixin.js +89 -0
  325. data/Packages/mootools-ext/Source/Core/Class.Shortcuts.js +124 -0
  326. data/Packages/mootools-ext/Source/Core/Class.States.js +95 -0
  327. data/Packages/mootools-ext/Source/Drag/Drag.Limits.js +42 -0
  328. data/Packages/mootools-ext/Source/Drag/Slider.js +33 -0
  329. data/Packages/mootools-ext/Source/Drag/Sortables.Delegation.js +64 -0
  330. data/Packages/mootools-ext/Source/Element/Element.Selection.js +45 -0
  331. data/Packages/mootools-ext/Source/Element/Element.from.js +50 -0
  332. data/Packages/mootools-ext/Source/Element/Element.js +47 -0
  333. data/Packages/mootools-ext/Source/Element/Element.onDispose.js +36 -0
  334. data/Packages/mootools-ext/Source/Element/Events/Input.js +23 -0
  335. data/Packages/mootools-ext/Source/Element/Events/Keypress.js +65 -0
  336. data/Packages/mootools-ext/Source/Element/Properties/BorderRadius.js +41 -0
  337. data/Packages/mootools-ext/Source/Element/Properties/BoxShadow.js +61 -0
  338. data/Packages/mootools-ext/Source/Element/Properties/Data.js +32 -0
  339. data/Packages/mootools-ext/Source/Element/Properties/Item.js +210 -0
  340. data/Packages/mootools-ext/Source/Element/Properties/UserSelect.js +32 -0
  341. data/Packages/mootools-ext/Source/Element/Properties/Widget.js +32 -0
  342. data/Packages/mootools-ext/Source/Request/Request.Auto.js +38 -0
  343. data/Packages/mootools-ext/Source/Request/Request.Form.js +108 -0
  344. data/Packages/mootools-ext/Source/Request/Request.Headers.js +41 -0
  345. data/Packages/mootools-ext/Source/Request/Request.Statuses.js +95 -0
  346. data/Packages/mootools-ext/Source/Types/Event.js +336 -0
  347. data/Packages/mootools-ext/Source/Types/FastArray.js +74 -0
  348. data/Packages/mootools-ext/Source/Types/Object.js +34 -0
  349. data/Packages/mootools-ext/Source/Types/String.js +33 -0
  350. data/Packages/mootools-ext/package.yml +45 -0
  351. data/Packages/mootools-history/Demos/demo.css +14 -0
  352. data/Packages/mootools-history/Demos/demo.js +66 -0
  353. data/Packages/mootools-history/Demos/index.html +32 -0
  354. data/Packages/mootools-history/Demos/mootools-class-extras.js +27 -0
  355. data/Packages/mootools-history/Demos/mootools-core.js +4422 -0
  356. data/Packages/mootools-history/Demos/mootools.html +27 -0
  357. data/Packages/mootools-history/Demos/other.html +27 -0
  358. data/Packages/mootools-history/Demos/style.css +96 -0
  359. data/Packages/mootools-history/LICENSE +24 -0
  360. data/Packages/mootools-history/README.md +97 -0
  361. data/Packages/mootools-history/Source/History.handleInitialState.js +42 -0
  362. data/Packages/mootools-history/Source/History.js +102 -0
  363. data/Packages/mootools-history/package.yml +21 -0
  364. data/Packages/mootools-mobile/Demos/custom-event.js +91 -0
  365. data/Packages/mootools-mobile/Demos/demo.css +13 -0
  366. data/Packages/mootools-mobile/Demos/index.html +99 -0
  367. data/Packages/mootools-mobile/Demos/mootools-core.js +3831 -0
  368. data/Packages/mootools-mobile/Demos/pinch.html +60 -0
  369. data/Packages/mootools-mobile/Demos/style.css +121 -0
  370. data/Packages/mootools-mobile/Demos/swipe.html +45 -0
  371. data/Packages/mootools-mobile/Demos/touchhold.html +50 -0
  372. data/Packages/mootools-mobile/LICENSE +24 -0
  373. data/Packages/mootools-mobile/README.md +173 -0
  374. data/Packages/mootools-mobile/Source/Browser/Features.Touch.js +52 -0
  375. data/Packages/mootools-mobile/Source/Browser/Mobile.js +37 -0
  376. data/Packages/mootools-mobile/Source/Desktop/Mouse.js +60 -0
  377. data/Packages/mootools-mobile/Source/Touch/Click.js +30 -0
  378. data/Packages/mootools-mobile/Source/Touch/Pinch.js +66 -0
  379. data/Packages/mootools-mobile/Source/Touch/Swipe.js +95 -0
  380. data/Packages/mootools-mobile/Source/Touch/Touch.js +62 -0
  381. data/Packages/mootools-mobile/Source/Touch/Touchhold.js +69 -0
  382. data/Packages/mootools-mobile/package.yml +24 -0
  383. data/Packages/mootools-more/Docs/Class/Chain.Wait.md +69 -0
  384. data/Packages/mootools-more/Docs/Class/Class.Binds.md +84 -0
  385. data/Packages/mootools-more/Docs/Class/Class.Occlude.md +61 -0
  386. data/Packages/mootools-more/Docs/Class/Class.Refactor.md +65 -0
  387. data/Packages/mootools-more/Docs/Class/Events.Pseudos.md +125 -0
  388. data/Packages/mootools-more/Docs/Drag/Drag.Move.md +147 -0
  389. data/Packages/mootools-more/Docs/Drag/Drag.md +206 -0
  390. data/Packages/mootools-more/Docs/Drag/Slider.md +249 -0
  391. data/Packages/mootools-more/Docs/Drag/Sortables.md +287 -0
  392. data/Packages/mootools-more/Docs/Element/Element.Delegation.md +120 -0
  393. data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.Keys.md +67 -0
  394. data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.md +124 -0
  395. data/Packages/mootools-more/Docs/Element/Element.Forms.md +231 -0
  396. data/Packages/mootools-more/Docs/Element/Element.Measure.md +130 -0
  397. data/Packages/mootools-more/Docs/Element/Element.Pin.md +56 -0
  398. data/Packages/mootools-more/Docs/Element/Element.Position.md +77 -0
  399. data/Packages/mootools-more/Docs/Element/Element.Shortcuts.md +121 -0
  400. data/Packages/mootools-more/Docs/Element/Elements.From.md +32 -0
  401. data/Packages/mootools-more/Docs/Forms/Form.Request.Append.md +36 -0
  402. data/Packages/mootools-more/Docs/Forms/Form.Request.md +141 -0
  403. data/Packages/mootools-more/Docs/Forms/Form.Validator.Extras.md +157 -0
  404. data/Packages/mootools-more/Docs/Forms/Form.Validator.Inline.md +100 -0
  405. data/Packages/mootools-more/Docs/Forms/Form.Validator.md +666 -0
  406. data/Packages/mootools-more/Docs/Forms/OverText.md +237 -0
  407. data/Packages/mootools-more/Docs/Fx/Fx.Accordion.md +178 -0
  408. data/Packages/mootools-more/Docs/Fx/Fx.Elements.md +114 -0
  409. data/Packages/mootools-more/Docs/Fx/Fx.Move.md +160 -0
  410. data/Packages/mootools-more/Docs/Fx/Fx.Reveal.md +235 -0
  411. data/Packages/mootools-more/Docs/Fx/Fx.Scroll.md +291 -0
  412. data/Packages/mootools-more/Docs/Fx/Fx.Slide.md +272 -0
  413. data/Packages/mootools-more/Docs/Fx/Fx.SmoothScroll.md +50 -0
  414. data/Packages/mootools-more/Docs/Fx/Fx.Sort.md +201 -0
  415. data/Packages/mootools-more/Docs/Interface/HtmlTable.Select.md +246 -0
  416. data/Packages/mootools-more/Docs/Interface/HtmlTable.Sort.md +193 -0
  417. data/Packages/mootools-more/Docs/Interface/HtmlTable.Zebra.md +94 -0
  418. data/Packages/mootools-more/Docs/Interface/HtmlTable.md +250 -0
  419. data/Packages/mootools-more/Docs/Interface/Keyboard.Extras.md +163 -0
  420. data/Packages/mootools-more/Docs/Interface/Keyboard.md +226 -0
  421. data/Packages/mootools-more/Docs/Interface/Mask.md +232 -0
  422. data/Packages/mootools-more/Docs/Interface/Scroller.md +97 -0
  423. data/Packages/mootools-more/Docs/Interface/Spinner.md +284 -0
  424. data/Packages/mootools-more/Docs/Interface/Tips.md +267 -0
  425. data/Packages/mootools-more/Docs/Locale/Date.md +222 -0
  426. data/Packages/mootools-more/Docs/Locale/Form.Validator.md +197 -0
  427. data/Packages/mootools-more/Docs/Locale/Locale.Set.From.md +29 -0
  428. data/Packages/mootools-more/Docs/Locale/Locale.md +208 -0
  429. data/Packages/mootools-more/Docs/Locale/Number.md +97 -0
  430. data/Packages/mootools-more/Docs/More/More.md +20 -0
  431. data/Packages/mootools-more/Docs/Request/Request.JSONP.md +126 -0
  432. data/Packages/mootools-more/Docs/Request/Request.Periodical.md +82 -0
  433. data/Packages/mootools-more/Docs/Request/Request.Queue.md +337 -0
  434. data/Packages/mootools-more/Docs/Types/Array.Extras.md +193 -0
  435. data/Packages/mootools-more/Docs/Types/Date.Extras.md +97 -0
  436. data/Packages/mootools-more/Docs/Types/Date.md +564 -0
  437. data/Packages/mootools-more/Docs/Types/Hash.Extras.md +111 -0
  438. data/Packages/mootools-more/Docs/Types/Hash.md +633 -0
  439. data/Packages/mootools-more/Docs/Types/Number.Format.md +91 -0
  440. data/Packages/mootools-more/Docs/Types/Object.Extras.md +134 -0
  441. data/Packages/mootools-more/Docs/Types/String.Extras.md +188 -0
  442. data/Packages/mootools-more/Docs/Types/String.QueryString.md +56 -0
  443. data/Packages/mootools-more/Docs/Types/URI.Relative.md +46 -0
  444. data/Packages/mootools-more/Docs/Types/URI.md +213 -0
  445. data/Packages/mootools-more/Docs/Utilities/Assets.md +175 -0
  446. data/Packages/mootools-more/Docs/Utilities/Color.md +276 -0
  447. data/Packages/mootools-more/Docs/Utilities/Group.md +75 -0
  448. data/Packages/mootools-more/Docs/Utilities/Hash.Cookie.md +117 -0
  449. data/Packages/mootools-more/Docs/Utilities/IframeShim.md +136 -0
  450. data/Packages/mootools-more/Docs/Utilities/Table.md +114 -0
  451. data/Packages/mootools-more/Docs/license.md +8 -0
  452. data/Packages/mootools-more/README.md +244 -0
  453. data/Packages/mootools-more/Source/Class/Chain.Wait.js +63 -0
  454. data/Packages/mootools-more/Source/Class/Class.Binds.js +37 -0
  455. data/Packages/mootools-more/Source/Class/Class.Occlude.js +38 -0
  456. data/Packages/mootools-more/Source/Class/Class.Refactor.js +41 -0
  457. data/Packages/mootools-more/Source/Class/Events.Pseudos.js +180 -0
  458. data/Packages/mootools-more/Source/Drag/Drag.Move.js +197 -0
  459. data/Packages/mootools-more/Source/Drag/Drag.js +234 -0
  460. data/Packages/mootools-more/Source/Drag/Slider.js +225 -0
  461. data/Packages/mootools-more/Source/Drag/Sortables.js +233 -0
  462. data/Packages/mootools-more/Source/Element/Element.Delegation.js +140 -0
  463. data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.Keys.js +82 -0
  464. data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.js +36 -0
  465. data/Packages/mootools-more/Source/Element/Element.Forms.js +140 -0
  466. data/Packages/mootools-more/Source/Element/Element.Measure.js +170 -0
  467. data/Packages/mootools-more/Source/Element/Element.Pin.js +130 -0
  468. data/Packages/mootools-more/Source/Element/Element.Position.js +235 -0
  469. data/Packages/mootools-more/Source/Element/Element.Shortcuts.js +76 -0
  470. data/Packages/mootools-more/Source/Element/Elements.From.js +40 -0
  471. data/Packages/mootools-more/Source/Forms/Form.Request.Append.js +77 -0
  472. data/Packages/mootools-more/Source/Forms/Form.Request.js +203 -0
  473. data/Packages/mootools-more/Source/Forms/Form.Validator.Extras.js +231 -0
  474. data/Packages/mootools-more/Source/Forms/Form.Validator.Inline.js +190 -0
  475. data/Packages/mootools-more/Source/Forms/Form.Validator.js +523 -0
  476. data/Packages/mootools-more/Source/Forms/OverText.js +258 -0
  477. data/Packages/mootools-more/Source/Fx/Fx.Accordion.js +240 -0
  478. data/Packages/mootools-more/Source/Fx/Fx.Elements.js +74 -0
  479. data/Packages/mootools-more/Source/Fx/Fx.Move.js +71 -0
  480. data/Packages/mootools-more/Source/Fx/Fx.Reveal.js +246 -0
  481. data/Packages/mootools-more/Source/Fx/Fx.Scroll.js +180 -0
  482. data/Packages/mootools-more/Source/Fx/Fx.Slide.js +170 -0
  483. data/Packages/mootools-more/Source/Fx/Fx.SmoothScroll.js +70 -0
  484. data/Packages/mootools-more/Source/Fx/Fx.Sort.js +172 -0
  485. data/Packages/mootools-more/Source/Interface/HtmlTable.Select.js +352 -0
  486. data/Packages/mootools-more/Source/Interface/HtmlTable.Sort.js +349 -0
  487. data/Packages/mootools-more/Source/Interface/HtmlTable.Zebra.js +64 -0
  488. data/Packages/mootools-more/Source/Interface/HtmlTable.js +150 -0
  489. data/Packages/mootools-more/Source/Interface/Keyboard.Extras.js +109 -0
  490. data/Packages/mootools-more/Source/Interface/Keyboard.js +242 -0
  491. data/Packages/mootools-more/Source/Interface/Mask.js +211 -0
  492. data/Packages/mootools-more/Source/Interface/Scroller.js +104 -0
  493. data/Packages/mootools-more/Source/Interface/Spinner.js +216 -0
  494. data/Packages/mootools-more/Source/Interface/Tips.js +259 -0
  495. data/Packages/mootools-more/Source/Locale/Locale.EU.Number.js +30 -0
  496. data/Packages/mootools-more/Source/Locale/Locale.Set.From.js +52 -0
  497. data/Packages/mootools-more/Source/Locale/Locale.ar.Date.js +28 -0
  498. data/Packages/mootools-more/Source/Locale/Locale.ar.Form.Validator.js +40 -0
  499. data/Packages/mootools-more/Source/Locale/Locale.ca-CA.Date.js +55 -0
  500. data/Packages/mootools-more/Source/Locale/Locale.ca-CA.Form.Validator.js +55 -0
  501. data/Packages/mootools-more/Source/Locale/Locale.cs-CZ.Date.js +80 -0
  502. data/Packages/mootools-more/Source/Locale/Locale.cs-CZ.Form.Validator.js +55 -0
  503. data/Packages/mootools-more/Source/Locale/Locale.da-DK.Date.js +68 -0
  504. data/Packages/mootools-more/Source/Locale/Locale.da-DK.Form.Validator.js +54 -0
  505. data/Packages/mootools-more/Source/Locale/Locale.de-CH.Date.js +22 -0
  506. data/Packages/mootools-more/Source/Locale/Locale.de-CH.Form.Validator.js +55 -0
  507. data/Packages/mootools-more/Source/Locale/Locale.de-DE.Date.js +70 -0
  508. data/Packages/mootools-more/Source/Locale/Locale.de-DE.Form.Validator.js +57 -0
  509. data/Packages/mootools-more/Source/Locale/Locale.de-DE.Number.js +22 -0
  510. data/Packages/mootools-more/Source/Locale/Locale.en-GB.Date.js +29 -0
  511. data/Packages/mootools-more/Source/Locale/Locale.en-US.Date.js +70 -0
  512. data/Packages/mootools-more/Source/Locale/Locale.en-US.Form.Validator.js +55 -0
  513. data/Packages/mootools-more/Source/Locale/Locale.en-US.Number.js +51 -0
  514. data/Packages/mootools-more/Source/Locale/Locale.es-AR.Date.js +23 -0
  515. data/Packages/mootools-more/Source/Locale/Locale.es-AR.Form.Validator.js +54 -0
  516. data/Packages/mootools-more/Source/Locale/Locale.es-ES.Date.js +67 -0
  517. data/Packages/mootools-more/Source/Locale/Locale.es-ES.Form.Validator.js +54 -0
  518. data/Packages/mootools-more/Source/Locale/Locale.es-VE.Date.js +22 -0
  519. data/Packages/mootools-more/Source/Locale/Locale.es-VE.Form.Validator.js +34 -0
  520. data/Packages/mootools-more/Source/Locale/Locale.es-VE.Number.js +44 -0
  521. data/Packages/mootools-more/Source/Locale/Locale.et-EE.Date.js +67 -0
  522. data/Packages/mootools-more/Source/Locale/Locale.et-EE.Form.Validator.js +54 -0
  523. data/Packages/mootools-more/Source/Locale/Locale.fa.Date.js +66 -0
  524. data/Packages/mootools-more/Source/Locale/Locale.fa.Form.Validator.js +55 -0
  525. data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Date.js +72 -0
  526. data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Form.Validator.js +55 -0
  527. data/Packages/mootools-more/Source/Locale/Locale.fi-FI.Number.js +26 -0
  528. data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Date.js +70 -0
  529. data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Form.Validator.js +56 -0
  530. data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Number.js +27 -0
  531. data/Packages/mootools-more/Source/Locale/Locale.he-IL.Date.js +67 -0
  532. data/Packages/mootools-more/Source/Locale/Locale.he-IL.Form.Validator.js +55 -0
  533. data/Packages/mootools-more/Source/Locale/Locale.he-IL.Number.js +30 -0
  534. data/Packages/mootools-more/Source/Locale/Locale.hu-HU.Date.js +67 -0
  535. data/Packages/mootools-more/Source/Locale/Locale.hu-HU.Form.Validator.js +55 -0
  536. data/Packages/mootools-more/Source/Locale/Locale.it-IT.Date.js +68 -0
  537. data/Packages/mootools-more/Source/Locale/Locale.it-IT.Form.Validator.js +55 -0
  538. data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Date.js +67 -0
  539. data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Form.Validator.js +54 -0
  540. data/Packages/mootools-more/Source/Locale/Locale.ja-JP.Number.js +31 -0
  541. data/Packages/mootools-more/Source/Locale/Locale.js +188 -0
  542. data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Date.js +68 -0
  543. data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Form.Validator.js +57 -0
  544. data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Number.js +25 -0
  545. data/Packages/mootools-more/Source/Locale/Locale.no-NO.Date.js +39 -0
  546. data/Packages/mootools-more/Source/Locale/Locale.no-NO.Form.Validator.js +40 -0
  547. data/Packages/mootools-more/Source/Locale/Locale.pl-PL.Date.js +57 -0
  548. data/Packages/mootools-more/Source/Locale/Locale.pl-PL.Form.Validator.js +54 -0
  549. data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Date.js +27 -0
  550. data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Form.Validator.js +55 -0
  551. data/Packages/mootools-more/Source/Locale/Locale.pt-BR.Number.js +33 -0
  552. data/Packages/mootools-more/Source/Locale/Locale.pt-PT.Date.js +67 -0
  553. data/Packages/mootools-more/Source/Locale/Locale.pt-PT.Form.Validator.js +40 -0
  554. data/Packages/mootools-more/Source/Locale/Locale.ru-RU.Date.js +98 -0
  555. data/Packages/mootools-more/Source/Locale/Locale.ru-RU.Form.Validator.js +46 -0
  556. data/Packages/mootools-more/Source/Locale/Locale.si-SI.Date.js +75 -0
  557. data/Packages/mootools-more/Source/Locale/Locale.si-SI.Form.Validator.js +55 -0
  558. data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Date.js +55 -0
  559. data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Form.Validator.js +54 -0
  560. data/Packages/mootools-more/Source/Locale/Locale.sv-SE.Number.js +29 -0
  561. data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Date.js +67 -0
  562. data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Form.Validator.js +55 -0
  563. data/Packages/mootools-more/Source/Locale/Locale.tr-TR.Number.js +29 -0
  564. data/Packages/mootools-more/Source/Locale/Locale.uk-UA.Date.js +82 -0
  565. data/Packages/mootools-more/Source/Locale/Locale.uk-UA.Form.Validator.js +54 -0
  566. data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Date.js +117 -0
  567. data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Form.Validator.js +110 -0
  568. data/Packages/mootools-more/Source/Locale/Locale.zh-CH.Number.js +32 -0
  569. data/Packages/mootools-more/Source/More/More.js +33 -0
  570. data/Packages/mootools-more/Source/Request/Request.JSONP.js +142 -0
  571. data/Packages/mootools-more/Source/Request/Request.Periodical.js +51 -0
  572. data/Packages/mootools-more/Source/Request/Request.Queue.js +212 -0
  573. data/Packages/mootools-more/Source/Types/Array.Extras.js +79 -0
  574. data/Packages/mootools-more/Source/Types/Date.Extras.js +117 -0
  575. data/Packages/mootools-more/Source/Types/Date.js +559 -0
  576. data/Packages/mootools-more/Source/Types/Hash.Extras.js +38 -0
  577. data/Packages/mootools-more/Source/Types/Hash.js +145 -0
  578. data/Packages/mootools-more/Source/Types/Number.Format.js +105 -0
  579. data/Packages/mootools-more/Source/Types/Object.Extras.js +66 -0
  580. data/Packages/mootools-more/Source/Types/String.Extras.js +148 -0
  581. data/Packages/mootools-more/Source/Types/String.QueryString.js +68 -0
  582. data/Packages/mootools-more/Source/Types/URI.Relative.js +57 -0
  583. data/Packages/mootools-more/Source/Types/URI.js +169 -0
  584. data/Packages/mootools-more/Source/Utilities/Assets.js +131 -0
  585. data/Packages/mootools-more/Source/Utilities/Color.js +162 -0
  586. data/Packages/mootools-more/Source/Utilities/Group.js +60 -0
  587. data/Packages/mootools-more/Source/Utilities/Hash.Cookie.js +61 -0
  588. data/Packages/mootools-more/Source/Utilities/IframeShim.js +130 -0
  589. data/Packages/mootools-more/Source/Utilities/Table.js +57 -0
  590. data/Packages/mootools-more/Source/license.txt +21 -0
  591. data/Packages/mootools-more/Styles/Interface/Mask/mask.css +8 -0
  592. data/Packages/mootools-more/Styles/Interface/Spinner/spinner.css +19 -0
  593. data/Packages/mootools-more/Styles/Interface/Spinner/spinner.gif +0 -0
  594. data/Packages/mootools-more/Tests/Interactive/Class/Chain.Wait_(tween).html +14 -0
  595. data/Packages/mootools-more/Tests/Interactive/Class/Chain.Wait_(tween).yml +2 -0
  596. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(basic).html +39 -0
  597. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(basic).yml +3 -0
  598. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).html +130 -0
  599. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).yml +3 -0
  600. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag).html +46 -0
  601. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag).yml +3 -0
  602. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag_border).html +48 -0
  603. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(drag_in_drag_border).yml +3 -0
  604. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(droppables).html +88 -0
  605. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(droppables).yml +3 -0
  606. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(no_offsetParent).html +42 -0
  607. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(no_offsetParent).yml +3 -0
  608. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(position_right_bottom).html +41 -0
  609. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(style_false).html +23 -0
  610. data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(style_false).yml +3 -0
  611. data/Packages/mootools-more/Tests/Interactive/Drag/Drag_(resize).html +48 -0
  612. data/Packages/mootools-more/Tests/Interactive/Drag/Drag_(resize).yml +2 -0
  613. data/Packages/mootools-more/Tests/Interactive/Drag/Slider.html +169 -0
  614. data/Packages/mootools-more/Tests/Interactive/Drag/Slider.yml +2 -0
  615. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(images).html +19 -0
  616. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(images).yml +2 -0
  617. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(multi).html +44 -0
  618. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(multi).yml +2 -0
  619. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(revert).html +51 -0
  620. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(single).html +67 -0
  621. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(single).yml +2 -0
  622. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(table).html +46 -0
  623. data/Packages/mootools-more/Tests/Interactive/Drag/Sortables_(table).yml +2 -0
  624. data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation.html +89 -0
  625. data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation.yml +2 -0
  626. data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation_(focus_blur).yml +2 -0
  627. data/Packages/mootools-more/Tests/Interactive/Element/Element.Delegation_(non_bubbling).html +126 -0
  628. data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.Keys.html +39 -0
  629. data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.Keys.yml +3 -0
  630. data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.html +56 -0
  631. data/Packages/mootools-more/Tests/Interactive/Element/Element.Forms.html +125 -0
  632. data/Packages/mootools-more/Tests/Interactive/Element/Element.Forms.yml +2 -0
  633. data/Packages/mootools-more/Tests/Interactive/Element/Element.Pin.html +46 -0
  634. data/Packages/mootools-more/Tests/Interactive/Element/Element.Pin.yml +2 -0
  635. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(basic).html +118 -0
  636. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(basic).yml +2 -0
  637. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolled).html +47 -0
  638. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolled).yml +2 -0
  639. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolling).html +46 -0
  640. data/Packages/mootools-more/Tests/Interactive/Element/Element.Position_(scrolling).yml +2 -0
  641. data/Packages/mootools-more/Tests/Interactive/Element/Element.Shortcuts.html +171 -0
  642. data/Packages/mootools-more/Tests/Interactive/Element/Element.Shortcuts.yml +2 -0
  643. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.Append.html +29 -0
  644. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.Append.yml +3 -0
  645. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.html +49 -0
  646. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Request.yml +2 -0
  647. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras.html +88 -0
  648. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras.yml +3 -0
  649. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras_(data-).html +87 -0
  650. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Extras_(data-).yml +3 -0
  651. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline.html +54 -0
  652. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline.yml +3 -0
  653. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-).html +54 -0
  654. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-).yml +3 -0
  655. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-warnings).html +42 -0
  656. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(data-warnings).yml +3 -0
  657. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onBlur).html +60 -0
  658. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onBlur).yml +3 -0
  659. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onChange).html +68 -0
  660. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(onChange).yml +3 -0
  661. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(single_input).html +33 -0
  662. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(single_input).yml +3 -0
  663. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(warnings).html +42 -0
  664. data/Packages/mootools-more/Tests/Interactive/Forms/Form.Validator.Inline_(warnings).yml +3 -0
  665. data/Packages/mootools-more/Tests/Interactive/Forms/OverText.html +116 -0
  666. data/Packages/mootools-more/Tests/Interactive/Forms/OverText.yml +2 -0
  667. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Accordion.html +152 -0
  668. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Accordion.yml +2 -0
  669. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Elements.html +34 -0
  670. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Elements.yml +2 -0
  671. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Move.html +91 -0
  672. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Move.yml +2 -0
  673. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Reveal.html +42 -0
  674. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Reveal.yml +2 -0
  675. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(element).html +107 -0
  676. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(element).yml +2 -0
  677. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(window).html +88 -0
  678. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Scroll_(window).yml +2 -0
  679. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Slide.html +63 -0
  680. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Slide.yml +2 -0
  681. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.SmoothScroll.html +77 -0
  682. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.SmoothScroll.yml +3 -0
  683. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Sort.html +100 -0
  684. data/Packages/mootools-more/Tests/Interactive/Fx/Fx.Sort.yml +2 -0
  685. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.Select.html +109 -0
  686. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.Select.yml +3 -0
  687. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.html +46 -0
  688. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable.yml +2 -0
  689. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(empty_and_refill).html +46 -0
  690. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(empty_and_refill).yml +2 -0
  691. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).html +43 -0
  692. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).yml +2 -0
  693. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(sortable).html +256 -0
  694. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(sortable).yml +3 -0
  695. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).html +93 -0
  696. data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).yml +3 -0
  697. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).html +129 -0
  698. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).yml +2 -0
  699. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).html +93 -0
  700. data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).yml +2 -0
  701. data/Packages/mootools-more/Tests/Interactive/Interface/Mask.html +63 -0
  702. data/Packages/mootools-more/Tests/Interactive/Interface/Mask.yml +2 -0
  703. data/Packages/mootools-more/Tests/Interactive/Interface/Scroller.html +40 -0
  704. data/Packages/mootools-more/Tests/Interactive/Interface/Scroller.yml +2 -0
  705. data/Packages/mootools-more/Tests/Interactive/Interface/Scroller_(With_Drag).html +45 -0
  706. data/Packages/mootools-more/Tests/Interactive/Interface/Scroller_(With_Drag).yml +3 -0
  707. data/Packages/mootools-more/Tests/Interactive/Interface/Spinner.html +125 -0
  708. data/Packages/mootools-more/Tests/Interactive/Interface/Spinner.yml +3 -0
  709. data/Packages/mootools-more/Tests/Interactive/Interface/Tips.html +156 -0
  710. data/Packages/mootools-more/Tests/Interactive/Interface/Tips.yml +2 -0
  711. data/Packages/mootools-more/Tests/Interactive/Interface/Tips_(offset).html +64 -0
  712. data/Packages/mootools-more/Tests/Interactive/Interface/Tips_(offset).yml +3 -0
  713. data/Packages/mootools-more/Tests/Interactive/README.md +3 -0
  714. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP.html +22 -0
  715. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP.yml +2 -0
  716. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(async).html +33 -0
  717. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(async).yml +2 -0
  718. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(timeout).html +46 -0
  719. data/Packages/mootools-more/Tests/Interactive/Request/Request.JSONP_(timeout).yml +2 -0
  720. data/Packages/mootools-more/Tests/Interactive/Request/Request.Periodical.html +38 -0
  721. data/Packages/mootools-more/Tests/Interactive/Request/Request.Periodical.yml +2 -0
  722. data/Packages/mootools-more/Tests/Interactive/Request/Request.Queue.html +42 -0
  723. data/Packages/mootools-more/Tests/Interactive/Request/Request.Queue.yml +2 -0
  724. data/Packages/mootools-more/Tests/Interactive/Utilities/Assets.html +78 -0
  725. data/Packages/mootools-more/Tests/Interactive/Utilities/Assets.yml +2 -0
  726. data/Packages/mootools-more/Tests/Interactive/Utilities/IframeShim.html +36 -0
  727. data/Packages/mootools-more/Tests/Interactive/Utilities/IframeShim.yml +2 -0
  728. data/Packages/mootools-more/Tests/Interactive/_assets/Assets.css.test.css +24 -0
  729. data/Packages/mootools-more/Tests/Interactive/_assets/Assets.js.test.js +3 -0
  730. data/Packages/mootools-more/Tests/Interactive/_assets/bullet_arrow_down.png +0 -0
  731. data/Packages/mootools-more/Tests/Interactive/_assets/bullet_arrow_up.png +0 -0
  732. data/Packages/mootools-more/Tests/Interactive/_assets/cow.png +0 -0
  733. data/Packages/mootools-more/Tests/Interactive/_assets/mask.css +8 -0
  734. data/Packages/mootools-more/Tests/Interactive/_assets/mediaplayer.swf +0 -0
  735. data/Packages/mootools-more/Tests/Interactive/_assets/mootools.png +0 -0
  736. data/Packages/mootools-more/Tests/Interactive/_assets/spinner.css +19 -0
  737. data/Packages/mootools-more/Tests/Interactive/_assets/spinner.gif +0 -0
  738. data/Packages/mootools-more/Tests/Interactive/_assets/video.flv +0 -0
  739. data/Packages/mootools-more/Tests/Specs/1.3/Class/Chain.Wait.js +74 -0
  740. data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Binds.js +91 -0
  741. data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Occlude.js +49 -0
  742. data/Packages/mootools-more/Tests/Specs/1.3/Class/Class.Refactor.js +103 -0
  743. data/Packages/mootools-more/Tests/Specs/1.3/Class/Events.Pseudos.js +367 -0
  744. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Delegation.js +32 -0
  745. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.Keys.js +33 -0
  746. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.js +69 -0
  747. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Forms.js +155 -0
  748. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Measure.js +92 -0
  749. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Pin.js +131 -0
  750. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Position.js +181 -0
  751. data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Shortcuts.js +93 -0
  752. data/Packages/mootools-more/Tests/Specs/1.3/Element/Elements.From.js +22 -0
  753. data/Packages/mootools-more/Tests/Specs/1.3/Forms/Form.Validator.js +384 -0
  754. data/Packages/mootools-more/Tests/Specs/1.3/Fx/Fx.Reveal.js +24 -0
  755. data/Packages/mootools-more/Tests/Specs/1.3/Fx/Fx.Slide.js +21 -0
  756. data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Select.js +153 -0
  757. data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Sort.js +181 -0
  758. data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.Zebra.js +39 -0
  759. data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.js +153 -0
  760. data/Packages/mootools-more/Tests/Specs/1.3/Interface/Keyboard.js +130 -0
  761. data/Packages/mootools-more/Tests/Specs/1.3/Locale/Locale.js +104 -0
  762. data/Packages/mootools-more/Tests/Specs/1.3/Request/Request.JSONP.js +55 -0
  763. data/Packages/mootools-more/Tests/Specs/1.3/Types/Array.Extras.js +119 -0
  764. data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.Extras.js +80 -0
  765. data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.js +709 -0
  766. data/Packages/mootools-more/Tests/Specs/1.3/Types/Hash.Extras.js +21 -0
  767. data/Packages/mootools-more/Tests/Specs/1.3/Types/Hash.js +202 -0
  768. data/Packages/mootools-more/Tests/Specs/1.3/Types/Number.Format.js +90 -0
  769. data/Packages/mootools-more/Tests/Specs/1.3/Types/Object.Extras.js +105 -0
  770. data/Packages/mootools-more/Tests/Specs/1.3/Types/Object.Extras_client.js +17 -0
  771. data/Packages/mootools-more/Tests/Specs/1.3/Types/String.Extras.js +72 -0
  772. data/Packages/mootools-more/Tests/Specs/1.3/Types/String.QueryString.js +63 -0
  773. data/Packages/mootools-more/Tests/Specs/1.3/Types/URI.Relative.js +114 -0
  774. data/Packages/mootools-more/Tests/Specs/1.3/Types/URI.js +123 -0
  775. data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Assets.js +211 -0
  776. data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Color.js +78 -0
  777. data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Group.js +25 -0
  778. data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Hash.Cookie.js +50 -0
  779. data/Packages/mootools-more/Tests/Specs/1.3/Utilities/Table.js +56 -0
  780. data/Packages/mootools-more/Tests/Specs/Configuration.js +245 -0
  781. data/Packages/mootools-more/Tests/Specs/assets/Assets.css.test.css +24 -0
  782. data/Packages/mootools-more/Tests/Specs/assets/Assets.js.test.js +3 -0
  783. data/Packages/mootools-more/Tests/Specs/assets/cow.png +0 -0
  784. data/Packages/mootools-more/Tests/Specs/assets/jsonp.js +8 -0
  785. data/Packages/mootools-more/Tests/Specs/assets/mootools.png +0 -0
  786. data/Packages/mootools-more/Tests/Specs/index.html +26 -0
  787. data/Packages/mootools-more/Tests/Specs/package.yml +47 -0
  788. data/Packages/mootools-more/build +40 -0
  789. data/Packages/mootools-more/package.yml +145 -0
  790. data/Packages/mootools-resource/README.md +60 -0
  791. data/Packages/mootools-resource/Source/Resource.Collection.js +40 -0
  792. data/Packages/mootools-resource/Source/Resource.Model.Actions.js +98 -0
  793. data/Packages/mootools-resource/Source/Resource.Model.js +175 -0
  794. data/Packages/mootools-resource/Source/Resource.Parser.HTML.js +28 -0
  795. data/Packages/mootools-resource/Source/Resource.Parser.JSON.js +35 -0
  796. data/Packages/mootools-resource/Source/Resource.Parser.XML.js +31 -0
  797. data/Packages/mootools-resource/Source/Resource.Parser.js +50 -0
  798. data/Packages/mootools-resource/Source/Resource.js +282 -0
  799. data/Packages/mootools-resource/package.yml +18 -0
  800. data/Packages/mootools-speedups/README.md +10 -0
  801. data/Packages/mootools-speedups/Source/Core/Class.Extras.Speedups.js +14 -0
  802. data/Packages/mootools-speedups/Source/Core/Class.Speedups.js +129 -0
  803. data/Packages/mootools-speedups/Source/Core/Core.Speedups.js +89 -0
  804. data/Packages/mootools-speedups/Source/Types/Object.js +36 -0
  805. data/Packages/mootools-speedups/package.yml +19 -0
  806. data/Packages/mootools-string-inflections/README.md +292 -0
  807. data/Packages/mootools-string-inflections/Source/String.Inflections.js +230 -0
  808. data/Packages/mootools-string-inflections/TODO.md +2 -0
  809. data/Packages/mootools-string-inflections/Tests/index.html +12 -0
  810. data/Packages/mootools-string-inflections/Tests/test.js +95 -0
  811. data/Packages/mootools-string-inflections/package.yml +7 -0
  812. data/Packages/qfocuser/README +63 -0
  813. data/Packages/qfocuser/Source/QFocuser.js +278 -0
  814. data/Packages/qfocuser/package.yml +8 -0
  815. data/Packages/slick/Makefile +19 -0
  816. data/Packages/slick/README.md +127 -0
  817. data/Packages/slick/SlickSpec/Configuration.js +56 -0
  818. data/Packages/slick/SlickSpec/assets/JSSpecHelpers.js +187 -0
  819. data/Packages/slick/SlickSpec/assets/getgetter.js +65 -0
  820. data/Packages/slick/SlickSpec/assets/ie.css +37 -0
  821. data/Packages/slick/SlickSpec/assets/moobugger/bookmarklet.html +46 -0
  822. data/Packages/slick/SlickSpec/assets/moobugger/debugger-iframe.js +386 -0
  823. data/Packages/slick/SlickSpec/assets/moobugger/debugger.css +190 -0
  824. data/Packages/slick/SlickSpec/assets/moobugger/debugger.html +25 -0
  825. data/Packages/slick/SlickSpec/assets/moobugger/debugger.js +284 -0
  826. data/Packages/slick/SlickSpec/assets/moobugger/images/close.png +0 -0
  827. data/Packages/slick/SlickSpec/assets/moobugger/images/error.png +0 -0
  828. data/Packages/slick/SlickSpec/assets/moobugger/images/group-close.png +0 -0
  829. data/Packages/slick/SlickSpec/assets/moobugger/images/group-open.png +0 -0
  830. data/Packages/slick/SlickSpec/assets/moobugger/images/icon.png +0 -0
  831. data/Packages/slick/SlickSpec/assets/moobugger/images/info.png +0 -0
  832. data/Packages/slick/SlickSpec/assets/moobugger/images/lick.png +0 -0
  833. data/Packages/slick/SlickSpec/assets/moobugger/images/max.png +0 -0
  834. data/Packages/slick/SlickSpec/assets/moobugger/images/min.png +0 -0
  835. data/Packages/slick/SlickSpec/assets/moobugger/images/mootools.png +0 -0
  836. data/Packages/slick/SlickSpec/assets/moobugger/images/time.png +0 -0
  837. data/Packages/slick/SlickSpec/assets/moobugger/images/warning.png +0 -0
  838. data/Packages/slick/SlickSpec/assets/moobugger/mootools.js +57 -0
  839. data/Packages/slick/SlickSpec/assets/moobugger/test.html +88 -0
  840. data/Packages/slick/SlickSpec/assets/screen.css +259 -0
  841. data/Packages/slick/SlickSpec/assets/simple_request.js +67 -0
  842. data/Packages/slick/SlickSpec/assets/slickspec.css +366 -0
  843. data/Packages/slick/SlickSpec/bootstrap/moo12.slickspec.js +55 -0
  844. data/Packages/slick/SlickSpec/bootstrap/nwmatcher.slickspec.js +27 -0
  845. data/Packages/slick/SlickSpec/bootstrap/sizzle.slickspec.js +65 -0
  846. data/Packages/slick/SlickSpec/bootstrap/slick.slickspec.js +66 -0
  847. data/Packages/slick/SlickSpec/bootstrap/yui.slickspec.js +36 -0
  848. data/Packages/slick/SlickSpec/index.html +26 -0
  849. data/Packages/slick/SlickSpec/mocks/MooTools_Logo.svg +24 -0
  850. data/Packages/slick/SlickSpec/mocks/html5-shim.html +70 -0
  851. data/Packages/slick/SlickSpec/mocks/query_test-dojo.html +79 -0
  852. data/Packages/slick/SlickSpec/mocks/query_test-google_closure.html +72 -0
  853. data/Packages/slick/SlickSpec/mocks/query_test-jquery.html +213 -0
  854. data/Packages/slick/SlickSpec/mocks/query_test-prototype.html +95 -0
  855. data/Packages/slick/SlickSpec/mocks/query_test-slick.html +20 -0
  856. data/Packages/slick/SlickSpec/mocks/query_test-yui.html +88 -0
  857. data/Packages/slick/SlickSpec/mocks/template-almost.html +2932 -0
  858. data/Packages/slick/SlickSpec/mocks/template-chromeframe.html +2932 -0
  859. data/Packages/slick/SlickSpec/mocks/template-ie7.html +2932 -0
  860. data/Packages/slick/SlickSpec/mocks/template-quirks.html +2932 -0
  861. data/Packages/slick/SlickSpec/mocks/template-standard.html +2932 -0
  862. data/Packages/slick/SlickSpec/mocks/template-transitional.html +2932 -0
  863. data/Packages/slick/SlickSpec/mocks/template.xhtml +2476 -0
  864. data/Packages/slick/SlickSpec/mocks/template.xml +2475 -0
  865. data/Packages/slick/SlickSpec/mocks/xml.xml +21 -0
  866. data/Packages/slick/SlickSpec/select.html +107 -0
  867. data/Packages/slick/SlickSpec/setup.js +93 -0
  868. data/Packages/slick/SlickSpec/slickspec.html +261 -0
  869. data/Packages/slick/SlickSpec/specrunner_browser.html +69 -0
  870. data/Packages/slick/SlickSpec/specs/api.js +167 -0
  871. data/Packages/slick/SlickSpec/specs/browser_bugs.js +269 -0
  872. data/Packages/slick/SlickSpec/specs/dojo.js +260 -0
  873. data/Packages/slick/SlickSpec/specs/engine_bugs.js +388 -0
  874. data/Packages/slick/SlickSpec/specs/google_closure.js +176 -0
  875. data/Packages/slick/SlickSpec/specs/html.js +58 -0
  876. data/Packages/slick/SlickSpec/specs/html5.js +40 -0
  877. data/Packages/slick/SlickSpec/specs/isxml.js +24 -0
  878. data/Packages/slick/SlickSpec/specs/jquery.js +465 -0
  879. data/Packages/slick/SlickSpec/specs/match.js +139 -0
  880. data/Packages/slick/SlickSpec/specs/mock_template.js +360 -0
  881. data/Packages/slick/SlickSpec/specs/parser.js +409 -0
  882. data/Packages/slick/SlickSpec/specs/prototype.js +428 -0
  883. data/Packages/slick/SlickSpec/specs/select_exhaustive.js +84 -0
  884. data/Packages/slick/SlickSpec/specs/select_nth-child.js +64 -0
  885. data/Packages/slick/SlickSpec/specs/syntax.js +45 -0
  886. data/Packages/slick/SlickSpec/specs/unit.js +87 -0
  887. data/Packages/slick/SlickSpec/specs/xml.js +47 -0
  888. data/Packages/slick/SlickSpec/specs/yui.js +510 -0
  889. data/Packages/slick/SlickSpec/user-specs/pseudos.html +45 -0
  890. data/Packages/slick/Source/Slick.Finder.js +1012 -0
  891. data/Packages/slick/Source/Slick.Parser.js +231 -0
  892. data/Packages/slick/Source/slick.js +10 -0
  893. data/Packages/slick/package.json +12 -0
  894. data/Packages/slick/package.yml +19 -0
  895. data/Packages/slick/speed/frameworks/dojo-acme.js +1625 -0
  896. data/Packages/slick/speed/frameworks/dojo.js +16 -0
  897. data/Packages/slick/speed/frameworks/domass.js +1365 -0
  898. data/Packages/slick/speed/frameworks/jquery.js +4376 -0
  899. data/Packages/slick/speed/frameworks/mootools-core-1.3.js +5367 -0
  900. data/Packages/slick/speed/frameworks/mootools-slick.js +626 -0
  901. data/Packages/slick/speed/frameworks/mootools.js +4329 -0
  902. data/Packages/slick/speed/frameworks/native.js +0 -0
  903. data/Packages/slick/speed/frameworks/nwmatcher.js +1264 -0
  904. data/Packages/slick/speed/frameworks/prototype.js +4320 -0
  905. data/Packages/slick/speed/frameworks/sizzle.js +1102 -0
  906. data/Packages/slick/speed/frameworks/slick.js +1099 -0
  907. data/Packages/slick/speed/frameworks/sly.js +857 -0
  908. data/Packages/slick/speed/frameworks/yass.css3.js +490 -0
  909. data/Packages/slick/speed/jslitmus/JSLitmus.js +714 -0
  910. data/Packages/slick/speed/jslitmus/JSLitmusHelpers.js +3 -0
  911. data/Packages/slick/speed/jslitmus/bench_catch.html +49 -0
  912. data/Packages/slick/speed/jslitmus/bench_match.html +214 -0
  913. data/Packages/slick/speed/jslitmus/bench_match.js +98 -0
  914. data/Packages/slick/speed/jslitmus/bench_parse.html +161 -0
  915. data/Packages/slick/speed/jslitmus/bench_parse.js +68 -0
  916. data/Packages/slick/speed/jslitmus/bench_select.html +198 -0
  917. data/Packages/slick/speed/jslitmus/bench_select.js +106 -0
  918. data/Packages/slick/speed/jslitmus/bench_select2.js +106 -0
  919. data/Packages/slick/speed/jslitmus/bench_uidOf.html +121 -0
  920. data/Packages/slick/speed/jslitmus/closedNodes.html +92 -0
  921. data/Packages/slick/speed/jslitmus/demo.html +97 -0
  922. data/Packages/slick/speed/jslitmus/get_attribute.html +75 -0
  923. data/Packages/slick/speed/jslitmus/label_break-vs-fn_return.html +65 -0
  924. data/Packages/slick/speed/jslitmus/label_string-vs-var.html +94 -0
  925. data/Packages/slick/speed/jslitmus/method_vs_propfn.html +109 -0
  926. data/Packages/slick/speed/jslitmus/nodeListtoArray.html +89 -0
  927. data/Packages/slick/speed/jslitmus/parse_vs_clone.html +41 -0
  928. data/Packages/slick/speed/jslitmus/results.html +68 -0
  929. data/Packages/slick/speed/jslitmus/select.html +25 -0
  930. data/Packages/slick/speed/jslitmus/selectHTML.html +206 -0
  931. data/Packages/slick/speed/jslitmus/selectXML.html +140 -0
  932. data/Packages/slick/speed/jslitmus/select_class-doctypes.html +150 -0
  933. data/Packages/slick/speed/jslitmus/select_class.html +92 -0
  934. data/Packages/slick/speed/jslitmus/select_id.html +133 -0
  935. data/Packages/slick/speed/slickspeed/config.ini +54 -0
  936. data/Packages/slick/speed/slickspeed/footer.html +3 -0
  937. data/Packages/slick/speed/slickspeed/header.php +28 -0
  938. data/Packages/slick/speed/slickspeed/index.php +36 -0
  939. data/Packages/slick/speed/slickspeed/instructions.txt +4 -0
  940. data/Packages/slick/speed/slickspeed/logo.png +0 -0
  941. data/Packages/slick/speed/slickspeed/selectors.list.crazy.css +319 -0
  942. data/Packages/slick/speed/slickspeed/selectors.list.css +40 -0
  943. data/Packages/slick/speed/slickspeed/selectors.list.extended.css +81 -0
  944. data/Packages/slick/speed/slickspeed/selectors.list.mine.css +54 -0
  945. data/Packages/slick/speed/slickspeed/selectors.list.org.css +37 -0
  946. data/Packages/slick/speed/slickspeed/selectors.list.simple.css +105 -0
  947. data/Packages/slick/speed/slickspeed/selectors.list.sly.css +54 -0
  948. data/Packages/slick/speed/slickspeed/selectors.list.yahoo.css +33 -0
  949. data/Packages/slick/speed/slickspeed/style.css +197 -0
  950. data/Packages/slick/speed/slickspeed/system/index.php +172 -0
  951. data/Packages/slick/speed/slickspeed/system/slickspeed.js +162 -0
  952. data/Packages/slick/speed/slickspeed/system/template.php +154 -0
  953. data/Packages/slick/speed/slickspeed/system_slackerspeed/index.php +295 -0
  954. data/Packages/slick/speed/slickspeed/system_slackerspeed/slickspeed.js +147 -0
  955. data/Packages/slick/speed/slickspeed/system_slackerspeed/template.php +54 -0
  956. data/Packages/slick/speed/slickspeed/template.html +2921 -0
  957. data/Packages/slick/speed/slickspeed/template.yahoo.html +1 -0
  958. data/Packages/slick/speed/speedtests/deepmatch/index.html +294 -0
  959. data/Packages/slick/speed/speedtests/index.html +14 -0
  960. data/Packages/slick/speed/speedtests/setdocument/index.html +44 -0
  961. data/Packages/slick/speed/speedtests/setdocument/slow-document.js +69 -0
  962. data/Packages/slick/speed/subtleslickspeed/README.mdown +6 -0
  963. data/Packages/slick/speed/subtleslickspeed/lib/ie.css +26 -0
  964. data/Packages/slick/speed/subtleslickspeed/lib/jslib.js +389 -0
  965. data/Packages/slick/speed/subtleslickspeed/lib/own_tests/report_test.html +64 -0
  966. data/Packages/slick/speed/subtleslickspeed/lib/print.css +30 -0
  967. data/Packages/slick/speed/subtleslickspeed/lib/screen.css +251 -0
  968. data/Packages/slick/speed/subtleslickspeed/lib/subtlesandbox.js +174 -0
  969. data/Packages/slick/speed/subtleslickspeed/lib/subtlesandbox_strict.html +18 -0
  970. data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.js +290 -0
  971. data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.reports.js +87 -0
  972. data/Packages/slick/speed/subtleslickspeed/lib/subtleslickspeed.reports.table.js +353 -0
  973. data/Packages/slick/speed/subtleslickspeed/lib/table_report.css +241 -0
  974. data/Packages/slick/speed/subtleslickspeed/selectors.html +156 -0
  975. data/Packages/slick/speed/subtleslickspeed/string_replace.html +2998 -0
  976. data/Packages/slick/speed/subtleslickspeed/tests/selectors/template.html +14 -0
  977. data/Packages/slick/speed/subtleslickspeed/tests/selectors/template.js +2924 -0
  978. data/Packages/slick/speed/subtleslickspeed/tests/selectors/tests.js +177 -0
  979. data/lib/lsd/helper.rb +12 -0
  980. data/lib/lsd/packages.rb +25 -0
  981. data/lib/lsd/railtie.rb +33 -0
  982. data/lib/lsd/source.rb +37 -0
  983. data/lib/lsd/widget_generator.rb +24 -0
  984. data/lib/lsd.rake +17 -0
  985. data/lib/lsd.rb +20 -0
  986. data/lib/templates/Application.js +37 -0
  987. data/lib/templates/Widget.js +25 -0
  988. data/lib/templates/app_name.js +18 -0
  989. data/lib/templates/new_widget.js +25 -0
  990. data/lib/templates/package.yml +18 -0
  991. metadata +1053 -0
@@ -0,0 +1,2932 @@
1
+ <!DOCTYPE html>
2
+
3
+
4
+ <html lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
7
+
8
+
9
+ <title>template xhtml as html</title>
10
+ <script src="../assets/getgetter.js" type="text/javascript" charset="utf-8"></script>
11
+ </head>
12
+ <body>
13
+ <div class="head">
14
+ <p><a href="http://www.w3.org/"><img height=48 alt=W3C src="http://www.w3.org/Icons/w3c_home" width=72></a>
15
+
16
+ <h1 id="title">Selectors</h1>
17
+
18
+ <h2>W3C Working Draft 15 December 2005</h2>
19
+
20
+ <dl>
21
+
22
+ <dt>This version:
23
+
24
+ <dd><a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215">
25
+ http://www.w3.org/TR/2005/WD-css3-selectors-20051215</a>
26
+
27
+ <dt>Latest version:
28
+
29
+ <dd><a href="http://www.w3.org/TR/css3-selectors">
30
+ http://www.w3.org/TR/css3-selectors</a>
31
+
32
+ <dt>Previous version:
33
+
34
+ <dd><a href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113">
35
+ http://www.w3.org/TR/2001/CR-css3-selectors-20011113</a>
36
+
37
+ <dt><a name=editors-list></a>Editors:
38
+
39
+ <dd class="vcard"><span class="fn">Daniel Glazman</span> (Invited Expert)</dd>
40
+
41
+ <dd class="vcard"><a lang="tr" class="url fn" href="http://www.tantek.com/">Tantek &Ccedil;elik</a> (Invited Expert)
42
+
43
+ <dd class="vcard"><a href="mailto:ian@hixie.ch" class="url fn">Ian Hickson</a> (<span
44
+ class="company"><a href="http://www.google.com/">Google</a></span>)
45
+
46
+ <dd class="vcard"><span class="fn">Peter Linss</span> (former editor, <span class="company"><a
47
+ href="http://www.netscape.com/">Netscape/AOL</a></span>)
48
+
49
+ <dd class="vcard"><span class="fn">John Williams</span> (former editor, <span class="company"><a
50
+ href="http://www.quark.com/">Quark, Inc.</a></span>)
51
+
52
+ </dl>
53
+
54
+ <p class="copyright"><a
55
+ href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
56
+ Copyright</a> &copy; 2005 <a href="http://www.w3.org/"><abbr
57
+ title="World Wide Web Consortium">W3C</abbr></a><sup>&reg;</sup>
58
+ (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts
59
+ Institute of Technology">MIT</abbr></a>, <a
60
+ href="http://www.ercim.org/"><acronym title="European Research
61
+ Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a
62
+ href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C
63
+ <a
64
+ href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
65
+ <a
66
+ href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
67
+ <a
68
+ href="http://www.w3.org/Consortium/Legal/copyright-documents">document
69
+ use</a> rules apply.
70
+
71
+ <hr title="Separator for header">
72
+
73
+ </div>
74
+
75
+ <h2><a name=abstract></a>Abstract</h2>
76
+
77
+ <p><em>Selectors</em> are patterns that match against elements in a
78
+ tree. Selectors have been optimized for use with HTML and XML, and
79
+ are designed to be usable in performance-critical code.</p>
80
+
81
+ <p><acronym title="Cascading Style Sheets">CSS</acronym> (Cascading
82
+ Style Sheets) is a language for describing the rendering of <acronym
83
+ title="Hypertext Markup Language">HTML</acronym> and <acronym
84
+ title="Extensible Markup Language">XML</acronym> documents on
85
+ screen, on paper, in speech, etc. CSS uses Selectors for binding
86
+ style properties to elements in the document. This document
87
+ describes extensions to the selectors defined in CSS level 2. These
88
+ extended selectors will be used by CSS level 3.
89
+
90
+ <p>Selectors define the following function:</p>
91
+
92
+ <pre>expression &#x2217; element &rarr; boolean</pre>
93
+
94
+ <p>That is, given an element and a selector, this specification
95
+ defines whether that element matches the selector.</p>
96
+
97
+ <p>These expressions can also be used, for instance, to select a set
98
+ of elements, or a single element from a set of elements, by
99
+ evaluating the expression across all the elements in a
100
+ subtree. <acronym title="Simple Tree Transformation
101
+ Sheets">STTS</acronym> (Simple Tree Transformation Sheets), a
102
+ language for transforming XML trees, uses this mechanism. <a href="#refsSTTS">[STTS]</a></p>
103
+
104
+ <h2><a name=status></a>Status of this document</h2>
105
+
106
+ <p><em>This section describes the status of this document at the
107
+ time of its publication. Other documents may supersede this
108
+ document. A list of current W3C publications and the latest revision
109
+ of this technical report can be found in the <a
110
+ href="http://www.w3.org/TR/">W3C technical reports index at
111
+ http://www.w3.org/TR/.</a></em></p>
112
+
113
+ <p>This document describes the selectors that already exist in <a
114
+ href="#refsCSS1"><abbr title="CSS level 1">CSS1</abbr></a> and <a
115
+ href="#refsCSS21"><abbr title="CSS level 2">CSS2</abbr></a>, and
116
+ also proposes new selectors for <abbr title="CSS level
117
+ 3">CSS3</abbr> and other languages that may need them.</p>
118
+
119
+ <p>The CSS Working Group doesn't expect that all implementations of
120
+ CSS3 will have to implement all selectors. Instead, there will
121
+ probably be a small number of variants of CSS3, called profiles. For
122
+ example, it may be that only a profile for interactive user agents
123
+ will include all of the selectors.</p>
124
+
125
+ <p>This specification is a last call working draft for the the <a
126
+ href="http://www.w3.org/Style/CSS/members">CSS Working Group</a>
127
+ (<a href="/Style/">Style Activity</a>). This
128
+ document is a revision of the <a
129
+ href="http://www.w3.org/TR/2001/CR-css3-selectors-20011113/">Candidate
130
+ Recommendation dated 2001 November 13</a>, and has incorporated
131
+ implementation feedback received in the past few years. It is
132
+ expected that this last call will proceed straight to Proposed
133
+ Recommendation stage since it is believed that interoperability will
134
+ be demonstrable.</p>
135
+
136
+ <p>All persons are encouraged to review and implement this
137
+ specification and return comments to the (<a
138
+ href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
139
+ public mailing list <a
140
+ href="http://www.w3.org/Mail/Lists.html#www-style">www-style</a>
141
+ (see <a href="http://www.w3.org/Mail/Request">instructions</a>). W3C
142
+ Members can also send comments directly to the CSS Working
143
+ Group.
144
+ The deadline for comments is 14 January 2006.</p>
145
+
146
+ <p>This is still a draft document and may be updated, replaced, or
147
+ obsoleted by other documents at any time. It is inappropriate to
148
+ cite a W3C Working Draft as other than &quot;work in progress&quot;.
149
+
150
+ <p>This document may be available in <a
151
+ href="http://www.w3.org/Style/css3-selectors-updates/translations">translation</a>.
152
+ The English version of this specification is the only normative
153
+ version.
154
+
155
+ <div class="subtoc">
156
+
157
+ <h2><a name=contents>Table of contents</a></h2>
158
+
159
+ <ul class="toc">
160
+ <li class="tocline2"><a href="#context">1. Introduction</a>
161
+ <ul>
162
+ <li><a href="#dependencies">1.1. Dependencies</a> </li>
163
+ <li><a href="#terminology">1.2. Terminology</a> </li>
164
+ <li><a href="#changesFromCSS2">1.3. Changes from CSS2</a> </li>
165
+ </ul>
166
+ <li class="tocline2"><a href="#selectors">2. Selectors</a>
167
+ <li class="tocline2"><a href="#casesens">3. Case sensitivity</a>
168
+ <li class="tocline2"><a href="#selector-syntax">4. Selector syntax</a>
169
+ <li class="tocline2"><a href="#grouping">5. Groups of selectors</a>
170
+ <li class="tocline2"><a href="#simple-selectors">6. Simple selectors</a>
171
+ <ul class="toc">
172
+ <li class="tocline3"><a href="#type-selectors">6.1. Type selectors</a>
173
+ <ul class="toc">
174
+ <li class="tocline4"><a href="#typenmsp">6.1.1. Type selectors and namespaces</a></li>
175
+ </ul>
176
+ <li class="tocline3"><a href="#universal-selector">6.2. Universal selector</a>
177
+ <ul>
178
+ <li><a href="#univnmsp">6.2.1. Universal selector and namespaces</a></li>
179
+ </ul>
180
+ <li class="tocline3"><a href="#attribute-selectors">6.3. Attribute selectors</a>
181
+ <ul class="toc">
182
+ <li class="tocline4"><a href="#attribute-representation">6.3.1. Representation of attributes and attributes values</a>
183
+ <li><a href="#attribute-substrings">6.3.2. Substring matching attribute selectors</a>
184
+ <li class="tocline4"><a href="#attrnmsp">6.3.3. Attribute selectors and namespaces</a>
185
+ <li class="tocline4"><a href="#def-values">6.3.4. Default attribute values in DTDs</a></li>
186
+ </ul>
187
+ <li class="tocline3"><a href="#class-html">6.4. Class selectors</a>
188
+ <li class="tocline3"><a href="#id-selectors">6.5. ID selectors</a>
189
+ <li class="tocline3"><a href="#pseudo-classes">6.6. Pseudo-classes</a>
190
+ <ul class="toc">
191
+ <li class="tocline4"><a href="#dynamic-pseudos">6.6.1. Dynamic pseudo-classes</a>
192
+ <li class="tocline4"><a href="#target-pseudo">6.6.2. The :target pseudo-class</a>
193
+ <li class="tocline4"><a href="#lang-pseudo">6.6.3. The :lang() pseudo-class</a>
194
+ <li class="tocline4"><a href="#UIstates">6.6.4. UI element states pseudo-classes</a>
195
+ <li class="tocline4"><a href="#structural-pseudos">6.6.5. Structural pseudo-classes</a>
196
+ <ul>
197
+ <li><a href="#root-pseudo">:root pseudo-class</a>
198
+ <li><a href="#nth-child-pseudo">:nth-child() pseudo-class</a>
199
+ <li><a href="#nth-last-child-pseudo">:nth-last-child()</a>
200
+ <li><a href="#nth-of-type-pseudo">:nth-of-type() pseudo-class</a>
201
+ <li><a href="#nth-last-of-type-pseudo">:nth-last-of-type()</a>
202
+ <li><a href="#first-child-pseudo">:first-child pseudo-class</a>
203
+ <li><a href="#last-child-pseudo">:last-child pseudo-class</a>
204
+ <li><a href="#first-of-type-pseudo">:first-of-type pseudo-class</a>
205
+ <li><a href="#last-of-type-pseudo">:last-of-type pseudo-class</a>
206
+ <li><a href="#only-child-pseudo">:only-child pseudo-class</a>
207
+ <li><a href="#only-of-type-pseudo">:only-of-type pseudo-class</a>
208
+ <li><a href="#empty-pseudo">:empty pseudo-class</a></li>
209
+ </ul>
210
+ <li class="tocline4"><a href="#negation">6.6.7. The negation pseudo-class</a></li>
211
+ </ul>
212
+ </li>
213
+ </ul>
214
+ <li><a href="#pseudo-elements">7. Pseudo-elements</a>
215
+ <ul>
216
+ <li><a href="#first-line">7.1. The ::first-line pseudo-element</a>
217
+ <li><a href="#first-letter">7.2. The ::first-letter pseudo-element</a>
218
+ <li><a href="#UIfragments">7.3. The ::selection pseudo-element</a>
219
+ <li><a href="#gen-content">7.4. The ::before and ::after pseudo-elements</a></li>
220
+ </ul>
221
+ <li class="tocline2"><a href="#combinators">8. Combinators</a>
222
+ <ul class="toc">
223
+ <li class="tocline3"><a href="#descendant-combinators">8.1. Descendant combinators</a>
224
+ <li class="tocline3"><a href="#child-combinators">8.2. Child combinators</a>
225
+ <li class="tocline3"><a href="#sibling-combinators">8.3. Sibling combinators</a>
226
+ <ul class="toc">
227
+ <li class="tocline4"><a href="#adjacent-sibling-combinators">8.3.1. Adjacent sibling combinator</a>
228
+ <li class="tocline4"><a href="#general-sibling-combinators">8.3.2. General sibling combinator</a></li>
229
+ </ul>
230
+ </li>
231
+ </ul>
232
+ <li class="tocline2"><a href="#specificity">9. Calculating a selector's specificity</a>
233
+ <li class="tocline2"><a href="#w3cselgrammar">10. The grammar of Selectors</a>
234
+ <ul class="toc">
235
+ <li class="tocline3"><a href="#grammar">10.1. Grammar</a>
236
+ <li class="tocline3"><a href="#lex">10.2. Lexical scanner</a></li>
237
+ </ul>
238
+ <li class="tocline2"><a href="#downlevel">11. Namespaces and down-level clients</a>
239
+ <li class="tocline2"><a href="#profiling">12. Profiles</a>
240
+ <li><a href="#Conformance">13. Conformance and requirements</a>
241
+ <li><a href="#Tests">14. Tests</a>
242
+ <li><a href="#ACKS">15. Acknowledgements</a>
243
+ <li class="tocline2"><a href="#references">16. References</a>
244
+ </ul>
245
+
246
+ </div>
247
+
248
+ <h2><a name=context>1. Introduction</a></h2>
249
+
250
+ <h3><a name=dependencies></a>1.1. Dependencies</h3>
251
+
252
+ <p>Some features of this specification are specific to CSS, or have
253
+ particular limitations or rules specific to CSS. In this
254
+ specification, these have been described in terms of CSS2.1. <a
255
+ href="#refsCSS21">[CSS21]</a></p>
256
+
257
+ <h3><a name=terminology></a>1.2. Terminology</h3>
258
+
259
+ <p>All of the text of this specification is normative except
260
+ examples, notes, and sections explicitly marked as
261
+ non-normative.</p>
262
+
263
+ <h3><a name=changesFromCSS2></a>1.3. Changes from CSS2</h3>
264
+
265
+ <p><em>This section is non-normative.</em></p>
266
+
267
+ <p>The main differences between the selectors in CSS2 and those in
268
+ Selectors are:
269
+
270
+ <ul>
271
+
272
+ <li>the list of basic definitions (selector, group of selectors,
273
+ simple selector, etc.) has been changed; in particular, what was
274
+ referred to in CSS2 as a simple selector is now called a sequence
275
+ of simple selectors, and the term "simple selector" is now used for
276
+ the components of this sequence</li>
277
+
278
+ <li>an optional namespace component is now allowed in type element
279
+ selectors, the universal selector and attribute selectors</li>
280
+
281
+ <li>a <a href="#general-sibling-combinators">new combinator</a> has been introduced</li>
282
+
283
+ <li>new simple selectors including substring matching attribute
284
+ selectors, and new pseudo-classes</li>
285
+
286
+ <li>new pseudo-elements, and introduction of the "::" convention
287
+ for pseudo-elements</li>
288
+
289
+ <li>the grammar has been rewritten</li>
290
+
291
+ <li>profiles to be added to specifications integrating Selectors
292
+ and defining the set of selectors which is actually supported by
293
+ each specification</li>
294
+
295
+ <li>Selectors are now a CSS3 Module and an independent
296
+ specification; other specifications can now refer to this document
297
+ independently of CSS</li>
298
+
299
+ <li>the specification now has its own test suite</li>
300
+
301
+ </ul>
302
+
303
+ <h2><a name=selectors></a>2. Selectors</h2>
304
+
305
+ <p><em>This section is non-normative, as it merely summarizes the
306
+ following sections.</em></p>
307
+
308
+ <p>A Selector represents a structure. This structure can be used as a
309
+ condition (e.g. in a CSS rule) that determines which elements a
310
+ selector matches in the document tree, or as a flat description of the
311
+ HTML or XML fragment corresponding to that structure.</p>
312
+
313
+ <p>Selectors may range from simple element names to rich contextual
314
+ representations.</p>
315
+
316
+ <p>The following table summarizes the Selector syntax:</p>
317
+
318
+ <table class="selectorsReview">
319
+ <thead>
320
+ <tr>
321
+ <th class="pattern">Pattern</th>
322
+ <th class="meaning">Meaning</th>
323
+ <th class="described">Described in section</th>
324
+ <th class="origin">First defined in CSS level</th></tr>
325
+ <tbody>
326
+ <tr>
327
+ <td class="pattern">*</td>
328
+ <td class="meaning">any element</td>
329
+ <td class="described"><a
330
+ href="#universal-selector">Universal
331
+ selector</a></td>
332
+ <td class="origin">2</td></tr>
333
+ <tr>
334
+ <td class="pattern">E</td>
335
+ <td class="meaning">an element of type E</td>
336
+ <td class="described"><a
337
+ href="#type-selectors">Type selector</a></td>
338
+ <td class="origin">1</td></tr>
339
+ <tr>
340
+ <td class="pattern">E[foo]</td>
341
+ <td class="meaning">an E element with a "foo" attribute</td>
342
+ <td class="described"><a
343
+ href="#attribute-selectors">Attribute
344
+ selectors</a></td>
345
+ <td class="origin">2</td></tr>
346
+ <tr>
347
+ <td class="pattern">E[foo="bar"]</td>
348
+ <td class="meaning">an E element whose "foo" attribute value is exactly
349
+ equal to "bar"</td>
350
+ <td class="described"><a
351
+ href="#attribute-selectors">Attribute
352
+ selectors</a></td>
353
+ <td class="origin">2</td></tr>
354
+ <tr>
355
+ <td class="pattern">E[foo~="bar"]</td>
356
+ <td class="meaning">an E element whose "foo" attribute value is a list of
357
+ space-separated values, one of which is exactly equal to "bar"</td>
358
+ <td class="described"><a
359
+ href="#attribute-selectors">Attribute
360
+ selectors</a></td>
361
+ <td class="origin">2</td></tr>
362
+ <tr>
363
+ <td class="pattern">E[foo^="bar"]</td>
364
+ <td class="meaning">an E element whose "foo" attribute value begins exactly
365
+ with the string "bar"</td>
366
+ <td class="described"><a
367
+ href="#attribute-selectors">Attribute
368
+ selectors</a></td>
369
+ <td class="origin">3</td></tr>
370
+ <tr>
371
+ <td class="pattern">E[foo$="bar"]</td>
372
+ <td class="meaning">an E element whose "foo" attribute value ends exactly
373
+ with the string "bar"</td>
374
+ <td class="described"><a
375
+ href="#attribute-selectors">Attribute
376
+ selectors</a></td>
377
+ <td class="origin">3</td></tr>
378
+ <tr>
379
+ <td class="pattern">E[foo*="bar"]</td>
380
+ <td class="meaning">an E element whose "foo" attribute value contains the
381
+ substring "bar"</td>
382
+ <td class="described"><a
383
+ href="#attribute-selectors">Attribute
384
+ selectors</a></td>
385
+ <td class="origin">3</td></tr>
386
+ <tr>
387
+ <td class="pattern">E[hreflang|="en"]</td>
388
+ <td class="meaning">an E element whose "hreflang" attribute has a hyphen-separated
389
+ list of values beginning (from the left) with "en"</td>
390
+ <td class="described"><a
391
+ href="#attribute-selectors">Attribute
392
+ selectors</a></td>
393
+ <td class="origin">2</td></tr>
394
+ <tr>
395
+ <td class="pattern">E:root</td>
396
+ <td class="meaning">an E element, root of the document</td>
397
+ <td class="described"><a
398
+ href="#structural-pseudos">Structural
399
+ pseudo-classes</a></td>
400
+ <td class="origin">3</td></tr>
401
+ <tr>
402
+ <td class="pattern">E:nth-child(n)</td>
403
+ <td class="meaning">an E element, the n-th child of its parent</td>
404
+ <td class="described"><a
405
+ href="#structural-pseudos">Structural
406
+ pseudo-classes</a></td>
407
+ <td class="origin">3</td></tr>
408
+ <tr>
409
+ <td class="pattern">E:nth-last-child(n)</td>
410
+ <td class="meaning">an E element, the n-th child of its parent, counting
411
+ from the last one</td>
412
+ <td class="described"><a
413
+ href="#structural-pseudos">Structural
414
+ pseudo-classes</a></td>
415
+ <td class="origin">3</td></tr>
416
+ <tr>
417
+ <td class="pattern">E:nth-of-type(n)</td>
418
+ <td class="meaning">an E element, the n-th sibling of its type</td>
419
+ <td class="described"><a
420
+ href="#structural-pseudos">Structural
421
+ pseudo-classes</a></td>
422
+ <td class="origin">3</td></tr>
423
+ <tr>
424
+ <td class="pattern">E:nth-last-of-type(n)</td>
425
+ <td class="meaning">an E element, the n-th sibling of its type, counting
426
+ from the last one</td>
427
+ <td class="described"><a
428
+ href="#structural-pseudos">Structural
429
+ pseudo-classes</a></td>
430
+ <td class="origin">3</td></tr>
431
+ <tr>
432
+ <td class="pattern">E:first-child</td>
433
+ <td class="meaning">an E element, first child of its parent</td>
434
+ <td class="described"><a
435
+ href="#structural-pseudos">Structural
436
+ pseudo-classes</a></td>
437
+ <td class="origin">2</td></tr>
438
+ <tr>
439
+ <td class="pattern">E:last-child</td>
440
+ <td class="meaning">an E element, last child of its parent</td>
441
+ <td class="described"><a
442
+ href="#structural-pseudos">Structural
443
+ pseudo-classes</a></td>
444
+ <td class="origin">3</td></tr>
445
+ <tr>
446
+ <td class="pattern">E:first-of-type</td>
447
+ <td class="meaning">an E element, first sibling of its type</td>
448
+ <td class="described"><a
449
+ href="#structural-pseudos">Structural
450
+ pseudo-classes</a></td>
451
+ <td class="origin">3</td></tr>
452
+ <tr>
453
+ <td class="pattern">E:last-of-type</td>
454
+ <td class="meaning">an E element, last sibling of its type</td>
455
+ <td class="described"><a
456
+ href="#structural-pseudos">Structural
457
+ pseudo-classes</a></td>
458
+ <td class="origin">3</td></tr>
459
+ <tr>
460
+ <td class="pattern">E:only-child</td>
461
+ <td class="meaning">an E element, only child of its parent</td>
462
+ <td class="described"><a
463
+ href="#structural-pseudos">Structural
464
+ pseudo-classes</a></td>
465
+ <td class="origin">3</td></tr>
466
+ <tr>
467
+ <td class="pattern">E:only-of-type</td>
468
+ <td class="meaning">an E element, only sibling of its type</td>
469
+ <td class="described"><a
470
+ href="#structural-pseudos">Structural
471
+ pseudo-classes</a></td>
472
+ <td class="origin">3</td></tr>
473
+ <tr>
474
+ <td class="pattern">E:empty</td>
475
+ <td class="meaning">an E element that has no children (including text
476
+ nodes)</td>
477
+ <td class="described"><a
478
+ href="#structural-pseudos">Structural
479
+ pseudo-classes</a></td>
480
+ <td class="origin">3</td></tr>
481
+ <tr>
482
+ <td class="pattern">E:link<br>E:visited</td>
483
+ <td class="meaning">an E element being the source anchor of a hyperlink of
484
+ which the target is not yet visited (:link) or already visited
485
+ (:visited)</td>
486
+ <td class="described"><a
487
+ href="#link">The link
488
+ pseudo-classes</a></td>
489
+ <td class="origin">1</td></tr>
490
+ <tr>
491
+ <td class="pattern">E:active<br>E:hover<br>E:focus</td>
492
+ <td class="meaning">an E element during certain user actions</td>
493
+ <td class="described"><a
494
+ href="#useraction-pseudos">The user
495
+ action pseudo-classes</a></td>
496
+ <td class="origin">1 and 2</td></tr>
497
+ <tr>
498
+ <td class="pattern">E:target</td>
499
+ <td class="meaning">an E element being the target of the referring URI</td>
500
+ <td class="described"><a
501
+ href="#target-pseudo">The target
502
+ pseudo-class</a></td>
503
+ <td class="origin">3</td></tr>
504
+ <tr>
505
+ <td class="pattern">E:lang(fr)</td>
506
+ <td class="meaning">an element of type E in language "fr" (the document
507
+ language specifies how language is determined)</td>
508
+ <td class="described"><a
509
+ href="#lang-pseudo">The :lang()
510
+ pseudo-class</a></td>
511
+ <td class="origin">2</td></tr>
512
+ <tr>
513
+ <td class="pattern">E:enabled<br>E:disabled</td>
514
+ <td class="meaning">a user interface element E which is enabled or
515
+ disabled</td>
516
+ <td class="described"><a
517
+ href="#UIstates">The UI element states
518
+ pseudo-classes</a></td>
519
+ <td class="origin">3</td></tr>
520
+ <tr>
521
+ <td class="pattern">E:checked<!--<br>E:indeterminate--></td>
522
+ <td class="meaning">a user interface element E which is checked<!-- or in an
523
+ indeterminate state--> (for instance a radio-button or checkbox)</td>
524
+ <td class="described"><a
525
+ href="#UIstates">The UI element states
526
+ pseudo-classes</a></td>
527
+ <td class="origin">3</td></tr>
528
+ <tr>
529
+ <td class="pattern">E::first-line</td>
530
+ <td class="meaning">the first formatted line of an E element</td>
531
+ <td class="described"><a
532
+ href="#first-line">The ::first-line
533
+ pseudo-element</a></td>
534
+ <td class="origin">1</td></tr>
535
+ <tr>
536
+ <td class="pattern">E::first-letter</td>
537
+ <td class="meaning">the first formatted letter of an E element</td>
538
+ <td class="described"><a
539
+ href="#first-letter">The ::first-letter
540
+ pseudo-element</a></td>
541
+ <td class="origin">1</td></tr>
542
+ <tr>
543
+ <td class="pattern">E::selection</td>
544
+ <td class="meaning">the portion of an E element that is currently
545
+ selected/highlighted by the user</td>
546
+ <td class="described"><a
547
+ href="#UIfragments">The UI element
548
+ fragments pseudo-elements</a></td>
549
+ <td class="origin">3</td></tr>
550
+ <tr>
551
+ <td class="pattern">E::before</td>
552
+ <td class="meaning">generated content before an E element</td>
553
+ <td class="described"><a
554
+ href="#gen-content">The ::before
555
+ pseudo-element</a></td>
556
+ <td class="origin">2</td></tr>
557
+ <tr>
558
+ <td class="pattern">E::after</td>
559
+ <td class="meaning">generated content after an E element</td>
560
+ <td class="described"><a
561
+ href="#gen-content">The ::after
562
+ pseudo-element</a></td>
563
+ <td class="origin">2</td></tr>
564
+ <tr>
565
+ <td class="pattern">E.warning</td>
566
+ <td class="meaning">an E element whose class is
567
+ "warning" (the document language specifies how class is determined).</td>
568
+ <td class="described"><a
569
+ href="#class-html">Class
570
+ selectors</a></td>
571
+ <td class="origin">1</td></tr>
572
+ <tr>
573
+ <td class="pattern">E#myid</td>
574
+ <td class="meaning">an E element with ID equal to "myid".</td>
575
+ <td class="described"><a
576
+ href="#id-selectors">ID
577
+ selectors</a></td>
578
+ <td class="origin">1</td></tr>
579
+ <tr>
580
+ <td class="pattern">E:not(s)</td>
581
+ <td class="meaning">an E element that does not match simple selector s</td>
582
+ <td class="described"><a
583
+ href="#negation">Negation
584
+ pseudo-class</a></td>
585
+ <td class="origin">3</td></tr>
586
+ <tr>
587
+ <td class="pattern">E F</td>
588
+ <td class="meaning">an F element descendant of an E element</td>
589
+ <td class="described"><a
590
+ href="#descendant-combinators">Descendant
591
+ combinator</a></td>
592
+ <td class="origin">1</td></tr>
593
+ <tr>
594
+ <td class="pattern">E &gt; F</td>
595
+ <td class="meaning">an F element child of an E element</td>
596
+ <td class="described"><a
597
+ href="#child-combinators">Child
598
+ combinator</a></td>
599
+ <td class="origin">2</td></tr>
600
+ <tr>
601
+ <td class="pattern">E + F</td>
602
+ <td class="meaning">an F element immediately preceded by an E element</td>
603
+ <td class="described"><a
604
+ href="#adjacent-sibling-combinators">Adjacent sibling combinator</a></td>
605
+ <td class="origin">2</td></tr>
606
+ <tr>
607
+ <td class="pattern">E ~ F</td>
608
+ <td class="meaning">an F element preceded by an E element</td>
609
+ <td class="described"><a
610
+ href="#general-sibling-combinators">General sibling combinator</a></td>
611
+ <td class="origin">3</td></tr></tbody></table>
612
+
613
+ <p>The meaning of each selector is derived from the table above by
614
+ prepending "matches" to the contents of each cell in the "Meaning"
615
+ column.</p>
616
+
617
+ <h2><a name=casesens>3. Case sensitivity</a></h2>
618
+
619
+ <p>The case sensitivity of document language element names, attribute
620
+ names, and attribute values in selectors depends on the document
621
+ language. For example, in HTML, element names are case-insensitive,
622
+ but in XML, they are case-sensitive.</p>
623
+
624
+ <h2><a name=selector-syntax>4. Selector syntax</a></h2>
625
+
626
+ <p>A <dfn><a name=selector>selector</a></dfn> is a chain of one
627
+ or more <a href="#sequence">sequences of simple selectors</a>
628
+ separated by <a href="#combinators">combinators</a>.</p>
629
+
630
+ <p>A <dfn><a name=sequence>sequence of simple selectors</a></dfn>
631
+ is a chain of <a href="#simple-selectors-dfn">simple selectors</a>
632
+ that are not separated by a <a href="#combinators">combinator</a>. It
633
+ always begins with a <a href="#type-selectors">type selector</a> or a
634
+ <a href="#universal-selector">universal selector</a>. No other type
635
+ selector or universal selector is allowed in the sequence.</p>
636
+
637
+ <p>A <dfn><a name=simple-selectors-dfn></a><a
638
+ href="#simple-selectors">simple selector</a></dfn> is either a <a
639
+ href="#type-selectors">type selector</a>, <a
640
+ href="#universal-selector">universal selector</a>, <a
641
+ href="#attribute-selectors">attribute selector</a>, <a
642
+ href="#class-html">class selector</a>, <a
643
+ href="#id-selectors">ID selector</a>, <a
644
+ href="#content-selectors">content selector</a>, or <a
645
+ href="#pseudo-classes">pseudo-class</a>. One <a
646
+ href="#pseudo-elements">pseudo-element</a> may be appended to the last
647
+ sequence of simple selectors.</p>
648
+
649
+ <p><dfn>Combinators</dfn> are: white space, &quot;greater-than
650
+ sign&quot; (U+003E, <code>&gt;</code>), &quot;plus sign&quot; (U+002B,
651
+ <code>+</code>) and &quot;tilde&quot; (U+007E, <code>~</code>). White
652
+ space may appear between a combinator and the simple selectors around
653
+ it. <a name=whitespace></a>Only the characters "space" (U+0020), "tab"
654
+ (U+0009), "line feed" (U+000A), "carriage return" (U+000D), and "form
655
+ feed" (U+000C) can occur in white space. Other space-like characters,
656
+ such as "em-space" (U+2003) and "ideographic space" (U+3000), are
657
+ never part of white space.</p>
658
+
659
+ <p>The elements of a document tree that are represented by a selector
660
+ are the <dfn><a name=subject></a>subjects of the selector</dfn>. A
661
+ selector consisting of a single sequence of simple selectors
662
+ represents any element satisfying its requirements. Prepending another
663
+ sequence of simple selectors and a combinator to a sequence imposes
664
+ additional matching constraints, so the subjects of a selector are
665
+ always a subset of the elements represented by the last sequence of
666
+ simple selectors.</p>
667
+
668
+ <p>An empty selector, containing no sequence of simple selectors and
669
+ no pseudo-element, is an <a href="#Conformance">invalid
670
+ selector</a>.</p>
671
+
672
+ <h2><a name=grouping>5. Groups of selectors</a></h2>
673
+
674
+ <p>When several selectors share the same declarations, they may be
675
+ grouped into a comma-separated list. (A comma is U+002C.)</p>
676
+
677
+ <div class="example">
678
+ <p>CSS examples:</p>
679
+ <p>In this example, we condense three rules with identical
680
+ declarations into one. Thus,</p>
681
+ <pre>h1 { font-family: sans-serif }
682
+ h2 { font-family: sans-serif }
683
+ h3 { font-family: sans-serif }</pre>
684
+ <p>is equivalent to:</p>
685
+ <pre>h1, h2, h3 { font-family: sans-serif }</pre>
686
+ </div>
687
+
688
+ <p><strong>Warning</strong>: the equivalence is true in this example
689
+ because all the selectors are valid selectors. If just one of these
690
+ selectors were invalid, the entire group of selectors would be
691
+ invalid. This would invalidate the rule for all three heading
692
+ elements, whereas in the former case only one of the three individual
693
+ heading rules would be invalidated.</p>
694
+
695
+
696
+ <h2><a name=simple-selectors>6. Simple selectors</a></h2>
697
+
698
+ <h3><a name=type-selectors>6.1. Type selector</a></h3>
699
+
700
+ <p>A <dfn>type selector</dfn> is the name of a document language
701
+ element type. A type selector represents an instance of the element
702
+ type in the document tree.</p>
703
+
704
+ <div class="example">
705
+ <p>Example:</p>
706
+ <p>The following selector represents an <code>h1</code> element in the document tree:</p>
707
+ <pre>h1</pre>
708
+ </div>
709
+
710
+
711
+ <h4><a name=typenmsp>6.1.1. Type selectors and namespaces</a></h4>
712
+
713
+ <p>Type selectors allow an optional namespace (<a
714
+ href="#refsXMLNAMES">[XMLNAMES]</a>) component. A namespace prefix
715
+ that has been previously declared may be prepended to the element name
716
+ separated by the namespace separator &quot;vertical bar&quot;
717
+ (U+007C, <code>|</code>).</p>
718
+
719
+ <p>The namespace component may be left empty to indicate that the
720
+ selector is only to represent elements with no declared namespace.</p>
721
+
722
+ <p>An asterisk may be used for the namespace prefix, indicating that
723
+ the selector represents elements in any namespace (including elements
724
+ with no namespace).</p>
725
+
726
+ <p>Element type selectors that have no namespace component (no
727
+ namespace separator), represent elements without regard to the
728
+ element's namespace (equivalent to "<code>*|</code>") unless a default
729
+ namespace has been declared. If a default namespace has been declared,
730
+ the selector will represent only elements in the default
731
+ namespace.</p>
732
+
733
+ <p>A type selector containing a namespace prefix that has not been
734
+ previously declared is an <a href="#Conformance">invalid</a> selector.
735
+ The mechanism for declaring a namespace prefix is left up to the
736
+ language implementing Selectors. In CSS, such a mechanism is defined
737
+ in the General Syntax module.</p>
738
+
739
+ <p>In a namespace-aware client, element type selectors will only match
740
+ against the <a
741
+ href="http://www.w3.org/TR/REC-xml-names/#NT-LocalPart">local part</a>
742
+ of the element's <a
743
+ href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">qualified
744
+ name</a>. See <a href="#downlevel">below</a> for notes about matching
745
+ behaviors in down-level clients.</p>
746
+
747
+ <p>In summary:</p>
748
+
749
+ <dl>
750
+ <dt><code>ns|E</code></dt>
751
+ <dd>elements with name E in namespace ns</dd>
752
+ <dt><code>*|E</code></dt>
753
+ <dd>elements with name E in any namespace, including those without any
754
+ declared namespace</dd>
755
+ <dt><code>|E</code></dt>
756
+ <dd>elements with name E without any declared namespace</dd>
757
+ <dt><code>E</code></dt>
758
+ <dd>if no default namespace has been specified, this is equivalent to *|E.
759
+ Otherwise it is equivalent to ns|E where ns is the default namespace.</dd>
760
+ </dl>
761
+
762
+ <div class="example">
763
+ <p>CSS examples:</p>
764
+
765
+ <pre>@namespace foo url(http://www.example.com);
766
+ foo|h1 { color: blue }
767
+ foo|* { color: yellow }
768
+ |h1 { color: red }
769
+ *|h1 { color: green }
770
+ h1 { color: green }</pre>
771
+
772
+ <p>The first rule will match only <code>h1</code> elements in the
773
+ "http://www.example.com" namespace.</p>
774
+
775
+ <p>The second rule will match all elements in the
776
+ "http://www.example.com" namespace.</p>
777
+
778
+ <p>The third rule will match only <code>h1</code> elements without
779
+ any declared namespace.</p>
780
+
781
+ <p>The fourth rule will match <code>h1</code> elements in any
782
+ namespace (including those without any declared namespace).</p>
783
+
784
+ <p>The last rule is equivalent to the fourth rule because no default
785
+ namespace has been defined.</p>
786
+
787
+ </div>
788
+
789
+ <h3><a name=universal-selector>6.2. Universal selector</a> </h3>
790
+
791
+ <p>The <dfn>universal selector</dfn>, written &quot;asterisk&quot;
792
+ (<code>*</code>), represents the qualified name of any element
793
+ type. It represents any single element in the document tree in any
794
+ namespace (including those without any declared namespace) if no
795
+ default namespace has been specified. If a default namespace has been
796
+ specified, see <a href="#univnmsp">Universal selector and
797
+ Namespaces</a> below.</p>
798
+
799
+ <p>If the universal selector is not the only component of a sequence
800
+ of simple selectors, the <code>*</code> may be omitted.</p>
801
+
802
+ <div class="example">
803
+ <p>Examples:</p>
804
+ <ul>
805
+ <li><code>*[hreflang|=en]</code> and <code>[hreflang|=en]</code> are equivalent,</li>
806
+ <li><code>*.warning</code> and <code>.warning</code> are equivalent,</li>
807
+ <li><code>*#myid</code> and <code>#myid</code> are equivalent.</li>
808
+ </ul>
809
+ </div>
810
+
811
+ <p class="note"><strong>Note:</strong> it is recommended that the
812
+ <code>*</code>, representing the universal selector, not be
813
+ omitted.</p>
814
+
815
+ <h4><a name=univnmsp>6.2.1. Universal selector and namespaces</a></h4>
816
+
817
+ <p>The universal selector allows an optional namespace component. It
818
+ is used as follows:</p>
819
+
820
+ <dl>
821
+ <dt><code>ns|*</code></dt>
822
+ <dd>all elements in namespace ns</dd>
823
+ <dt><code>*|*</code></dt>
824
+ <dd>all elements</dd>
825
+ <dt><code>|*</code></dt>
826
+ <dd>all elements without any declared namespace</dd>
827
+ <dt><code>*</code></dt>
828
+ <dd>if no default namespace has been specified, this is equivalent to *|*.
829
+ Otherwise it is equivalent to ns|* where ns is the default namespace.</dd>
830
+ </dl>
831
+
832
+ <p>A universal selector containing a namespace prefix that has not
833
+ been previously declared is an <a href="#Conformance">invalid</a>
834
+ selector. The mechanism for declaring a namespace prefix is left up
835
+ to the language implementing Selectors. In CSS, such a mechanism is
836
+ defined in the General Syntax module.</p>
837
+
838
+
839
+ <h3><a name=attribute-selectors>6.3. Attribute selectors</a></h3>
840
+
841
+ <p>Selectors allow the representation of an element's attributes. When
842
+ a selector is used as an expression to match against an element,
843
+ attribute selectors must be considered to match an element if that
844
+ element has an attribute that matches the attribute represented by the
845
+ attribute selector.</p>
846
+
847
+ <h4><a name=attribute-representation>6.3.1. Attribute presence and values
848
+ selectors</a></h4>
849
+
850
+ <p>CSS2 introduced four attribute selectors:</p>
851
+
852
+ <dl>
853
+ <dt><code>[att]</code>
854
+ <dd>Represents an element with the <code>att</code> attribute, whatever the value of
855
+ the attribute.</dd>
856
+ <dt><code>[att=val]</code></dt>
857
+ <dd>Represents an element with the <code>att</code> attribute whose value is exactly
858
+ "val".</dd>
859
+ <dt><code>[att~=val]</code></dt>
860
+ <dd>Represents an element with the <code>att</code> attribute whose value is a <a
861
+ href="#whitespace">whitespace</a>-separated list of words, one of
862
+ which is exactly "val". If "val" contains whitespace, it will never
863
+ represent anything (since the words are <em>separated</em> by
864
+ spaces).</dd>
865
+ <dt><code>[att|=val]</code>
866
+ <dd>Represents an element with the <code>att</code> attribute, its value either
867
+ being exactly "val" or beginning with "val" immediately followed by
868
+ "-" (U+002D). This is primarily intended to allow language subcode
869
+ matches (e.g., the <code>hreflang</code> attribute on the
870
+ <code>link</code> element in HTML) as described in RFC 3066 (<a
871
+ href="#refsRFC3066">[RFC3066]</a>). For <code>lang</code> (or
872
+ <code>xml:lang</code>) language subcode matching, please see <a
873
+ href="#lang-pseudo">the <code>:lang</code> pseudo-class</a>.</dd>
874
+ </dl>
875
+
876
+ <p>Attribute values must be identifiers or strings. The
877
+ case-sensitivity of attribute names and values in selectors depends on
878
+ the document language.</p>
879
+
880
+ <div class="example">
881
+
882
+ <p>Examples:</p>
883
+
884
+ <p>The following attribute selector represents an <code>h1</code>
885
+ element that carries the <code>title</code> attribute, whatever its
886
+ value:</p>
887
+
888
+ <pre>h1[title]</pre>
889
+
890
+ <p>In the following example, the selector represents a
891
+ <code>span</code> element whose <code>class</code> attribute has
892
+ exactly the value "example":</p>
893
+
894
+ <pre>span[class="example"]</pre>
895
+
896
+ <p>Multiple attribute selectors can be used to represent several
897
+ attributes of an element, or several conditions on the same
898
+ attribute. Here, the selector represents a <code>span</code> element
899
+ whose <code>hello</code> attribute has exactly the value "Cleveland"
900
+ and whose <code>goodbye</code> attribute has exactly the value
901
+ "Columbus":</p>
902
+
903
+ <pre>span[hello="Cleveland"][goodbye="Columbus"]</pre>
904
+
905
+ <p>The following selectors illustrate the differences between "="
906
+ and "~=". The first selector will represent, for example, the value
907
+ "copyright copyleft copyeditor" on a <code>rel</code> attribute. The
908
+ second selector will only represent an <code>a</code> element with
909
+ an <code>href</code> attribute having the exact value
910
+ "http://www.w3.org/".</p>
911
+
912
+ <pre>a[rel~="copyright"]
913
+ a[href="http://www.w3.org/"]</pre>
914
+
915
+ <p>The following selector represents a <code>link</code> element
916
+ whose <code>hreflang</code> attribute is exactly "fr".</p>
917
+
918
+ <pre>link[hreflang=fr]</pre>
919
+
920
+ <p>The following selector represents a <code>link</code> element for
921
+ which the values of the <code>hreflang</code> attribute begins with
922
+ "en", including "en", "en-US", and "en-cockney":</p>
923
+
924
+ <pre>link[hreflang|="en"]</pre>
925
+
926
+ <p>Similarly, the following selectors represents a
927
+ <code>DIALOGUE</code> element whenever it has one of two different
928
+ values for an attribute <code>character</code>:</p>
929
+
930
+ <pre>DIALOGUE[character=romeo]
931
+ DIALOGUE[character=juliet]</pre>
932
+
933
+ </div>
934
+
935
+ <h4><a name=attribute-substrings></a>6.3.2. Substring matching attribute
936
+ selectors</h4>
937
+
938
+ <p>Three additional attribute selectors are provided for matching
939
+ substrings in the value of an attribute:</p>
940
+
941
+ <dl>
942
+ <dt><code>[att^=val]</code></dt>
943
+ <dd>Represents an element with the <code>att</code> attribute whose value begins
944
+ with the prefix "val".</dd>
945
+ <dt><code>[att$=val]</code>
946
+ <dd>Represents an element with the <code>att</code> attribute whose value ends with
947
+ the suffix "val".</dd>
948
+ <dt><code>[att*=val]</code>
949
+ <dd>Represents an element with the <code>att</code> attribute whose value contains
950
+ at least one instance of the substring "val".</dd>
951
+ </dl>
952
+
953
+ <p>Attribute values must be identifiers or strings. The
954
+ case-sensitivity of attribute names in selectors depends on the
955
+ document language.</p>
956
+
957
+ <div class="example">
958
+ <p>Examples:</p>
959
+ <p>The following selector represents an HTML <code>object</code>, referencing an
960
+ image:</p>
961
+ <pre>object[type^="image/"]</pre>
962
+ <p>The following selector represents an HTML anchor <code>a</code> with an
963
+ <code>href</code> attribute whose value ends with ".html".</p>
964
+ <pre>a[href$=".html"]</pre>
965
+ <p>The following selector represents an HTML paragraph with a <code>title</code>
966
+ attribute whose value contains the substring "hello"</p>
967
+ <pre>p[title*="hello"]</pre>
968
+ </div>
969
+
970
+ <h4><a name=attrnmsp>6.3.3. Attribute selectors and namespaces</a></h4>
971
+
972
+ <p>Attribute selectors allow an optional namespace component to the
973
+ attribute name. A namespace prefix that has been previously declared
974
+ may be prepended to the attribute name separated by the namespace
975
+ separator &quot;vertical bar&quot; (<code>|</code>). In keeping with
976
+ the Namespaces in the XML recommendation, default namespaces do not
977
+ apply to attributes, therefore attribute selectors without a namespace
978
+ component apply only to attributes that have no declared namespace
979
+ (equivalent to "<code>|attr</code>"). An asterisk may be used for the
980
+ namespace prefix indicating that the selector is to match all
981
+ attribute names without regard to the attribute's namespace.
982
+
983
+ <p>An attribute selector with an attribute name containing a namespace
984
+ prefix that has not been previously declared is an <a
985
+ href="#Conformance">invalid</a> selector. The mechanism for declaring
986
+ a namespace prefix is left up to the language implementing Selectors.
987
+ In CSS, such a mechanism is defined in the General Syntax module.
988
+
989
+ <div class="example">
990
+ <p>CSS examples:</p>
991
+ <pre>@namespace foo "http://www.example.com";
992
+ [foo|att=val] { color: blue }
993
+ [*|att] { color: yellow }
994
+ [|att] { color: green }
995
+ [att] { color: green }</pre>
996
+
997
+ <p>The first rule will match only elements with the attribute
998
+ <code>att</code> in the "http://www.example.com" namespace with the
999
+ value "val".</p>
1000
+
1001
+ <p>The second rule will match only elements with the attribute
1002
+ <code>att</code> regardless of the namespace of the attribute
1003
+ (including no declared namespace).</p>
1004
+
1005
+ <p>The last two rules are equivalent and will match only elements
1006
+ with the attribute <code>att</code> where the attribute is not
1007
+ declared to be in a namespace.</p>
1008
+
1009
+ </div>
1010
+
1011
+ <h4><a name=def-values>6.3.4. Default attribute values in DTDs</a></h4>
1012
+
1013
+ <p>Attribute selectors represent explicitly set attribute values in
1014
+ the document tree. Default attribute values may be defined in a DTD or
1015
+ elsewhere, but cannot always be selected by attribute
1016
+ selectors. Selectors should be designed so that they work even if the
1017
+ default values are not included in the document tree.</p>
1018
+
1019
+ <p>More precisely, a UA is <em>not</em> required to read an "external
1020
+ subset" of the DTD but <em>is</em> required to look for default
1021
+ attribute values in the document's "internal subset." (See <a
1022
+ href="#refsXML10">[XML10]</a> for definitions of these subsets.)</p>
1023
+
1024
+ <p>A UA that recognizes an XML namespace <a
1025
+ href="#refsXMLNAMES">[XMLNAMES]</a> is not required to use its
1026
+ knowledge of that namespace to treat default attribute values as if
1027
+ they were present in the document. (For example, an XHTML UA is not
1028
+ required to use its built-in knowledge of the XHTML DTD.)</p>
1029
+
1030
+ <p class="note"><strong>Note:</strong> Typically, implementations
1031
+ choose to ignore external subsets.</p>
1032
+
1033
+ <div class="example">
1034
+ <p>Example:</p>
1035
+
1036
+ <p>Consider an element EXAMPLE with an attribute "notation" that has a
1037
+ default value of "decimal". The DTD fragment might be</p>
1038
+
1039
+ <pre class="dtd-example">&lt;!ATTLIST EXAMPLE notation (decimal,octal) "decimal"></pre>
1040
+
1041
+ <p>If the style sheet contains the rules</p>
1042
+
1043
+ <pre>EXAMPLE[notation=decimal] { /*... default property settings ...*/ }
1044
+ EXAMPLE[notation=octal] { /*... other settings...*/ }</pre>
1045
+
1046
+ <p>the first rule will not match elements whose "notation" attribute
1047
+ is set by default, i.e. not set explicitly. To catch all cases, the
1048
+ attribute selector for the default value must be dropped:</p>
1049
+
1050
+ <pre>EXAMPLE { /*... default property settings ...*/ }
1051
+ EXAMPLE[notation=octal] { /*... other settings...*/ }</pre>
1052
+
1053
+ <p>Here, because the selector <code>EXAMPLE[notation=octal]</code> is
1054
+ more specific than the tag
1055
+ selector alone, the style declarations in the second rule will override
1056
+ those in the first for elements that have a "notation" attribute value
1057
+ of "octal". Care has to be taken that all property declarations that
1058
+ are to apply only to the default case are overridden in the non-default
1059
+ cases' style rules.</p>
1060
+
1061
+ </div>
1062
+
1063
+ <h3><a name=class-html>6.4. Class selectors</a></h3>
1064
+
1065
+ <p>Working with HTML, authors may use the period (U+002E,
1066
+ <code>.</code>) notation as an alternative to the <code>~=</code>
1067
+ notation when representing the <code>class</code> attribute. Thus, for
1068
+ HTML, <code>div.value</code> and <code>div[class~=value]</code> have
1069
+ the same meaning. The attribute value must immediately follow the
1070
+ &quot;period&quot; (<code>.</code>).</p>
1071
+
1072
+ <p>UAs may apply selectors using the period (.) notation in XML
1073
+ documents if the UA has namespace-specific knowledge that allows it to
1074
+ determine which attribute is the &quot;class&quot; attribute for the
1075
+ respective namespace. One such example of namespace-specific knowledge
1076
+ is the prose in the specification for a particular namespace (e.g. SVG
1077
+ 1.0 <a href="#refsSVG">[SVG]</a> describes the <a
1078
+ href="http://www.w3.org/TR/2001/PR-SVG-20010719/styling.html#ClassAttribute">SVG
1079
+ &quot;class&quot; attribute</a> and how a UA should interpret it, and
1080
+ similarly MathML 1.01 <a href="#refsMATH">[MATH]</a> describes the <a
1081
+ href="http://www.w3.org/1999/07/REC-MathML-19990707/chapter2.html#sec2.3.4">MathML
1082
+ &quot;class&quot; attribute</a>.)</p>
1083
+
1084
+ <div class="example">
1085
+ <p>CSS examples:</p>
1086
+
1087
+ <p>We can assign style information to all elements with
1088
+ <code>class~="pastoral"</code> as follows:</p>
1089
+
1090
+ <pre>*.pastoral { color: green } /* all elements with class~=pastoral */</pre>
1091
+
1092
+ <p>or just</p>
1093
+
1094
+ <pre>.pastoral { color: green } /* all elements with class~=pastoral */</pre>
1095
+
1096
+ <p>The following assigns style only to H1 elements with
1097
+ <code>class~="pastoral"</code>:</p>
1098
+
1099
+ <pre>H1.pastoral { color: green } /* H1 elements with class~=pastoral */</pre>
1100
+
1101
+ <p>Given these rules, the first H1 instance below would not have
1102
+ green text, while the second would:</p>
1103
+
1104
+ <pre>&lt;H1&gt;Not green&lt;/H1&gt;
1105
+ &lt;H1 class="pastoral"&gt;Very green&lt;/H1&gt;</pre>
1106
+
1107
+ </div>
1108
+
1109
+ <p>To represent a subset of "class" values, each value must be preceded
1110
+ by a ".", in any order.</P>
1111
+
1112
+ <div class="example">
1113
+
1114
+ <p>CSS example:</p>
1115
+
1116
+ <p>The following rule matches any P element whose "class" attribute
1117
+ has been assigned a list of <a
1118
+ href="#whitespace">whitespace</a>-separated values that includes
1119
+ "pastoral" and "marine":</p>
1120
+
1121
+ <pre>p.pastoral.marine { color: green }</pre>
1122
+
1123
+ <p>This rule matches when <code>class="pastoral blue aqua
1124
+ marine"</code> but does not match for <code>class="pastoral
1125
+ blue"</code>.</p>
1126
+
1127
+ </div>
1128
+
1129
+ <p class="note"><strong>Note:</strong> Because CSS gives considerable
1130
+ power to the "class" attribute, authors could conceivably design their
1131
+ own "document language" based on elements with almost no associated
1132
+ presentation (such as DIV and SPAN in HTML) and assigning style
1133
+ information through the "class" attribute. Authors should avoid this
1134
+ practice since the structural elements of a document language often
1135
+ have recognized and accepted meanings and author-defined classes may
1136
+ not.</p>
1137
+
1138
+ <p class="note"><strong>Note:</strong> If an element has multiple
1139
+ class attributes, their values must be concatenated with spaces
1140
+ between the values before searching for the class. As of this time the
1141
+ working group is not aware of any manner in which this situation can
1142
+ be reached, however, so this behavior is explicitly non-normative in
1143
+ this specification.</p>
1144
+
1145
+ <h3><a name=id-selectors>6.5. ID selectors</a></h3>
1146
+
1147
+ <p>Document languages may contain attributes that are declared to be
1148
+ of type ID. What makes attributes of type ID special is that no two
1149
+ such attributes can have the same value in a document, regardless of
1150
+ the type of the elements that carry them; whatever the document
1151
+ language, an ID typed attribute can be used to uniquely identify its
1152
+ element. In HTML all ID attributes are named "id"; XML applications
1153
+ may name ID attributes differently, but the same restriction
1154
+ applies.</p>
1155
+
1156
+ <p>An ID-typed attribute of a document language allows authors to
1157
+ assign an identifier to one element instance in the document tree. W3C
1158
+ ID selectors represent an element instance based on its identifier. An
1159
+ ID selector contains a &quot;number sign&quot; (U+0023,
1160
+ <code>#</code>) immediately followed by the ID value, which must be an
1161
+ identifier.</p>
1162
+
1163
+ <p>Selectors does not specify how a UA knows the ID-typed attribute of
1164
+ an element. The UA may, e.g., read a document's DTD, have the
1165
+ information hard-coded or ask the user.
1166
+
1167
+ <div class="example">
1168
+ <p>Examples:</p>
1169
+ <p>The following ID selector represents an <code>h1</code> element
1170
+ whose ID-typed attribute has the value "chapter1":</p>
1171
+ <pre>h1#chapter1</pre>
1172
+ <p>The following ID selector represents any element whose ID-typed
1173
+ attribute has the value "chapter1":</p>
1174
+ <pre>#chapter1</pre>
1175
+ <p>The following selector represents any element whose ID-typed
1176
+ attribute has the value "z98y".</p>
1177
+ <pre>*#z98y</pre>
1178
+ </div>
1179
+
1180
+ <p class="note"><strong>Note.</strong> In XML 1.0 <a
1181
+ href="#refsXML10">[XML10]</a>, the information about which attribute
1182
+ contains an element's IDs is contained in a DTD or a schema. When
1183
+ parsing XML, UAs do not always read the DTD, and thus may not know
1184
+ what the ID of an element is (though a UA may have namespace-specific
1185
+ knowledge that allows it to determine which attribute is the ID
1186
+ attribute for that namespace). If a style sheet designer knows or
1187
+ suspects that a UA may not know what the ID of an element is, he
1188
+ should use normal attribute selectors instead:
1189
+ <code>[name=p371]</code> instead of <code>#p371</code>. Elements in
1190
+ XML 1.0 documents without a DTD do not have IDs at all.</p>
1191
+
1192
+ <p>If an element has multiple ID attributes, all of them must be
1193
+ treated as IDs for that element for the purposes of the ID
1194
+ selector. Such a situation could be reached using mixtures of xml:id,
1195
+ DOM3 Core, XML DTDs, and namespace-specific knowledge.</p>
1196
+
1197
+ <h3><a name=pseudo-classes>6.6. Pseudo-classes</a></h3>
1198
+
1199
+ <p>The pseudo-class concept is introduced to permit selection based on
1200
+ information that lies outside of the document tree or that cannot be
1201
+ expressed using the other simple selectors.</p>
1202
+
1203
+ <p>A pseudo-class always consists of a &quot;colon&quot;
1204
+ (<code>:</code>) followed by the name of the pseudo-class and
1205
+ optionally by a value between parentheses.</p>
1206
+
1207
+ <p>Pseudo-classes are allowed in all sequences of simple selectors
1208
+ contained in a selector. Pseudo-classes are allowed anywhere in
1209
+ sequences of simple selectors, after the leading type selector or
1210
+ universal selector (possibly omitted). Pseudo-class names are
1211
+ case-insensitive. Some pseudo-classes are mutually exclusive, while
1212
+ others can be applied simultaneously to the same
1213
+ element. Pseudo-classes may be dynamic, in the sense that an element
1214
+ may acquire or lose a pseudo-class while a user interacts with the
1215
+ document.</p>
1216
+
1217
+
1218
+ <h4><a name=dynamic-pseudos>6.6.1. Dynamic pseudo-classes</a></h4>
1219
+
1220
+ <p>Dynamic pseudo-classes classify elements on characteristics other
1221
+ than their name, attributes, or content, in principle characteristics
1222
+ that cannot be deduced from the document tree.</p>
1223
+
1224
+ <p>Dynamic pseudo-classes do not appear in the document source or
1225
+ document tree.</p>
1226
+
1227
+
1228
+ <h5>The <a name=link>link pseudo-classes: :link and :visited</a></h5>
1229
+
1230
+ <p>User agents commonly display unvisited links differently from
1231
+ previously visited ones. Selectors
1232
+ provides the pseudo-classes <code>:link</code> and
1233
+ <code>:visited</code> to distinguish them:</p>
1234
+
1235
+ <ul>
1236
+ <li>The <code>:link</code> pseudo-class applies to links that have
1237
+ not yet been visited.</li>
1238
+ <li>The <code>:visited</code> pseudo-class applies once the link has
1239
+ been visited by the user. </li>
1240
+ </ul>
1241
+
1242
+ <p>After some amount of time, user agents may choose to return a
1243
+ visited link to the (unvisited) ':link' state.</p>
1244
+
1245
+ <p>The two states are mutually exclusive.</p>
1246
+
1247
+ <div class="example">
1248
+
1249
+ <p>Example:</p>
1250
+
1251
+ <p>The following selector represents links carrying class
1252
+ <code>external</code> and already visited:</p>
1253
+
1254
+ <pre>a.external:visited</pre>
1255
+
1256
+ </div>
1257
+
1258
+ <p class="note"><strong>Note:</strong> It is possible for style sheet
1259
+ authors to abuse the :link and :visited pseudo-classes to determine
1260
+ which sites a user has visited without the user's consent.
1261
+
1262
+ <p>UAs may therefore treat all links as unvisited links, or implement
1263
+ other measures to preserve the user's privacy while rendering visited
1264
+ and unvisited links differently.</p>
1265
+
1266
+ <h5>The <a name=useraction-pseudos>user action pseudo-classes
1267
+ :hover, :active, and :focus</a></h5>
1268
+
1269
+ <p>Interactive user agents sometimes change the rendering in response
1270
+ to user actions. Selectors provides
1271
+ three pseudo-classes for the selection of an element the user is
1272
+ acting on.</p>
1273
+
1274
+ <ul>
1275
+
1276
+ <li>The <code>:hover</code> pseudo-class applies while the user
1277
+ designates an element with a pointing device, but does not activate
1278
+ it. For example, a visual user agent could apply this pseudo-class
1279
+ when the cursor (mouse pointer) hovers over a box generated by the
1280
+ element. User agents not that do not support <a
1281
+ href="http://www.w3.org/TR/REC-CSS2/media.html#interactive-media-group">interactive
1282
+ media</a> do not have to support this pseudo-class. Some conforming
1283
+ user agents that support <a
1284
+ href="http://www.w3.org/TR/REC-CSS2/media.html#interactive-media-group">interactive
1285
+ media</a> may not be able to support this pseudo-class (e.g., a pen
1286
+ device that does not detect hovering).</li>
1287
+
1288
+ <li>The <code>:active</code> pseudo-class applies while an element
1289
+ is being activated by the user. For example, between the times the
1290
+ user presses the mouse button and releases it.</li>
1291
+
1292
+ <li>The <code>:focus</code> pseudo-class applies while an element
1293
+ has the focus (accepts keyboard or mouse events, or other forms of
1294
+ input). </li>
1295
+
1296
+ </ul>
1297
+
1298
+ <p>There may be document language or implementation specific limits on
1299
+ which elements can become <code>:active</code> or acquire
1300
+ <code>:focus</code>.</p>
1301
+
1302
+ <p>These pseudo-classes are not mutually exclusive. An element may
1303
+ match several pseudo-classes at the same time.</p>
1304
+
1305
+ <p>Selectors doesn't define if the parent of an element that is
1306
+ ':active' or ':hover' is also in that state.</p>
1307
+
1308
+ <div class="example">
1309
+ <p>Examples:</p>
1310
+ <pre>a:link /* unvisited links */
1311
+ a:visited /* visited links */
1312
+ a:hover /* user hovers */
1313
+ a:active /* active links */</pre>
1314
+ <p>An example of combining dynamic pseudo-classes:</p>
1315
+ <pre>a:focus
1316
+ a:focus:hover</pre>
1317
+ <p>The last selector matches <code>a</code> elements that are in
1318
+ the pseudo-class :focus and in the pseudo-class :hover.</p>
1319
+ </div>
1320
+
1321
+ <p class="note"><strong>Note:</strong> An element can be both ':visited'
1322
+ and ':active' (or ':link' and ':active').</p>
1323
+
1324
+ <h4><a name=target-pseudo>6.6.2. The target pseudo-class :target</a></h4>
1325
+
1326
+ <p>Some URIs refer to a location within a resource. This kind of URI
1327
+ ends with a &quot;number sign&quot; (#) followed by an anchor
1328
+ identifier (called the fragment identifier).</p>
1329
+
1330
+ <p>URIs with fragment identifiers link to a certain element within the
1331
+ document, known as the target element. For instance, here is a URI
1332
+ pointing to an anchor named <code>section_2</code> in an HTML
1333
+ document:</p>
1334
+
1335
+ <pre>http://example.com/html/top.html#section_2</pre>
1336
+
1337
+ <p>A target element can be represented by the <code>:target</code>
1338
+ pseudo-class. If the document's URI has no fragment identifier, then
1339
+ the document has no target element.</p>
1340
+
1341
+ <div class="example">
1342
+ <p>Example:</p>
1343
+ <pre>p.note:target</pre>
1344
+ <p>This selector represents a <code>p</code> element of class
1345
+ <code>note</code> that is the target element of the referring
1346
+ URI.</p>
1347
+ </div>
1348
+
1349
+ <div class="example">
1350
+ <p>CSS example:</p>
1351
+ <p>Here, the <code>:target</code> pseudo-class is used to make the
1352
+ target element red and place an image before it, if there is one:</p>
1353
+ <pre>*:target { color : red }
1354
+ *:target::before { content : url(target.png) }</pre>
1355
+ </div>
1356
+
1357
+ <h4><a name=lang-pseudo>6.6.3. The language pseudo-class :lang</a></h4>
1358
+
1359
+ <p>If the document language specifies how the human language of an
1360
+ element is determined, it is possible to write selectors that
1361
+ represent an element based on its language. For example, in HTML <a
1362
+ href="#refsHTML4">[HTML4]</a>, the language is determined by a
1363
+ combination of the <code>lang</code> attribute, the <code>meta</code>
1364
+ element, and possibly by information from the protocol (such as HTTP
1365
+ headers). XML uses an attribute called <code>xml:lang</code>, and
1366
+ there may be other document language-specific methods for determining
1367
+ the language.</p>
1368
+
1369
+ <p>The pseudo-class <code>:lang(C)</code> represents an element that
1370
+ is in language C. Whether an element is represented by a
1371
+ <code>:lang()</code> selector is based solely on the identifier C
1372
+ being either equal to, or a hyphen-separated substring of, the
1373
+ element's language value, in the same way as if performed by the <a
1374
+ href="#attribute-representation">'|='</a> operator in attribute
1375
+ selectors. The identifier C does not have to be a valid language
1376
+ name.</p>
1377
+
1378
+ <p>C must not be empty. (If it is, the selector is invalid.)</p>
1379
+
1380
+ <p class="note"><strong>Note:</strong> It is recommended that
1381
+ documents and protocols indicate language using codes from RFC 3066 <a
1382
+ href="#refsRFC3066">[RFC3066]</a> or its successor, and by means of
1383
+ "xml:lang" attributes in the case of XML-based documents <a
1384
+ href="#refsXML10">[XML10]</a>. See <a
1385
+ href="http://www.w3.org/International/questions/qa-lang-2or3.html">
1386
+ "FAQ: Two-letter or three-letter language codes."</a></p>
1387
+
1388
+ <div class="example">
1389
+ <p>Examples:</p>
1390
+ <p>The two following selectors represent an HTML document that is in
1391
+ Belgian, French, or German. The two next selectors represent
1392
+ <code>q</code> quotations in an arbitrary element in Belgian, French,
1393
+ or German.</p>
1394
+ <pre>html:lang(fr-be)
1395
+ html:lang(de)
1396
+ :lang(fr-be) &gt; q
1397
+ :lang(de) &gt; q</pre>
1398
+ </div>
1399
+
1400
+ <h4><a name=UIstates>6.6.4. The UI element states pseudo-classes</a></h4>
1401
+
1402
+ <h5><a name=enableddisabled>The :enabled and :disabled pseudo-classes</a></h5>
1403
+
1404
+ <p>The <code>:enabled</code> pseudo-class allows authors to customize
1405
+ the look of user interface elements that are enabled &mdash; which the
1406
+ user can select or activate in some fashion (e.g. clicking on a button
1407
+ with a mouse). There is a need for such a pseudo-class because there
1408
+ is no way to programmatically specify the default appearance of say,
1409
+ an enabled <code>input</code> element without also specifying what it
1410
+ would look like when it was disabled.</p>
1411
+
1412
+ <p>Similar to <code>:enabled</code>, <code>:disabled</code> allows the
1413
+ author to specify precisely how a disabled or inactive user interface
1414
+ element should look.</p>
1415
+
1416
+ <p>Most elements will be neither enabled nor disabled. An element is
1417
+ enabled if the user can either activate it or transfer the focus to
1418
+ it. An element is disabled if it could be enabled, but the user cannot
1419
+ presently activate it or transfer focus to it.</p>
1420
+
1421
+
1422
+ <h5><a name=checked>The :checked pseudo-class</a></h5>
1423
+
1424
+ <p>Radio and checkbox elements can be toggled by the user. Some menu
1425
+ items are "checked" when the user selects them. When such elements are
1426
+ toggled "on" the <code>:checked</code> pseudo-class applies. The
1427
+ <code>:checked</code> pseudo-class initially applies to such elements
1428
+ that have the HTML4 <code>selected</code> and <code>checked</code>
1429
+ attributes as described in <a
1430
+ href="http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.2.1">Section
1431
+ 17.2.1 of HTML4</a>, but of course the user can toggle "off" such
1432
+ elements in which case the <code>:checked</code> pseudo-class would no
1433
+ longer apply. While the <code>:checked</code> pseudo-class is dynamic
1434
+ in nature, and is altered by user action, since it can also be based
1435
+ on the presence of the semantic HTML4 <code>selected</code> and
1436
+ <code>checked</code> attributes, it applies to all media.
1437
+
1438
+
1439
+ <h5><a name=indeterminate>The :indeterminate pseudo-class</a></h5>
1440
+
1441
+ <div class="note">
1442
+
1443
+ <p>Radio and checkbox elements can be toggled by the user, but are
1444
+ sometimes in an indeterminate state, neither checked nor unchecked.
1445
+ This can be due to an element attribute, or DOM manipulation.</p>
1446
+
1447
+ <p>A future version of this specification may introduce an
1448
+ <code>:indeterminate</code> pseudo-class that applies to such elements.
1449
+ <!--While the <code>:indeterminate</code> pseudo-class is dynamic in
1450
+ nature, and is altered by user action, since it can also be based on
1451
+ the presence of an element attribute, it applies to all media.</p>
1452
+
1453
+ <p>Components of a radio-group initialized with no pre-selected choice
1454
+ are an example of :indeterminate state.--></p>
1455
+
1456
+ </div>
1457
+
1458
+
1459
+ <h4><a name=structural-pseudos>6.6.5. Structural pseudo-classes</a></h4>
1460
+
1461
+ <p>Selectors introduces the concept of <dfn>structural
1462
+ pseudo-classes</dfn> to permit selection based on extra information that lies in
1463
+ the document tree but cannot be represented by other simple selectors or
1464
+ combinators.
1465
+
1466
+ <p>Note that standalone pieces of PCDATA (text nodes in the DOM) are
1467
+ not counted when calculating the position of an element in the list of
1468
+ children of its parent. When calculating the position of an element in
1469
+ the list of children of its parent, the index numbering starts at 1.
1470
+
1471
+
1472
+ <h5><a name=root-pseudo>:root pseudo-class</a></h5>
1473
+
1474
+ <p>The <code>:root</code> pseudo-class represents an element that is
1475
+ the root of the document. In HTML 4, this is always the
1476
+ <code>HTML</code> element.
1477
+
1478
+
1479
+ <h5><a name=nth-child-pseudo>:nth-child() pseudo-class</a></h5>
1480
+
1481
+ <p>The
1482
+ <code>:nth-child(<var>a</var><code>n</code>+<var>b</var>)</code>
1483
+ pseudo-class notation represents an element that has
1484
+ <var>a</var><code>n</code>+<var>b</var>-1 siblings
1485
+ <strong>before</strong> it in the document tree, for a given positive
1486
+ integer or zero value of <code>n</code>, and has a parent element. In
1487
+ other words, this matches the <var>b</var>th child of an element after
1488
+ all the children have been split into groups of <var>a</var> elements
1489
+ each. For example, this allows the selectors to address every other
1490
+ row in a table, and could be used to alternate the color
1491
+ of paragraph text in a cycle of four. The <var>a</var> and
1492
+ <var>b</var> values must be zero, negative integers or positive
1493
+ integers. The index of the first child of an element is 1.
1494
+
1495
+ <p>In addition to this, <code>:nth-child()</code> can take
1496
+ '<code>odd</code>' and '<code>even</code>' as arguments instead.
1497
+ '<code>odd</code>' has the same signification as <code>2n+1</code>,
1498
+ and '<code>even</code>' has the same signification as <code>2n</code>.
1499
+
1500
+
1501
+ <div class="example">
1502
+ <p>Examples:</p>
1503
+ <pre>tr:nth-child(2n+1) /* represents every odd row of an HTML table */
1504
+ tr:nth-child(odd) /* same */
1505
+ tr:nth-child(2n) /* represents every even row of an HTML table */
1506
+ tr:nth-child(even) /* same */
1507
+
1508
+ /* Alternate paragraph colours in CSS */
1509
+ p:nth-child(4n+1) { color: navy; }
1510
+ p:nth-child(4n+2) { color: green; }
1511
+ p:nth-child(4n+3) { color: maroon; }
1512
+ p:nth-child(4n+4) { color: purple; }</pre>
1513
+ </div>
1514
+
1515
+ <p>When <var>a</var>=0, no repeating is used, so for example
1516
+ <code>:nth-child(0n+5)</code> matches only the fifth child. When
1517
+ <var>a</var>=0, the <var>a</var><code>n</code> part need not be
1518
+ included, so the syntax simplifies to
1519
+ <code>:nth-child(<var>b</var>)</code> and the last example simplifies
1520
+ to <code>:nth-child(5)</code>.
1521
+
1522
+ <div class="example">
1523
+ <p>Examples:</p>
1524
+ <pre>foo:nth-child(0n+1) /* represents an element foo, first child of its parent element */
1525
+ foo:nth-child(1) /* same */</pre>
1526
+ </div>
1527
+
1528
+ <p>When <var>a</var>=1, the number may be omitted from the rule.
1529
+
1530
+ <div class="example">
1531
+ <p>Examples:</p>
1532
+ <p>The following selectors are therefore equivalent:</p>
1533
+ <pre>bar:nth-child(1n+0) /* represents all bar elements, specificity (0,1,1) */
1534
+ bar:nth-child(n+0) /* same */
1535
+ bar:nth-child(n) /* same */
1536
+ bar /* same but lower specificity (0,0,1) */</pre>
1537
+ </div>
1538
+
1539
+ <p>If <var>b</var>=0, then every <var>a</var>th element is picked. In
1540
+ such a case, the <var>b</var> part may be omitted.
1541
+
1542
+ <div class="example">
1543
+ <p>Examples:</p>
1544
+ <pre>tr:nth-child(2n+0) /* represents every even row of an HTML table */
1545
+ tr:nth-child(2n) /* same */</pre>
1546
+ </div>
1547
+
1548
+ <p>If both <var>a</var> and <var>b</var> are equal to zero, the
1549
+ pseudo-class represents no element in the document tree.</p>
1550
+
1551
+ <p>The value <var>a</var> can be negative, but only the positive
1552
+ values of <var>a</var><code>n</code>+<var>b</var>, for
1553
+ <code>n</code>&ge;0, may represent an element in the document
1554
+ tree.</p>
1555
+
1556
+ <div class="example">
1557
+ <p>Example:</p>
1558
+ <pre>html|tr:nth-child(-n+6) /* represents the 6 first rows of XHTML tables */</pre>
1559
+ </div>
1560
+
1561
+ <p>When the value <var>b</var> is negative, the "+" character in the
1562
+ expression must be removed (it is effectively replaced by the "-"
1563
+ character indicating the negative value of <var>b</var>).</p>
1564
+
1565
+ <div class="example">
1566
+ <p>Examples:</p>
1567
+ <pre>:nth-child(10n-1) /* represents the 9th, 19th, 29th, etc, element */
1568
+ :nth-child(10n+9) /* Same */
1569
+ :nth-child(10n+-1) /* Syntactically invalid, and would be ignored */</pre>
1570
+ </div>
1571
+
1572
+
1573
+ <h5><a name=nth-last-child-pseudo>:nth-last-child() pseudo-class</a></h5>
1574
+
1575
+ <p>The <code>:nth-last-child(<var>a</var>n+<var>b</var>)</code>
1576
+ pseudo-class notation represents an element that has
1577
+ <var>a</var><code>n</code>+<var>b</var>-1 siblings
1578
+ <strong>after</strong> it in the document tree, for a given positive
1579
+ integer or zero value of <code>n</code>, and has a parent element. See
1580
+ <code>:nth-child()</code> pseudo-class for the syntax of its argument.
1581
+ It also accepts the '<code>even</code>' and '<code>odd</code>' values
1582
+ as arguments.
1583
+
1584
+
1585
+ <div class="example">
1586
+ <p>Examples:</p>
1587
+ <pre>tr:nth-last-child(-n+2) /* represents the two last rows of an HTML table */
1588
+
1589
+ foo:nth-last-child(odd) /* represents all odd foo elements in their parent element,
1590
+ counting from the last one */</pre>
1591
+ </div>
1592
+
1593
+
1594
+ <h5><a name=nth-of-type-pseudo>:nth-of-type() pseudo-class</a></h5>
1595
+
1596
+ <p>The <code>:nth-of-type(<var>a</var>n+<var>b</var>)</code>
1597
+ pseudo-class notation represents an element that has
1598
+ <var>a</var><code>n</code>+<var>b</var>-1 siblings with the same
1599
+ element name <strong>before</strong> it in the document tree, for a
1600
+ given zero or positive integer value of <code>n</code>, and has a
1601
+ parent element. In other words, this matches the <var>b</var>th child
1602
+ of that type after all the children of that type have been split into
1603
+ groups of a elements each. See <code>:nth-child()</code> pseudo-class
1604
+ for the syntax of its argument. It also accepts the
1605
+ '<code>even</code>' and '<code>odd</code>' values.
1606
+
1607
+
1608
+ <div class="example">
1609
+ <p>CSS example:</p>
1610
+ <p>This allows an author to alternate the position of floated images:</p>
1611
+ <pre>img:nth-of-type(2n+1) { float: right; }
1612
+ img:nth-of-type(2n) { float: left; }</pre>
1613
+ </div>
1614
+
1615
+
1616
+ <h5><a name=nth-last-of-type-pseudo>:nth-last-of-type() pseudo-class</a></h5>
1617
+
1618
+ <p>The <code>:nth-last-of-type(<var>a</var>n+<var>b</var>)</code>
1619
+ pseudo-class notation represents an element that has
1620
+ <var>a</var><code>n</code>+<var>b</var>-1 siblings with the same
1621
+ element name <strong>after</strong> it in the document tree, for a
1622
+ given zero or positive integer value of <code>n</code>, and has a
1623
+ parent element. See <code>:nth-child()</code> pseudo-class for the
1624
+ syntax of its argument. It also accepts the '<code>even</code>' and '<code>odd</code>' values.
1625
+
1626
+
1627
+ <div class="example">
1628
+ <p>Example:</p>
1629
+ <p>To represent all <code>h2</code> children of an XHTML
1630
+ <code>body</code> except the first and last, one could use the
1631
+ following selector:</p>
1632
+ <pre>body &gt; h2:nth-of-type(n+2):nth-last-of-type(n+2)</pre>
1633
+ <p>In this case, one could also use <code>:not()</code>, although the
1634
+ selector ends up being just as long:</p>
1635
+ <pre>body &gt; h2:not(:first-of-type):not(:last-of-type)</pre>
1636
+ </div>
1637
+
1638
+
1639
+ <h5><a name=first-child-pseudo>:first-child pseudo-class</a></h5>
1640
+
1641
+ <p>Same as <code>:nth-child(1)</code>. The <code>:first-child</code> pseudo-class
1642
+ represents an element that is the first child of some other element.
1643
+
1644
+
1645
+ <div class="example">
1646
+ <p>Examples:</p>
1647
+ <p>The following selector represents a <code>p</code> element that is
1648
+ the first child of a <code>div</code> element:</p>
1649
+ <pre>div &gt; p:first-child</pre>
1650
+ <p>This selector can represent the <code>p</code> inside the
1651
+ <code>div</code> of the following fragment:</p>
1652
+ <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1653
+ &lt;div class="note"&gt;
1654
+ &lt;p&gt; The first P inside the note.&lt;/p&gt;
1655
+ &lt;/div&gt;</pre>but cannot represent the second <code>p</code> in the following
1656
+ fragment:
1657
+ <pre>&lt;p&gt; The last P before the note.&lt;/p&gt;
1658
+ &lt;div class="note"&gt;
1659
+ &lt;h2&gt; Note &lt;/h2&gt;
1660
+ &lt;p&gt; The first P inside the note.&lt;/p&gt;
1661
+ &lt;/div&gt;</pre>
1662
+ <p>The following two selectors are usually equivalent:</p>
1663
+ <pre>* &gt; a:first-child /* a is first child of any element */
1664
+ a:first-child /* Same (assuming a is not the root element) */</pre>
1665
+ </div>
1666
+
1667
+ <h5><a name=last-child-pseudo>:last-child pseudo-class</a></h5>
1668
+
1669
+ <p>Same as <code>:nth-last-child(1)</code>. The <code>:last-child</code> pseudo-class
1670
+ represents an element that is the last child of some other element.
1671
+
1672
+ <div class="example">
1673
+ <p>Example:</p>
1674
+ <p>The following selector represents a list item <code>li</code> that
1675
+ is the last child of an ordered list <code>ol</code>.
1676
+ <pre>ol &gt; li:last-child</pre>
1677
+ </div>
1678
+
1679
+ <h5><a name=first-of-type-pseudo>:first-of-type pseudo-class</a></h5>
1680
+
1681
+ <p>Same as <code>:nth-of-type(1)</code>. The <code>:first-of-type</code> pseudo-class
1682
+ represents an element that is the first sibling of its type in the list of
1683
+ children of its parent element.
1684
+
1685
+ <div class="example">
1686
+ <p>Example:</p>
1687
+ <p>The following selector represents a definition title
1688
+ <code>dt</code> inside a definition list <code>dl</code>, this
1689
+ <code>dt</code> being the first of its type in the list of children of
1690
+ its parent element.</p>
1691
+ <pre>dl dt:first-of-type</pre>
1692
+ <p>It is a valid description for the first two <code>dt</code>
1693
+ elements in the following example but not for the third one:</p>
1694
+ <pre>&lt;dl&gt;
1695
+ &lt;dt&gt;gigogne&lt;/dt&gt;
1696
+ &lt;dd&gt;
1697
+ &lt;dl&gt;
1698
+ &lt;dt&gt;fus&eacute;e&lt;/dt&gt;
1699
+ &lt;dd&gt;multistage rocket&lt;/dd&gt;
1700
+ &lt;dt&gt;table&lt;/dt&gt;
1701
+ &lt;dd&gt;nest of tables&lt;/dd&gt;
1702
+ &lt;/dl&gt;
1703
+ &lt;/dd&gt;
1704
+ &lt;/dl&gt;</pre>
1705
+ </div>
1706
+
1707
+ <h5><a name=last-of-type-pseudo>:last-of-type pseudo-class</a></h5>
1708
+
1709
+ <p>Same as <code>:nth-last-of-type(1)</code>. The
1710
+ <code>:last-of-type</code> pseudo-class represents an element that is
1711
+ the last sibling of its type in the list of children of its parent
1712
+ element.</p>
1713
+
1714
+ <div class="example">
1715
+ <p>Example:</p>
1716
+ <p>The following selector represents the last data cell
1717
+ <code>td</code> of a table row.</p>
1718
+ <pre>tr &gt; td:last-of-type</pre>
1719
+ </div>
1720
+
1721
+ <h5><a name=only-child-pseudo>:only-child pseudo-class</a></h5>
1722
+
1723
+ <p>Represents an element that has a parent element and whose parent
1724
+ element has no other element children. Same as
1725
+ <code>:first-child:last-child</code> or
1726
+ <code>:nth-child(1):nth-last-child(1)</code>, but with a lower
1727
+ specificity.</p>
1728
+
1729
+ <h5><a name=only-of-type-pseudo>:only-of-type pseudo-class</a></h5>
1730
+
1731
+ <p>Represents an element that has a parent element and whose parent
1732
+ element has no other element children with the same element name. Same
1733
+ as <code>:first-of-type:last-of-type</code> or
1734
+ <code>:nth-of-type(1):nth-last-of-type(1)</code>, but with a lower
1735
+ specificity.</p>
1736
+
1737
+
1738
+ <h5><a name=empty-pseudo></a>:empty pseudo-class</h5>
1739
+
1740
+ <p>The <code>:empty</code> pseudo-class represents an element that has
1741
+ no children at all. In terms of the DOM, only element nodes and text
1742
+ nodes (including CDATA nodes and entity references) whose data has a
1743
+ non-zero length must be considered as affecting emptiness; comments,
1744
+ PIs, and other nodes must not affect whether an element is considered
1745
+ empty or not.</p>
1746
+
1747
+ <div class="example">
1748
+ <p>Examples:</p>
1749
+ <p><code>p:empty</code> is a valid representation of the following fragment:</p>
1750
+ <pre>&lt;p&gt;&lt;/p&gt;</pre>
1751
+ <p><code>foo:empty</code> is not a valid representation for the
1752
+ following fragments:</p>
1753
+ <pre>&lt;foo&gt;bar&lt;/foo&gt;</pre>
1754
+ <pre>&lt;foo&gt;&lt;bar&gt;bla&lt;/bar&gt;&lt;/foo&gt;</pre>
1755
+ <pre>&lt;foo&gt;this is not &lt;bar&gt;:empty&lt;/bar&gt;&lt;/foo&gt;</pre>
1756
+ </div>
1757
+
1758
+ <h4><a name=content-selectors>6.6.6. Blank</a></h4> <!-- It's the Return of Appendix H!!! Run away! -->
1759
+
1760
+ <p>This section intentionally left blank.</p>
1761
+ <!-- (used to be :contains()) -->
1762
+
1763
+ <h4><a name=negation></a>6.6.7. The negation pseudo-class</h4>
1764
+
1765
+ <p>The negation pseudo-class, <code>:not(<var>X</var>)</code>, is a
1766
+ functional notation taking a <a href="#simple-selectors-dfn">simple
1767
+ selector</a> (excluding the negation pseudo-class itself and
1768
+ pseudo-elements) as an argument. It represents an element that is not
1769
+ represented by the argument.
1770
+
1771
+ <!-- pseudo-elements are not simple selectors, so the above paragraph
1772
+ may be a bit confusing -->
1773
+
1774
+ <div class="example">
1775
+ <p>Examples:</p>
1776
+ <p>The following CSS selector matches all <code>button</code>
1777
+ elements in an HTML document that are not disabled.</p>
1778
+ <pre>button:not([DISABLED])</pre>
1779
+ <p>The following selector represents all but <code>FOO</code>
1780
+ elements.</p>
1781
+ <pre>*:not(FOO)</pre>
1782
+ <p>The following group of selectors represents all HTML elements
1783
+ except links.</p>
1784
+ <pre>html|*:not(:link):not(:visited)</pre>
1785
+ </div>
1786
+
1787
+ <p>Default namespace declarations do not affect the argument of the
1788
+ negation pseudo-class unless the argument is a universal selector or a
1789
+ type selector.</p>
1790
+
1791
+ <div class="example">
1792
+ <p>Examples:</p>
1793
+ <p>Assuming that the default namespace is bound to
1794
+ "http://example.com/", the following selector represents all
1795
+ elements that are not in that namespace:</p>
1796
+ <pre>*|*:not(*)</pre>
1797
+ <p>The following CSS selector matches any element being hovered,
1798
+ regardless of its namespace. In particular, it is not limited to
1799
+ only matching elements in the default namespace that are not being
1800
+ hovered, and elements not in the default namespace don't match the
1801
+ rule when they <em>are</em> being hovered.</p>
1802
+ <pre>*|*:not(:hover)</pre>
1803
+ </div>
1804
+
1805
+ <p class="note"><strong>Note</strong>: the :not() pseudo allows
1806
+ useless selectors to be written. For instance <code>:not(*|*)</code>,
1807
+ which represents no element at all, or <code>foo:not(bar)</code>,
1808
+ which is equivalent to <code>foo</code> but with a higher
1809
+ specificity.</p>
1810
+
1811
+ <h3><a name=pseudo-elements>7. Pseudo-elements</a></h3>
1812
+
1813
+ <p>Pseudo-elements create abstractions about the document tree beyond
1814
+ those specified by the document language. For instance, document
1815
+ languages do not offer mechanisms to access the first letter or first
1816
+ line of an element's content. Pseudo-elements allow designers to refer
1817
+ to this otherwise inaccessible information. Pseudo-elements may also
1818
+ provide designers a way to refer to content that does not exist in the
1819
+ source document (e.g., the <code>::before</code> and
1820
+ <code>::after</code> pseudo-elements give access to generated
1821
+ content).</p>
1822
+
1823
+ <p>A pseudo-element is made of two colons (<code>::</code>) followed
1824
+ by the name of the pseudo-element.</p>
1825
+
1826
+ <p>This <code>::</code> notation is introduced by the current document
1827
+ in order to establish a discrimination between pseudo-classes and
1828
+ pseudo-elements. For compatibility with existing style sheets, user
1829
+ agents must also accept the previous one-colon notation for
1830
+ pseudo-elements introduced in CSS levels 1 and 2 (namely,
1831
+ <code>:first-line</code>, <code>:first-letter</code>,
1832
+ <code>:before</code> and <code>:after</code>). This compatibility is
1833
+ not allowed for the new pseudo-elements introduced in CSS level 3.</p>
1834
+
1835
+ <p>Only one pseudo-element may appear per selector, and if present it
1836
+ must appear after the sequence of simple selectors that represents the
1837
+ <a href="#subject">subjects</a> of the selector. <span class="note">A
1838
+ future version of this specification may allow multiple
1839
+ pesudo-elements per selector.</span></p>
1840
+
1841
+ <h4><a name=first-line>7.1. The ::first-line pseudo-element</a></h4>
1842
+
1843
+ <p>The <code>::first-line</code> pseudo-element describes the contents
1844
+ of the first formatted line of an element.
1845
+
1846
+ <div class="example">
1847
+ <p>CSS example:</p>
1848
+ <pre>p::first-line { text-transform: uppercase }</pre>
1849
+ <p>The above rule means "change the letters of the first line of every
1850
+ paragraph to uppercase".</p>
1851
+ </div>
1852
+
1853
+ <p>The selector <code>p::first-line</code> does not match any real
1854
+ HTML element. It does match a pseudo-element that conforming user
1855
+ agents will insert at the beginning of every paragraph.</p>
1856
+
1857
+ <p>Note that the length of the first line depends on a number of
1858
+ factors, including the width of the page, the font size, etc. Thus,
1859
+ an ordinary HTML paragraph such as:</p>
1860
+
1861
+ <pre>
1862
+ &lt;P&gt;This is a somewhat long HTML
1863
+ paragraph that will be broken into several
1864
+ lines. The first line will be identified
1865
+ by a fictional tag sequence. The other lines
1866
+ will be treated as ordinary lines in the
1867
+ paragraph.&lt;/P&gt;
1868
+ </pre>
1869
+
1870
+ <p>the lines of which happen to be broken as follows:
1871
+
1872
+ <pre>
1873
+ THIS IS A SOMEWHAT LONG HTML PARAGRAPH THAT
1874
+ will be broken into several lines. The first
1875
+ line will be identified by a fictional tag
1876
+ sequence. The other lines will be treated as
1877
+ ordinary lines in the paragraph.
1878
+ </pre>
1879
+
1880
+ <p>This paragraph might be "rewritten" by user agents to include the
1881
+ <em>fictional tag sequence</em> for <code>::first-line</code>. This
1882
+ fictional tag sequence helps to show how properties are inherited.</p>
1883
+
1884
+ <pre>
1885
+ &lt;P&gt;<b>&lt;P::first-line&gt;</b> This is a somewhat long HTML
1886
+ paragraph that <b>&lt;/P::first-line&gt;</b> will be broken into several
1887
+ lines. The first line will be identified
1888
+ by a fictional tag sequence. The other lines
1889
+ will be treated as ordinary lines in the
1890
+ paragraph.&lt;/P&gt;
1891
+ </pre>
1892
+
1893
+ <p>If a pseudo-element breaks up a real element, the desired effect
1894
+ can often be described by a fictional tag sequence that closes and
1895
+ then re-opens the element. Thus, if we mark up the previous paragraph
1896
+ with a <code>span</code> element:</p>
1897
+
1898
+ <pre>
1899
+ &lt;P&gt;<b>&lt;SPAN class="test"&gt;</b> This is a somewhat long HTML
1900
+ paragraph that will be broken into several
1901
+ lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1902
+ by a fictional tag sequence. The other lines
1903
+ will be treated as ordinary lines in the
1904
+ paragraph.&lt;/P&gt;
1905
+ </pre>
1906
+
1907
+ <p>the user agent could simulate start and end tags for
1908
+ <code>span</code> when inserting the fictional tag sequence for
1909
+ <code>::first-line</code>.
1910
+
1911
+ <pre>
1912
+ &lt;P&gt;&lt;P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> This is a
1913
+ somewhat long HTML
1914
+ paragraph that will <b>&lt;/SPAN&gt;</b>&lt;/P::first-line&gt;<b>&lt;SPAN class="test"&gt;</b> be
1915
+ broken into several
1916
+ lines.<b>&lt;/SPAN&gt;</b> The first line will be identified
1917
+ by a fictional tag sequence. The other lines
1918
+ will be treated as ordinary lines in the
1919
+ paragraph.&lt;/P&gt;
1920
+ </pre>
1921
+
1922
+ <p>In CSS, the <code>::first-line</code> pseudo-element can only be
1923
+ attached to a block-level element, an inline-block, a table-caption,
1924
+ or a table-cell.</p>
1925
+
1926
+ <p><a name="first-formatted-line"></a>The "first formatted line" of an
1927
+ element may occur inside a
1928
+ block-level descendant in the same flow (i.e., a block-level
1929
+ descendant that is not positioned and not a float). E.g., the first
1930
+ line of the <code>div</code> in <code>&lt;DIV>&lt;P>This
1931
+ line...&lt;/P>&lt/DIV></code> is the first line of the <code>p</code> (assuming
1932
+ that both <code>p</code> and <code>div</code> are block-level).
1933
+
1934
+ <p>The first line of a table-cell or inline-block cannot be the first
1935
+ formatted line of an ancestor element. Thus, in <code>&lt;DIV&gt;&lt;P
1936
+ STYLE="display: inline-block">Hello&lt;BR&gt;Goodbye&lt;/P&gt;
1937
+ etcetera&lt;/DIV&gt;</code> the first formatted line of the
1938
+ <code>div</code> is not the line "Hello".
1939
+
1940
+ <p class="note">Note that the first line of the <code>p</code> in this
1941
+ fragment: <code>&lt;p&gt&lt;br&gt;First...</code> doesn't contain any
1942
+ letters (assuming the default style for <code>br</code> in HTML
1943
+ 4). The word "First" is not on the first formatted line.
1944
+
1945
+ <p>A UA should act as if the fictional start tags of the
1946
+ <code>::first-line</code> pseudo-elements were nested just inside the
1947
+ innermost enclosing block-level element. (Since CSS1 and CSS2 were
1948
+ silent on this case, authors should not rely on this behavior.) Here
1949
+ is an example. The fictional tag sequence for</p>
1950
+
1951
+ <pre>
1952
+ &lt;DIV>
1953
+ &lt;P>First paragraph&lt;/P>
1954
+ &lt;P>Second paragraph&lt;/P>
1955
+ &lt;/DIV>
1956
+ </pre>
1957
+
1958
+ <p>is</p>
1959
+
1960
+ <pre>
1961
+ &lt;DIV>
1962
+ &lt;P>&lt;DIV::first-line>&lt;P::first-line>First paragraph&lt;/P::first-line>&lt;/DIV::first-line>&lt;/P>
1963
+ &lt;P>&lt;P::first-line>Second paragraph&lt;/P::first-line>&lt;/P>
1964
+ &lt;/DIV>
1965
+ </pre>
1966
+
1967
+ <p>The <code>::first-line</code> pseudo-element is similar to an
1968
+ inline-level element, but with certain restrictions. In CSS, the
1969
+ following properties apply to a <code>::first-line</code>
1970
+ pseudo-element: font properties, color property, background
1971
+ properties, 'word-spacing', 'letter-spacing', 'text-decoration',
1972
+ 'vertical-align', 'text-transform', 'line-height'. UAs may apply other
1973
+ properties as well.</p>
1974
+
1975
+
1976
+ <h4><a name=first-letter>7.2. The ::first-letter pseudo-element</a></h4>
1977
+
1978
+ <p>The <code>::first-letter</code> pseudo-element represents the first
1979
+ letter of the first line of a block, if it is not preceded by any
1980
+ other content (such as images or inline tables) on its line. The
1981
+ ::first-letter pseudo-element may be used for "initial caps" and "drop
1982
+ caps", which are common typographical effects. This type of initial
1983
+ letter is similar to an inline-level element if its 'float' property
1984
+ is 'none'; otherwise, it is similar to a floated element.</p>
1985
+
1986
+ <p>In CSS, these are the properties that apply to <code>::first-letter</code>
1987
+ pseudo-elements: font properties, 'text-decoration', 'text-transform',
1988
+ 'letter-spacing', 'word-spacing' (when appropriate), 'line-height',
1989
+ 'float', 'vertical-align' (only if 'float' is 'none'), margin
1990
+ properties, padding properties, border properties, color property,
1991
+ background properties. UAs may apply other properties as well. To
1992
+ allow UAs to render a typographically correct drop cap or initial cap,
1993
+ the UA may choose a line-height, width and height based on the shape
1994
+ of the letter, unlike for normal elements.</p>
1995
+
1996
+ <div class="example">
1997
+ <p>Example:</p>
1998
+ <p>This example shows a possible rendering of an initial cap. Note
1999
+ that the 'line-height' that is inherited by the <code>::first-letter</code>
2000
+ pseudo-element is 1.1, but the UA in this example has computed the
2001
+ height of the first letter differently, so that it doesn't cause any
2002
+ unnecessary space between the first two lines. Also note that the
2003
+ fictional start tag of the first letter is inside the <span>span</span>, and thus
2004
+ the font weight of the first letter is normal, not bold as the <span>span</span>:
2005
+ <pre>
2006
+ p { line-height: 1.1 }
2007
+ p::first-letter { font-size: 3em; font-weight: normal }
2008
+ span { font-weight: bold }
2009
+ ...
2010
+ &lt;p>&lt;span>Het hemelsche&lt;/span> gerecht heeft zich ten lange lesten&lt;br>
2011
+ Erbarremt over my en mijn benaeuwde vesten&lt;br>
2012
+ En arme burgery, en op mijn volcx gebed&lt;br>
2013
+ En dagelix geschrey de bange stad ontzet.
2014
+ </pre>
2015
+ <div class="figure">
2016
+ <p><img src="initial-cap.png" alt="Image illustrating the ::first-letter pseudo-element">
2017
+ </div>
2018
+ </div>
2019
+
2020
+ <div class="example">
2021
+ <p>The following CSS will make a drop cap initial letter span about two lines:</p>
2022
+
2023
+ <pre>
2024
+ &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"&gt;
2025
+ &lt;HTML&gt;
2026
+ &lt;HEAD&gt;
2027
+ &lt;TITLE&gt;Drop cap initial letter&lt;/TITLE&gt;
2028
+ &lt;STYLE type="text/css"&gt;
2029
+ P { font-size: 12pt; line-height: 1.2 }
2030
+ P::first-letter { font-size: 200%; font-weight: bold; float: left }
2031
+ SPAN { text-transform: uppercase }
2032
+ &lt;/STYLE&gt;
2033
+ &lt;/HEAD&gt;
2034
+ &lt;BODY&gt;
2035
+ &lt;P&gt;&lt;SPAN&gt;The first&lt;/SPAN&gt; few words of an article
2036
+ in The Economist.&lt;/P&gt;
2037
+ &lt;/BODY&gt;
2038
+ &lt;/HTML&gt;
2039
+ </pre>
2040
+
2041
+ <p>This example might be formatted as follows:</p>
2042
+
2043
+ <div class="figure">
2044
+ <P><img src="first-letter.gif" alt="Image illustrating the combined effect of the ::first-letter and ::first-line pseudo-elements"></p>
2045
+ </div>
2046
+
2047
+ <p>The <span class="index-inst" title="fictional tag
2048
+ sequence">fictional tag sequence</span> is:</p>
2049
+
2050
+ <pre>
2051
+ &lt;P&gt;
2052
+ &lt;SPAN&gt;
2053
+ &lt;P::first-letter&gt;
2054
+ T
2055
+ &lt;/P::first-letter&gt;he first
2056
+ &lt;/SPAN&gt;
2057
+ few words of an article in the Economist.
2058
+ &lt;/P&gt;
2059
+ </pre>
2060
+
2061
+ <p>Note that the <code>::first-letter</code> pseudo-element tags abut
2062
+ the content (i.e., the initial character), while the ::first-line
2063
+ pseudo-element start tag is inserted right after the start tag of the
2064
+ block element.</p> </div>
2065
+
2066
+ <p>In order to achieve traditional drop caps formatting, user agents
2067
+ may approximate font sizes, for example to align baselines. Also, the
2068
+ glyph outline may be taken into account when formatting.</p>
2069
+
2070
+ <p>Punctuation (i.e, characters defined in Unicode in the "open" (Ps),
2071
+ "close" (Pe), "initial" (Pi). "final" (Pf) and "other" (Po)
2072
+ punctuation classes), that precedes or follows the first letter should
2073
+ be included. <a href="#refsUNICODE">[UNICODE]</a></p>
2074
+
2075
+ <div class="figure">
2076
+ <P><img src="first-letter2.gif" alt="Quotes that precede the
2077
+ first letter should be included."></p>
2078
+ </div>
2079
+
2080
+ <p>The <code>::first-letter</code> also applies if the first letter is
2081
+ in fact a digit, e.g., the "6" in "67 million dollars is a lot of
2082
+ money."</p>
2083
+
2084
+ <p>In CSS, the <code>::first-letter</code> pseudo-element applies to
2085
+ block, list-item, table-cell, table-caption, and inline-block
2086
+ elements. <span class="note">A future version of this specification
2087
+ may allow this pesudo-element to apply to more element
2088
+ types.</span></p>
2089
+
2090
+ <p>The <code>::first-letter</code> pseudo-element can be used with all
2091
+ such elements that contain text, or that have a descendant in the same
2092
+ flow that contains text. A UA should act as if the fictional start tag
2093
+ of the ::first-letter pseudo-element is just before the first text of
2094
+ the element, even if that first text is in a descendant.</p>
2095
+
2096
+ <div class="example">
2097
+ <p>Example:</p>
2098
+ <p>The fictional tag sequence for this HTMLfragment:
2099
+ <pre>&lt;div>
2100
+ &lt;p>The first text.</pre>
2101
+ <p>is:
2102
+ <pre>&lt;div>
2103
+ &lt;p>&lt;div::first-letter>&lt;p::first-letter>T&lt;/...>&lt;/...>he first text.</pre>
2104
+ </div>
2105
+
2106
+ <p>The first letter of a table-cell or inline-block cannot be the
2107
+ first letter of an ancestor element. Thus, in <code>&lt;DIV&gt;&lt;P
2108
+ STYLE="display: inline-block">Hello&lt;BR&gt;Goodbye&lt;/P&gt;
2109
+ etcetera&lt;/DIV&gt;</code> the first letter of the <code>div</code> is not the
2110
+ letter "H". In fact, the <code>div</code> doesn't have a first letter.
2111
+
2112
+ <p>The first letter must occur on the <a
2113
+ href="#first-formatted-line">first formatted line.</a> For example, in
2114
+ this fragment: <code>&lt;p&gt&lt;br&gt;First...</code> the first line
2115
+ doesn't contain any letters and <code>::first-letter</code> doesn't
2116
+ match anything (assuming the default style for <code>br</code> in HTML
2117
+ 4). In particular, it does not match the "F" of "First."
2118
+
2119
+ <p>In CSS, if an element is a list item ('display: list-item'), the
2120
+ <code>::first-letter</code> applies to the first letter in the
2121
+ principal box after the marker. UAs may ignore
2122
+ <code>::first-letter</code> on list items with 'list-style-position:
2123
+ inside'. If an element has <code>::before</code> or
2124
+ <code>::after</code> content, the <code>::first-letter</code> applies
2125
+ to the first letter of the element <em>including</em> that content.
2126
+
2127
+ <div class="example">
2128
+ <p>Example:</p>
2129
+ <p>After the rule 'p::before {content: "Note: "}', the selector
2130
+ 'p::first-letter' matches the "N" of "Note".</p>
2131
+ </div>
2132
+
2133
+ <p>Some languages may have specific rules about how to treat certain
2134
+ letter combinations. In Dutch, for example, if the letter combination
2135
+ "ij" appears at the beginning of a word, both letters should be
2136
+ considered within the <code>::first-letter</code> pseudo-element.
2137
+
2138
+ <p>If the letters that would form the ::first-letter are not in the
2139
+ same element, such as "'T" in <code>&lt;p>'&lt;em>T...</code>, the UA
2140
+ may create a ::first-letter pseudo-element from one of the elements,
2141
+ both elements, or simply not create a pseudo-element.</p>
2142
+
2143
+ <p>Similarly, if the first letter(s) of the block are not at the start
2144
+ of the line (for example due to bidirectional reordering), then the UA
2145
+ need not create the pseudo-element(s).
2146
+
2147
+ <div class="example">
2148
+ <p>Example:</p>
2149
+ <p><a name="overlapping-example">The following example</a> illustrates
2150
+ how overlapping pseudo-elements may interact. The first letter of
2151
+ each P element will be green with a font size of '24pt'. The rest of
2152
+ the first formatted line will be 'blue' while the rest of the
2153
+ paragraph will be 'red'.</p>
2154
+
2155
+ <pre>p { color: red; font-size: 12pt }
2156
+ p::first-letter { color: green; font-size: 200% }
2157
+ p::first-line { color: blue }
2158
+
2159
+ &lt;P&gt;Some text that ends up on two lines&lt;/P&gt;</pre>
2160
+
2161
+ <p>Assuming that a line break will occur before the word "ends", the
2162
+ <span class="index-inst" title="fictional tag sequence">fictional tag
2163
+ sequence</span> for this fragment might be:</p>
2164
+
2165
+ <pre>&lt;P&gt;
2166
+ &lt;P::first-line&gt;
2167
+ &lt;P::first-letter&gt;
2168
+ S
2169
+ &lt;/P::first-letter&gt;ome text that
2170
+ &lt;/P::first-line&gt;
2171
+ ends up on two lines
2172
+ &lt;/P&gt;</pre>
2173
+
2174
+ <p>Note that the <code>::first-letter</code> element is inside the <code>::first-line</code>
2175
+ element. Properties set on <code>::first-line</code> are inherited by
2176
+ <code>::first-letter</code>, but are overridden if the same property is set on
2177
+ <code>::first-letter</code>.</p>
2178
+ </div>
2179
+
2180
+
2181
+ <h4><a name=UIfragments>7.3.</a> <a name=selection>The ::selection pseudo-element</a></h4>
2182
+
2183
+ <p>The <code>::selection</code> pseudo-element applies to the portion
2184
+ of a document that has been highlighted by the user. This also
2185
+ applies, for example, to selected text within an editable text
2186
+ field. This pseudo-element should not be confused with the <code><a
2187
+ href="#checked">:checked</a></code> pseudo-class (which used to be
2188
+ named <code>:selected</code>)
2189
+
2190
+ <p>Although the <code>::selection</code> pseudo-element is dynamic in
2191
+ nature, and is altered by user action, it is reasonable to expect that
2192
+ when a UA re-renders to a static medium (such as a printed page, see
2193
+ <a href="#refsCSS21">[CSS21]</a>) which was originally rendered to a
2194
+ dynamic medium (like screen), the UA may wish to transfer the current
2195
+ <code>::selection</code> state to that other medium, and have all the
2196
+ appropriate formatting and rendering take effect as well. This is not
2197
+ required &mdash; UAs may omit the <code>::selection</code>
2198
+ pseudo-element for static media.
2199
+
2200
+ <p>These are the CSS properties that apply to <code>::selection</code>
2201
+ pseudo-elements: color, background, cursor (optional), outline
2202
+ (optional). The computed value of the 'background-image' property on
2203
+ <code>::selection</code> may be ignored.
2204
+
2205
+
2206
+ <h4><a name=gen-content>7.4. The ::before and ::after pseudo-elements</a></h4>
2207
+
2208
+ <p>The <code>::before</code> and <code>::after</code> pseudo-elements
2209
+ can be used to describe generated content before or after an element's
2210
+ content. They are explained in CSS 2.1 <a
2211
+ href="#refsCSS21">[CSS21]</a>.</p>
2212
+
2213
+ <p>When the <code>::first-letter</code> and <code>::first-line</code>
2214
+ pseudo-elements are combined with <code>::before</code> and
2215
+ <code>::after</code>, they apply to the first letter or line of the
2216
+ element including the inserted text.</p>
2217
+
2218
+ <h2><a name=combinators>8. Combinators</a></h2>
2219
+
2220
+ <h3><a name=descendant-combinators>8.1. Descendant combinator</a></h3>
2221
+
2222
+ <p>At times, authors may want selectors to describe an element that is
2223
+ the descendant of another element in the document tree (e.g., "an
2224
+ <code>EM</code> element that is contained within an <code>H1</code>
2225
+ element"). Descendant combinators express such a relationship. A
2226
+ descendant combinator is <a href="#whitespace">white space</a> that
2227
+ separates two sequences of simple selectors. A selector of the form
2228
+ "<code>A B</code>" represents an element <code>B</code> that is an
2229
+ arbitrary descendant of some ancestor element <code>A</code>.
2230
+
2231
+ <div class="example">
2232
+ <p>Examples:</p>
2233
+ <p>For example, consider the following selector:</p>
2234
+ <pre>h1 em</pre>
2235
+ <p>It represents an <code>em</code> element being the descendant of
2236
+ an <code>h1</code> element. It is a correct and valid, but partial,
2237
+ description of the following fragment:</p>
2238
+ <pre>&lt;h1&gt;This &lt;span class="myclass"&gt;headline
2239
+ is &lt;em&gt;very&lt;/em&gt; important&lt;/span&gt;&lt;/h1&gt;</pre>
2240
+ <p>The following selector:</p>
2241
+ <pre>div * p</pre>
2242
+ <p>represents a <code>p</code> element that is a grandchild or later
2243
+ descendant of a <code>div</code> element. Note the whitespace on
2244
+ either side of the "*" is not part of the universal selector; the
2245
+ whitespace is a combinator indicating that the DIV must be the
2246
+ ancestor of some element, and that that element must be an ancestor
2247
+ of the P.</p>
2248
+ <p>The following selector, which combines descendant combinators and
2249
+ <a href="#attribute-selectors">attribute selectors</a>, represents an
2250
+ element that (1) has the <code>href</code> attribute set and (2) is
2251
+ inside a <code>p</code> that is itself inside a <code>div</code>:</p>
2252
+ <pre>div p *[href]</pre>
2253
+ </div>
2254
+
2255
+ <h3><a name=child-combinators>8.2. Child combinators</a></h3>
2256
+
2257
+ <p>A <dfn>child combinator</dfn> describes a childhood relationship
2258
+ between two elements. A child combinator is made of the
2259
+ &quot;greater-than sign&quot; (<code>&gt;</code>) character and
2260
+ separates two sequences of simple selectors.
2261
+
2262
+
2263
+ <div class="example">
2264
+ <p>Examples:</p>
2265
+ <p>The following selector represents a <code>p</code> element that is
2266
+ child of <code>body</code>:</p>
2267
+ <pre>body &gt; p</pre>
2268
+ <p>The following example combines descendant combinators and child
2269
+ combinators.</p>
2270
+ <pre>div ol&gt;li p</pre><!-- LEAVE THOSE SPACES OUT! see below -->
2271
+ <p>It represents a <code>p</code> element that is a descendant of an
2272
+ <code>li</code> element; the <code>li</code> element must be the
2273
+ child of an <code>ol</code> element; the <code>ol</code> element must
2274
+ be a descendant of a <code>div</code>. Notice that the optional white
2275
+ space around the "&gt;" combinator has been left out.</p>
2276
+ </div>
2277
+
2278
+ <p>For information on selecting the first child of an element, please
2279
+ see the section on the <code><a
2280
+ href="#structural-pseudos">:first-child</a></code> pseudo-class
2281
+ above.</p>
2282
+
2283
+ <h3><a name=sibling-combinators>8.3. Sibling combinators</a></h3>
2284
+
2285
+ <p>There are two different sibling combinators: the adjacent sibling
2286
+ combinator and the general sibling combinator. In both cases,
2287
+ non-element nodes (e.g. text between elements) are ignored when
2288
+ considering adjacency of elements.</p>
2289
+
2290
+ <h4><a name=adjacent-sibling-combinators>8.3.1. Adjacent sibling combinator</a></h4>
2291
+
2292
+ <p>The adjacent sibling combinator is made of the &quot;plus
2293
+ sign&quot; (U+002B, <code>+</code>) character that separates two
2294
+ sequences of simple selectors. The elements represented by the two
2295
+ sequences share the same parent in the document tree and the element
2296
+ represented by the first sequence immediately precedes the element
2297
+ represented by the second one.</p>
2298
+
2299
+ <div class="example">
2300
+ <p>Examples:</p>
2301
+ <p>The following selector represents a <code>p</code> element
2302
+ immediately following a <code>math</code> element:</p>
2303
+ <pre>math + p</pre>
2304
+ <p>The following selector is conceptually similar to the one in the
2305
+ previous example, except that it adds an attribute selector &mdash; it
2306
+ adds a constraint to the <code>h1</code> element, that it must have
2307
+ <code>class="opener"</code>:</p>
2308
+ <pre>h1.opener + h2</pre>
2309
+ </div>
2310
+
2311
+
2312
+ <h4><a name=general-sibling-combinators>8.3.2. General sibling combinator</a></h4>
2313
+
2314
+ <p>The general sibling combinator is made of the &quot;tilde&quot;
2315
+ (U+007E, <code>~</code>) character that separates two sequences of
2316
+ simple selectors. The elements represented by the two sequences share
2317
+ the same parent in the document tree and the element represented by
2318
+ the first sequence precedes (not necessarily immediately) the element
2319
+ represented by the second one.</p>
2320
+
2321
+ <div class="example">
2322
+ <p>Example:</p>
2323
+ <pre>h1 ~ pre</pre>
2324
+ <p>represents a <code>pre</code> element following an <code>h1</code>. It
2325
+ is a correct and valid, but partial, description of:</p>
2326
+ <pre>&lt;h1&gt;Definition of the function a&lt;/h1&gt;
2327
+ &lt;p&gt;Function a(x) has to be applied to all figures in the table.&lt;/p&gt;
2328
+ &lt;pre&gt;function a(x) = 12x/13.5&lt;/pre&gt;</pre>
2329
+ </div>
2330
+
2331
+ <h2><a name=specificity>9. Calculating a selector's specificity</a></h2>
2332
+
2333
+ <p>A selector's specificity is calculated as follows:</p>
2334
+
2335
+ <ul>
2336
+ <li>count the number of ID selectors in the selector (= a)</li>
2337
+ <li>count the number of class selectors, attributes selectors, and pseudo-classes in the selector (= b)</li>
2338
+ <li>count the number of element names in the selector (= c)</li>
2339
+ <li>ignore pseudo-elements</li>
2340
+ </ul>
2341
+
2342
+ <p>Selectors inside <a href="#negation">the negation pseudo-class</a>
2343
+ are counted like any other, but the negation itself does not count as
2344
+ a pseudo-class.</p>
2345
+
2346
+ <p>Concatenating the three numbers a-b-c (in a number system with a
2347
+ large base) gives the specificity.</p>
2348
+
2349
+ <div class="example">
2350
+ <p>Examples:</p>
2351
+ <pre>* /* a=0 b=0 c=0 -&gt; specificity = 0 */
2352
+ LI /* a=0 b=0 c=1 -&gt; specificity = 1 */
2353
+ UL LI /* a=0 b=0 c=2 -&gt; specificity = 2 */
2354
+ UL OL+LI /* a=0 b=0 c=3 -&gt; specificity = 3 */
2355
+ H1 + *[REL=up] /* a=0 b=1 c=1 -&gt; specificity = 11 */
2356
+ UL OL LI.red /* a=0 b=1 c=3 -&gt; specificity = 13 */
2357
+ LI.red.level /* a=0 b=2 c=1 -&gt; specificity = 21 */
2358
+ #x34y /* a=1 b=0 c=0 -&gt; specificity = 100 */
2359
+ #s12:not(FOO) /* a=1 b=0 c=1 -&gt; specificity = 101 */
2360
+ </pre>
2361
+ </div>
2362
+
2363
+ <p class="note"><strong>Note:</strong> the specificity of the styles
2364
+ specified in an HTML <code>style</code> attribute is described in CSS
2365
+ 2.1. <a href="#refsCSS21">[CSS21]</a>.</p>
2366
+
2367
+ <h2><a name=w3cselgrammar>10. The grammar of Selectors</a></h2>
2368
+
2369
+ <h3><a name=grammar>10.1. Grammar</a></h3>
2370
+
2371
+ <p>The grammar below defines the syntax of Selectors. It is globally
2372
+ LL(1) and can be locally LL(2) (but note that most UA's should not use
2373
+ it directly, since it doesn't express the parsing conventions). The
2374
+ format of the productions is optimized for human consumption and some
2375
+ shorthand notations beyond Yacc (see <a href="#refsYACC">[YACC]</a>)
2376
+ are used:</p>
2377
+
2378
+ <ul>
2379
+ <li><b>*</b>: 0 or more
2380
+ <li><b>+</b>: 1 or more
2381
+ <li><b>?</b>: 0 or 1
2382
+ <li><b>|</b>: separates alternatives
2383
+ <li><b>[ ]</b>: grouping </li>
2384
+ </ul>
2385
+
2386
+ <p>The productions are:</p>
2387
+
2388
+ <pre>selectors_group
2389
+ : selector [ COMMA S* selector ]*
2390
+ ;
2391
+
2392
+ selector
2393
+ : simple_selector_sequence [ combinator simple_selector_sequence ]*
2394
+ ;
2395
+
2396
+ combinator
2397
+ /* combinators can be surrounded by white space */
2398
+ : PLUS S* | GREATER S* | TILDE S* | S+
2399
+ ;
2400
+
2401
+ simple_selector_sequence
2402
+ : [ type_selector | universal ]
2403
+ [ HASH | class | attrib | pseudo | negation ]*
2404
+ | [ HASH | class | attrib | pseudo | negation ]+
2405
+ ;
2406
+
2407
+ type_selector
2408
+ : [ namespace_prefix ]? element_name
2409
+ ;
2410
+
2411
+ namespace_prefix
2412
+ : [ IDENT | '*' ]? '|'
2413
+ ;
2414
+
2415
+ element_name
2416
+ : IDENT
2417
+ ;
2418
+
2419
+ universal
2420
+ : [ namespace_prefix ]? '*'
2421
+ ;
2422
+
2423
+ class
2424
+ : '.' IDENT
2425
+ ;
2426
+
2427
+ attrib
2428
+ : '[' S* [ namespace_prefix ]? IDENT S*
2429
+ [ [ PREFIXMATCH |
2430
+ SUFFIXMATCH |
2431
+ SUBSTRINGMATCH |
2432
+ '=' |
2433
+ INCLUDES |
2434
+ DASHMATCH ] S* [ IDENT | STRING ] S*
2435
+ ]? ']'
2436
+ ;
2437
+
2438
+ pseudo
2439
+ /* '::' starts a pseudo-element, ':' a pseudo-class */
2440
+ /* Exceptions: :first-line, :first-letter, :before and :after. */
2441
+ /* Note that pseudo-elements are restricted to one per selector and */
2442
+ /* occur only in the last simple_selector_sequence. */
2443
+ : ':' ':'? [ IDENT | functional_pseudo ]
2444
+ ;
2445
+
2446
+ functional_pseudo
2447
+ : FUNCTION S* expression ')'
2448
+ ;
2449
+
2450
+ expression
2451
+ /* In CSS3, the expressions are identifiers, strings, */
2452
+ /* or of the form "an+b" */
2453
+ : [ [ PLUS | '-' | DIMENSION | NUMBER | STRING | IDENT ] S* ]+
2454
+ ;
2455
+
2456
+ negation
2457
+ : NOT S* negation_arg S* ')'
2458
+ ;
2459
+
2460
+ negation_arg
2461
+ : type_selector | universal | HASH | class | attrib | pseudo
2462
+ ;</pre>
2463
+
2464
+
2465
+ <h3><a name=lex>10.2. Lexical scanner</a></h3>
2466
+
2467
+ <p>The following is the <a name=x3>tokenizer</a>, written in Flex (see
2468
+ <a href="#refsFLEX">[FLEX]</a>) notation. The tokenizer is
2469
+ case-insensitive.</p>
2470
+
2471
+ <p>The two occurrences of "\377" represent the highest character
2472
+ number that current versions of Flex can deal with (decimal 255). They
2473
+ should be read as "\4177777" (decimal 1114111), which is the highest
2474
+ possible code point in Unicode/ISO-10646. <a
2475
+ href="#refsUNICODE">[UNICODE]</a></p>
2476
+
2477
+ <pre>%option case-insensitive
2478
+
2479
+ ident [-]?{nmstart}{nmchar}*
2480
+ name {nmchar}+
2481
+ nmstart [_a-z]|{nonascii}|{escape}
2482
+ nonascii [^\0-\177]
2483
+ unicode \\[0-9a-f]{1,6}(\r\n|[ \n\r\t\f])?
2484
+ escape {unicode}|\\[^\n\r\f0-9a-f]
2485
+ nmchar [_a-z0-9-]|{nonascii}|{escape}
2486
+ num [0-9]+|[0-9]*\.[0-9]+
2487
+ string {string1}|{string2}
2488
+ string1 \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*\"
2489
+ string2 \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*\'
2490
+ invalid {invalid1}|{invalid2}
2491
+ invalid1 \"([^\n\r\f\\"]|\\{nl}|{nonascii}|{escape})*
2492
+ invalid2 \'([^\n\r\f\\']|\\{nl}|{nonascii}|{escape})*
2493
+ nl \n|\r\n|\r|\f
2494
+ w [ \t\r\n\f]*
2495
+
2496
+ %%
2497
+
2498
+ [ \t\r\n\f]+ return S;
2499
+
2500
+ "~=" return INCLUDES;
2501
+ "|=" return DASHMATCH;
2502
+ "^=" return PREFIXMATCH;
2503
+ "$=" return SUFFIXMATCH;
2504
+ "*=" return SUBSTRINGMATCH;
2505
+ {ident} return IDENT;
2506
+ {string} return STRING;
2507
+ {ident}"(" return FUNCTION;
2508
+ {num} return NUMBER;
2509
+ "#"{name} return HASH;
2510
+ {w}"+" return PLUS;
2511
+ {w}"&gt;" return GREATER;
2512
+ {w}"," return COMMA;
2513
+ {w}"~" return TILDE;
2514
+ ":not(" return NOT;
2515
+ @{ident} return ATKEYWORD;
2516
+ {invalid} return INVALID;
2517
+ {num}% return PERCENTAGE;
2518
+ {num}{ident} return DIMENSION;
2519
+ "&lt;!--" return CDO;
2520
+ "--&gt;" return CDC;
2521
+
2522
+ "url("{w}{string}{w}")" return URI;
2523
+ "url("{w}([!#$%&*-~]|{nonascii}|{escape})*{w}")" return URI;
2524
+ U\+[0-9a-f?]{1,6}(-[0-9a-f]{1,6})? return UNICODE_RANGE;
2525
+
2526
+ \/\*[^*]*\*+([^/*][^*]*\*+)*\/ /* ignore comments */
2527
+
2528
+ . return *yytext;</pre>
2529
+
2530
+
2531
+
2532
+ <h2><a name=downlevel>11. Namespaces and down-level clients</a></h2>
2533
+
2534
+ <p>An important issue is the interaction of CSS selectors with XML
2535
+ documents in web clients that were produced prior to this
2536
+ document. Unfortunately, due to the fact that namespaces must be
2537
+ matched based on the URI which identifies the namespace, not the
2538
+ namespace prefix, some mechanism is required to identify namespaces in
2539
+ CSS by their URI as well. Without such a mechanism, it is impossible
2540
+ to construct a CSS style sheet which will properly match selectors in
2541
+ all cases against a random set of XML documents. However, given
2542
+ complete knowledge of the XML document to which a style sheet is to be
2543
+ applied, and a limited use of namespaces within the XML document, it
2544
+ is possible to construct a style sheet in which selectors would match
2545
+ elements and attributes correctly.</p>
2546
+
2547
+ <p>It should be noted that a down-level CSS client will (if it
2548
+ properly conforms to CSS forward compatible parsing rules) ignore all
2549
+ <code>@namespace</code> at-rules, as well as all style rules that make
2550
+ use of namespace qualified element type or attribute selectors. The
2551
+ syntax of delimiting namespace prefixes in CSS was deliberately chosen
2552
+ so that down-level CSS clients would ignore the style rules rather
2553
+ than possibly match them incorrectly.</p>
2554
+
2555
+ <p>The use of default namespaces in CSS makes it possible to write
2556
+ element type selectors that will function in both namespace aware CSS
2557
+ clients as well as down-level clients. It should be noted that
2558
+ down-level clients may incorrectly match selectors against XML
2559
+ elements in other namespaces.</p>
2560
+
2561
+ <p>The following are scenarios and examples in which it is possible to
2562
+ construct style sheets which would function properly in web clients
2563
+ that do not implement this proposal.</p>
2564
+
2565
+ <ol>
2566
+ <li>
2567
+
2568
+ <p>The XML document does not use namespaces.</p>
2569
+
2570
+ <ul>
2571
+
2572
+ <li>In this case, it is obviously not necessary to declare or use
2573
+ namespaces in the style sheet. Standard CSS element type and
2574
+ attribute selectors will function adequately in a down-level
2575
+ client.</li>
2576
+
2577
+ <li>In a CSS namespace aware client, the default behavior of
2578
+ element selectors matching without regard to namespace will
2579
+ function properly against all elements, since no namespaces are
2580
+ present. However, the use of specific element type selectors that
2581
+ match only elements that have no namespace ("<code>|name</code>")
2582
+ will guarantee that selectors will match only XML elements that do
2583
+ not have a declared namespace. </li>
2584
+
2585
+ </ul>
2586
+
2587
+ </li>
2588
+
2589
+ <li>
2590
+
2591
+ <p>The XML document defines a single, default namespace used
2592
+ throughout the document. No namespace prefixes are used in element
2593
+ names.</p>
2594
+
2595
+ <ul>
2596
+
2597
+ <li>In this case, a down-level client will function as if
2598
+ namespaces were not used in the XML document at all. Standard CSS
2599
+ element type and attribute selectors will match against all
2600
+ elements. </li>
2601
+
2602
+ </ul>
2603
+
2604
+ </li>
2605
+
2606
+ <li>
2607
+
2608
+ <p>The XML document does <b>not</b> use a default namespace, all
2609
+ namespace prefixes used are known to the style sheet author, and
2610
+ there is a direct mapping between namespace prefixes and namespace
2611
+ URIs. (A given prefix may only be mapped to one namespace URI
2612
+ throughout the XML document; there may be multiple prefixes mapped
2613
+ to the same URI).</p>
2614
+
2615
+ <ul>
2616
+
2617
+ <li>In this case, the down-level client will view and match
2618
+ element type and attribute selectors based on their fully
2619
+ qualified name, not the local part as outlined in the <a
2620
+ href="#typenmsp">Type selectors and Namespaces</a> section. CSS
2621
+ selectors may be declared using an escaped colon "<code>\:</code>"
2622
+ to describe the fully qualified names, e.g.
2623
+ "<code>html\:h1</code>" will match
2624
+ <code>&lt;html:h1&gt;</code>. Selectors using the qualified name
2625
+ will only match XML elements that use the same prefix. Other
2626
+ namespace prefixes used in the XML that are mapped to the same URI
2627
+ will not match as expected unless additional CSS style rules are
2628
+ declared for them.</li>
2629
+
2630
+ <li>Note that selectors declared in this fashion will
2631
+ <em>only</em> match in down-level clients. A CSS namespace aware
2632
+ client will match element type and attribute selectors based on
2633
+ the name's local part. Selectors declared with the fully
2634
+ qualified name will not match (unless there is no namespace prefix
2635
+ in the fully qualified name).</li>
2636
+
2637
+ </ul>
2638
+
2639
+ </li>
2640
+
2641
+ </ol>
2642
+
2643
+ <p>In other scenarios: when the namespace prefixes used in the XML are
2644
+ not known in advance by the style sheet author; or a combination of
2645
+ elements with no namespace are used in conjunction with elements using
2646
+ a default namespace; or the same namespace prefix is mapped to
2647
+ <em>different</em> namespace URIs within the same document, or in
2648
+ different documents; it is impossible to construct a CSS style sheet
2649
+ that will function properly against all elements in those documents,
2650
+ unless, the style sheet is written using a namespace URI syntax (as
2651
+ outlined in this document or similar) and the document is processed by
2652
+ a CSS and XML namespace aware client.</p>
2653
+
2654
+ <h2><a name=profiling>12. Profiles</a></h2>
2655
+
2656
+ <p>Each specification using Selectors must define the subset of W3C
2657
+ Selectors it allows and excludes, and describe the local meaning of
2658
+ all the components of that subset.</p>
2659
+
2660
+ <p>Non normative examples:
2661
+
2662
+ <div class="profile">
2663
+ <table class="tprofile">
2664
+ <tbody>
2665
+ <tr>
2666
+ <th class="title" colspan=2>Selectors profile</th></tr>
2667
+ <tr>
2668
+ <th>Specification</th>
2669
+ <td>CSS level 1</td></tr>
2670
+ <tr>
2671
+ <th>Accepts</th>
2672
+ <td>type selectors<br>class selectors<br>ID selectors<br>:link,
2673
+ :visited and :active pseudo-classes<br>descendant combinator
2674
+ <br>::first-line and ::first-letter pseudo-elements</td></tr>
2675
+ <tr>
2676
+ <th>Excludes</th>
2677
+ <td>
2678
+
2679
+ <p>universal selector<br>attribute selectors<br>:hover and :focus
2680
+ pseudo-classes<br>:target pseudo-class<br>:lang() pseudo-class<br>all UI
2681
+ element states pseudo-classes<br>all structural
2682
+ pseudo-classes<br>negation pseudo-class<br>all
2683
+ UI element fragments pseudo-elements<br>::before and ::after
2684
+ pseudo-elements<br>child combinators<br>sibling combinators
2685
+
2686
+ <p>namespaces</td></tr>
2687
+ <tr>
2688
+ <th>Extra constraints</th>
2689
+ <td>only one class selector allowed per sequence of simple
2690
+ selectors</td></tr></tbody></table><br><br>
2691
+ <table class="tprofile">
2692
+ <tbody>
2693
+ <tr>
2694
+ <th class="title" colspan=2>Selectors profile</th></tr>
2695
+ <tr>
2696
+ <th>Specification</th>
2697
+ <td>CSS level 2</td></tr>
2698
+ <tr>
2699
+ <th>Accepts</th>
2700
+ <td>type selectors<br>universal selector<br>attribute presence and
2701
+ values selectors<br>class selectors<br>ID selectors<br>:link, :visited,
2702
+ :active, :hover, :focus, :lang() and :first-child pseudo-classes
2703
+ <br>descendant combinator<br>child combinator<br>adjacent sibling
2704
+ combinator<br>::first-line and ::first-letter pseudo-elements<br>::before
2705
+ and ::after pseudo-elements</td></tr>
2706
+ <tr>
2707
+ <th>Excludes</th>
2708
+ <td>
2709
+
2710
+ <p>content selectors<br>substring matching attribute
2711
+ selectors<br>:target pseudo-classes<br>all UI element
2712
+ states pseudo-classes<br>all structural pseudo-classes other
2713
+ than :first-child<br>negation pseudo-class<br>all UI element
2714
+ fragments pseudo-elements<br>general sibling combinators
2715
+
2716
+ <p>namespaces</td></tr>
2717
+ <tr>
2718
+ <th>Extra constraints</th>
2719
+ <td>more than one class selector per sequence of simple selectors (CSS1
2720
+ constraint) allowed</td></tr></tbody></table>
2721
+
2722
+ <p>In CSS, selectors express pattern matching rules that determine which style
2723
+ rules apply to elements in the document tree.
2724
+
2725
+ <p>The following selector (CSS level 2) will <b>match</b> all anchors <code>a</code>
2726
+ with attribute <code>name</code> set inside a section 1 header <code>h1</code>:
2727
+ <pre>h1 a[name]</pre>
2728
+
2729
+ <p>All CSS declarations attached to such a selector are applied to elements
2730
+ matching it. </div>
2731
+
2732
+ <div class="profile">
2733
+ <table class="tprofile">
2734
+ <tbody>
2735
+ <tr>
2736
+ <th class="title" colspan=2>Selectors profile</th></tr>
2737
+ <tr>
2738
+ <th>Specification</th>
2739
+ <td>STTS 3</td>
2740
+ </tr>
2741
+ <tr>
2742
+ <th>Accepts</th>
2743
+ <td>
2744
+
2745
+ <p>type selectors<br>universal selectors<br>attribute selectors<br>class
2746
+ selectors<br>ID selectors<br>all structural pseudo-classes<br>
2747
+ all combinators
2748
+
2749
+ <p>namespaces</td></tr>
2750
+ <tr>
2751
+ <th>Excludes</th>
2752
+ <td>non-accepted pseudo-classes<br>pseudo-elements<br></td></tr>
2753
+ <tr>
2754
+ <th>Extra constraints</th>
2755
+ <td>some selectors and combinators are not allowed in fragment
2756
+ descriptions on the right side of STTS declarations.</td></tr></tbody></table>
2757
+
2758
+ <p>Selectors can be used in STTS 3 in two different
2759
+ manners:
2760
+ <ol>
2761
+ <li>a selection mechanism equivalent to CSS selection mechanism: declarations
2762
+ attached to a given selector are applied to elements matching that selector,
2763
+ <li>fragment descriptions that appear on the right side of declarations.
2764
+ </li></ol></div>
2765
+
2766
+ <h2><a name=Conformance></a>13. Conformance and requirements</h2>
2767
+
2768
+ <p>This section defines conformance with the present specification only.
2769
+
2770
+ <p>The inability of a user agent to implement part of this specification due to
2771
+ the limitations of a particular device (e.g., non interactive user agents will
2772
+ probably not implement dynamic pseudo-classes because they make no sense without
2773
+ interactivity) does not imply non-conformance.
2774
+
2775
+ <p>All specifications reusing Selectors must contain a <a
2776
+ href="#profiling">Profile</a> listing the
2777
+ subset of Selectors it accepts or excludes, and describing the constraints
2778
+ it adds to the current specification.
2779
+
2780
+ <p>Invalidity is caused by a parsing error, e.g. an unrecognized token or a token
2781
+ which is not allowed at the current parsing point.
2782
+
2783
+ <p>User agents must observe the rules for handling parsing errors:
2784
+ <ul>
2785
+ <li>a simple selector containing an undeclared namespace prefix is invalid</li>
2786
+ <li>a selector containing an invalid simple selector, an invalid combinator
2787
+ or an invalid token is invalid. </li>
2788
+ <li>a group of selectors containing an invalid selector is invalid.</li>
2789
+ </ul>
2790
+
2791
+ <p>Specifications reusing Selectors must define how to handle parsing
2792
+ errors. (In the case of CSS, the entire rule in which the selector is
2793
+ used is dropped.)</p>
2794
+
2795
+ <!-- Apparently all these references are out of date:
2796
+ <p>Implementations of this specification must behave as
2797
+ "recipients of text data" as defined by <a href="#refsCWWW">[CWWW]</a>
2798
+ when parsing selectors and attempting matches. (In particular,
2799
+ implementations must assume the data is normalized and must not
2800
+ normalize it.) Normative rules for matching strings are defined in
2801
+ <a href="#refsCWWW">[CWWW]</a> and <a
2802
+ href="#refsUNICODE">[UNICODE]</a> and apply to implementations of this
2803
+ specification.</p>-->
2804
+
2805
+ <h2><a name=Tests></a>14. Tests</h2>
2806
+
2807
+ <p>This specification has <a
2808
+ href="http://www.w3.org/Style/CSS/Test/CSS3/Selectors/current/">a test
2809
+ suite</a> allowing user agents to verify their basic conformance to
2810
+ the specification. This test suite does not pretend to be exhaustive
2811
+ and does not cover all possible combined cases of Selectors.</p>
2812
+
2813
+ <h2><a name=ACKS></a>15. Acknowledgements</h2>
2814
+
2815
+ <p>The CSS working group would like to thank everyone who has sent
2816
+ comments on this specification over the years.</p>
2817
+
2818
+ <p>The working group would like to extend special thanks to Donna
2819
+ McManus, Justin Baker, Joel Sklar, and Molly Ives Brower who perfermed
2820
+ the final editorial review.</p>
2821
+
2822
+ <h2><a name=references>16. References</a></h2>
2823
+
2824
+ <dl class="refs">
2825
+
2826
+ <dt>[CSS1]
2827
+ <dd><a name=refsCSS1></a> Bert Bos, H&aring;kon Wium Lie; "<cite>Cascading Style Sheets, level 1</cite>", W3C Recommendation, 17 Dec 1996, revised 11 Jan 1999
2828
+ <dd>(<code><a href="http://www.w3.org/TR/REC-CSS1">http://www.w3.org/TR/REC-CSS1</a></code>)
2829
+
2830
+ <dt>[CSS21]
2831
+ <dd><a name=refsCSS21></a> Bert Bos, Tantek &Ccedil;elik, Ian Hickson, H&aring;kon Wium Lie, editors; "<cite>Cascading Style Sheets, level 2 revision 1</cite>", W3C Working Draft, 13 June 2005
2832
+ <dd>(<code><a href="http://www.w3.org/TR/CSS21">http://www.w3.org/TR/CSS21</a></code>)
2833
+
2834
+ <dt>[CWWW]
2835
+ <dd><a name=refsCWWW></a> Martin J. D&uuml;rst, Fran&ccedil;ois Yergeau, Misha Wolf, Asmus Freytag, Tex Texin, editors; "<cite>Character Model for the World Wide Web</cite>", W3C Recommendation, 15 February 2005
2836
+ <dd>(<code><a href="http://www.w3.org/TR/charmod/">http://www.w3.org/TR/charmod/</a></code>)
2837
+
2838
+ <dt>[FLEX]
2839
+ <dd><a name="refsFLEX"></a> "<cite>Flex: The Lexical Scanner Generator</cite>", Version 2.3.7, ISBN 1882114213
2840
+
2841
+ <dt>[HTML4]
2842
+ <dd><a name="refsHTML4"></a> Dave Ragget, Arnaud Le Hors, Ian Jacobs, editors; "<cite>HTML 4.01 Specification</cite>", W3C Recommendation, 24 December 1999
2843
+ <dd>(<a href="http://www.w3.org/TR/html4/"><code>http://www.w3.org/TR/html4/</code></a>)
2844
+
2845
+ <dt>[MATH]
2846
+ <dd><a name="refsMATH"></a> Patrick Ion, Robert Miner, editors; "<cite>Mathematical Markup Language (MathML) 1.01</cite>", W3C Recommendation, revision of 7 July 1999
2847
+ <dd>(<code><a href="http://www.w3.org/TR/REC-MathML/">http://www.w3.org/TR/REC-MathML/</a></code>)
2848
+
2849
+ <dt>[RFC3066]
2850
+ <dd><a name="refsRFC3066"></a> H. Alvestrand; "<cite>Tags for the Identification of Languages</cite>", Request for Comments 3066, January 2001
2851
+ <dd>(<a href="http://www.ietf.org/rfc/rfc3066.txt"><code>http://www.ietf.org/rfc/rfc3066.txt</code></a>)
2852
+
2853
+ <dt>[STTS]
2854
+ <dd><a name=refsSTTS></a> Daniel Glazman; "<cite>Simple Tree Transformation Sheets 3</cite>", Electricit&eacute; de France, submission to the W3C, 11 November 1998
2855
+ <dd>(<code><a href="http://www.w3.org/TR/NOTE-STTS3">http://www.w3.org/TR/NOTE-STTS3</a></code>)
2856
+
2857
+ <dt>[SVG]
2858
+ <dd><a name="refsSVG"></a> Jon Ferraiolo, &#34276;&#27810; &#28147;, Dean Jackson, editors; "<cite>Scalable Vector Graphics (SVG) 1.1 Specification</cite>", W3C Recommendation, 14 January 2003
2859
+ <dd>(<code><a href="http://www.w3.org/TR/SVG/">http://www.w3.org/TR/SVG/</a></code>)
2860
+
2861
+ <dt>[UNICODE]</dt>
2862
+ <dd><a name="refsUNICODE"></a> <cite><a
2863
+ href="http://www.unicode.org/versions/Unicode4.1.0/">The Unicode Standard, Version 4.1</a></cite>, The Unicode Consortium. Boston, MA, Addison-Wesley, March 2005. ISBN 0-321-18578-1, as amended by <a href="http://www.unicode.org/versions/Unicode4.0.1/">Unicode 4.0.1</a> and <a href="http://www.unicode.org/versions/Unicode4.1.0/">Unicode 4.1.0</a>.
2864
+ <dd>(<code><a href="http://www.unicode.org/versions/">http://www.unicode.org/versions/</a></code>)</dd>
2865
+
2866
+ <dt>[XML10]
2867
+ <dd><a name="refsXML10"></a> Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, Eve Maler, Fran&ccedil;ois Yergeau, editors; "<cite>Extensible Markup Language (XML) 1.0 (Third Edition)</cite>", W3C Recommendation, 4 February 2004
2868
+ <dd>(<a href="http://www.w3.org/TR/REC-xml/"><code>http://www.w3.org/TR/REC-xml/</code></a>)
2869
+
2870
+ <dt>[XMLNAMES]
2871
+ <dd><a name="refsXMLNAMES"></a> Tim Bray, Dave Hollander, Andrew Layman, editors; "<cite>Namespaces in XML</cite>", W3C Recommendation, 14 January 1999
2872
+ <dd>(<a href="http://www.w3.org/TR/REC-xml-names/"><code>http://www.w3.org/TR/REC-xml-names/</code></a>)
2873
+
2874
+ <dt>[YACC]
2875
+ <dd><a name="refsYACC"></a> S. C. Johnson; "<cite>YACC &mdash; Yet another compiler compiler</cite>", Technical Report, Murray Hill, 1975
2876
+
2877
+ </dl>
2878
+
2879
+ <div class="wrapper">
2880
+ <a href="#" class="inner">test</a>
2881
+ </div>
2882
+ <div>
2883
+ <div class="wrapper">
2884
+ <a href="#" class="inner">test</a>
2885
+ <div class="wrapper">
2886
+ <a href="#" class="inner">test</a>
2887
+ </div>
2888
+ <div>
2889
+ <div class="wrapper">
2890
+ <a href="#" class="inner">test</a>
2891
+ </div>
2892
+ </div>
2893
+ </div>
2894
+ </div>
2895
+
2896
+ <div>
2897
+ <i class="nest a1">d1<b class="flatInNest a1">d1</b>
2898
+ <b class="nest a2">d2<i class="flatInNest a2">d2</i>
2899
+ <i class="nest a3">d3<b class="flatInNest a3">d3</b>
2900
+ <b class="nest a4">d4<i class="flatInNest a4">d4</i>
2901
+ <i class="nest a5">d5<b class="flatInNest a5">d5</b>
2902
+ <b class="nest a6">d6<i class="flatInNest a6">d6</i>
2903
+ </b>
2904
+ </i>
2905
+ </b>
2906
+ </i>
2907
+ </b>
2908
+ </i>
2909
+ </div>
2910
+ <div>
2911
+ <b class="flatOut a1">d1
2912
+ <b class="flatInOut a1">d1</b>
2913
+ </b>
2914
+ <i class="flatOut a2">d2
2915
+ <i class="flatInOut a2">d2</i>
2916
+ </i>
2917
+ <b class="flatOut a3">d3
2918
+ <b class="flatInOut a3">d3</b>
2919
+ </b>
2920
+ <i class="flatOut a4">d4
2921
+ <i class="flatInOut a4">d4</i>
2922
+ </i>
2923
+ <b class="flatOut a5">d5
2924
+ <b class="flatInOut a5">d5</b>
2925
+ </b>
2926
+ <i class="flatOut a6">d6
2927
+ <i class="flatInOut a6">d6</i>
2928
+ </i>
2929
+ </div>
2930
+
2931
+ </body>
2932
+ </html>