Styles
This commit is contained in:
parent
aa16d5821f
commit
d4ea9b9473
|
@ -95,7 +95,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
background: #fcfcfc;
|
background: #fafafa;
|
||||||
border-bottom: solid 1px #eef3fa;
|
border-bottom: solid 1px #eef3fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,13 +128,17 @@ pre {
|
||||||
background: #fcfcfc;
|
background: #fcfcfc;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border-top: 0;
|
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 > th,
|
||||||
table.greycode thead:first-child > tr:first-child > td,
|
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 > 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;
|
border-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
xpath.md
17
xpath.md
|
@ -58,6 +58,14 @@ layout: default
|
||||||
| `h1 ~ #id` | `//h1/following-sibling::[@id="id"]` | |
|
| `h1 ~ #id` | `//h1/following-sibling::[@id="id"]` | |
|
||||||
{:.greycode.no-head}
|
{:.greycode.no-head}
|
||||||
|
|
||||||
|
|
||||||
|
### Negation
|
||||||
|
|
||||||
|
| CSS | Xpath | ? |
|
||||||
|
| --- | --- | --: |
|
||||||
|
| `h1:not([id])` | `//h1[not(@id)]` | [?](#boolean-functions) |
|
||||||
|
{:.greycode.no-head}
|
||||||
|
|
||||||
### jQuery
|
### jQuery
|
||||||
|
|
||||||
| jQuery | Xpath | ? |
|
| jQuery | Xpath | ? |
|
||||||
|
@ -78,6 +86,8 @@ layout: default
|
||||||
| Arithmetic | `//product[@price > 2.50]` | |
|
| Arithmetic | `//product[@price > 2.50]` | |
|
||||||
| Has children | `//ul[*]` | |
|
| Has children | `//ul[*]` | |
|
||||||
| Has children (specific) | `//ul[li]` | |
|
| Has children (specific) | `//ul[li]` | |
|
||||||
|
| Or logic | `//a[@name or @href]` | [?](#operators) |
|
||||||
|
| Union (joins results) | `//a | //div` | [?](#unions) |
|
||||||
{:.greycode.no-head}
|
{:.greycode.no-head}
|
||||||
|
|
||||||
### Class check
|
### Class check
|
||||||
|
@ -326,6 +336,13 @@ There are other axes you can use.
|
||||||
| `preceding-sibling` | | |
|
| `preceding-sibling` | | |
|
||||||
{:.greycode}
|
{:.greycode}
|
||||||
|
|
||||||
|
### Unions
|
||||||
|
Use `|` to join two expressions.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
//a | //span
|
||||||
|
```
|
||||||
|
|
||||||
More examples
|
More examples
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue