From d4ea9b9473c7c771c1c10b472da9b32c579666db Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Fri, 17 Apr 2015 16:06:52 +0800 Subject: [PATCH] Styles --- assets/style.css | 10 +++++++--- xpath.md | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/assets/style.css b/assets/style.css index 31bad0969..5165d0213 100644 --- a/assets/style.css +++ b/assets/style.css @@ -95,7 +95,7 @@ } pre { - background: #fcfcfc; + background: #fafafa; border-bottom: solid 1px #eef3fa; } @@ -128,13 +128,17 @@ pre { background: #fcfcfc; border-radius: 4px; border-top: 0; - border-bottom: solid 1px #eef3fa; + border-bottom: solid 1px #c7d7ee; } table.greycode thead:first-child > tr:first-child > th, table.greycode thead:first-child > tr:first-child > td, table.greycode tbody:first-child > tr:first-child > th, - table.greycode tbody:first-child > tr:first-child > td { + table.greycode tbody:first-child > tr:first-child > td, + table.greycode.no-head thead:nth-child(2) > tr:first-child > th, + table.greycode.no-head thead:nth-child(2) > tr:first-child > td, + table.greycode.no-head tbody:nth-child(2) > tr:first-child > th, + table.greycode.no-head tbody:nth-child(2) > tr:first-child > td { border-top: 0; } diff --git a/xpath.md b/xpath.md index cc730c73f..14c5bd2b5 100644 --- a/xpath.md +++ b/xpath.md @@ -58,6 +58,14 @@ layout: default | `h1 ~ #id` | `//h1/following-sibling::[@id="id"]` | | {:.greycode.no-head} + +### Negation + +| CSS | Xpath | ? | +| --- | --- | --: | +| `h1:not([id])` | `//h1[not(@id)]` | [?](#boolean-functions) | +{:.greycode.no-head} + ### jQuery | jQuery | Xpath | ? | @@ -78,6 +86,8 @@ layout: default | Arithmetic | `//product[@price > 2.50]` | | | Has children | `//ul[*]` | | | Has children (specific) | `//ul[li]` | | +| Or logic | `//a[@name or @href]` | [?](#operators) | +| Union (joins results) | `//a | //div` | [?](#unions) | {:.greycode.no-head} ### Class check @@ -326,6 +336,13 @@ There are other axes you can use. | `preceding-sibling` | | | {:.greycode} +### Unions +Use `|` to join two expressions. + +```sh +//a | //span +``` + More examples -------------