lsd_rails 0.1

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