Skip to content

Commit 05086ef

Browse files
committed
Update document theme
1 parent a9dc21a commit 05086ef

File tree

7 files changed

+72
-93
lines changed

7 files changed

+72
-93
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,23 @@
11
<style>
2-
html {
3-
--svg-beaker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' id='beaker'%3E%3Cpath d='M3,3V5A2,2 0 0,1 5,7V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V7A2,2 0 0,1 21,5V3H3M7,9H10V10H7V9M7,11H10V12H7V11M10,16H7V15H10V16M12,14H7V13H12V14M12,8H7V7H12V8Z' /%3E%3C/svg%3E");
4-
--svg-html5: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z'/%3E%3C/svg%3E");
5-
--svg-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' id='star'%3E%3Cpath d='M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z' /%3E%3C/svg%3E");
6-
}
7-
span.lab::after,
8-
span.html5::after,
9-
span.star::after {
10-
position: relative;
11-
display: inline-block;
12-
width: 1em;
13-
height: 1em;
14-
padding-right: 1em;
15-
background-size: 1em;
16-
-webkit-mask-repeat: no-repeat;
17-
mask-repeat: no-repeat;
18-
content: "\a0";
19-
}
20-
21-
span.big-icon::after {
22-
width: 3em;
23-
height: 3em;
24-
background-size: 3em;
2+
.twemoji.big-icon svg {
3+
max-height: initial !important;
4+
width: 3rem !important;
255
}
266

27-
.badge {
28-
float: right;
7+
.twemoji[data-md-color-primary] {
8+
color: var(--md-primary-fg-color);
299
}
3010

31-
span.lab::after {
32-
background-color: hsl(265, 89%, 78%);
33-
-webkit-mask-image: var(--svg-beaker);
34-
mask-image: var(--svg-beaker);
11+
.twemoji.icon:hover {
12+
cursor: pointer;
3513
}
3614

37-
span.html5::after {
38-
background-color: hsl(31, 100%, 71%);
39-
-webkit-mask-image: var(--svg-html5);
40-
mask-image: var(--svg-html5);
15+
.twemoji.icon svg{
16+
transition: all 0.5s ease;
4117
}
4218

43-
span.star::after {
44-
background-color: hsl(135, 94%, 65%);
45-
-webkit-mask-image: var(--svg-star);
46-
mask-image: var(--svg-star);
19+
.twemoji.icon:hover svg {
20+
transform: scale(1.2);
21+
translateY(10%);
4722
}
4823
</style>

docs/src/markdown/selectors/basic.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ contains whitespace or special characters, you should quote them with either sin
377377
[<a href="http://example.com">Example link</a>, <a href="http://example.org">Example org link</a>]
378378
```
379379

380-
`[attribute!=value]`<span class="star badge"></span>
380+
`[attribute!=value]`:material-star:{: title="Custom" data-md-color-primary="green" .icon}
381381
:
382382
Equivalent to `#!css :not([attribute=value])`.
383383

@@ -408,7 +408,7 @@ contains whitespace or special characters, you should quote them with either sin
408408
[<a href="http://example.com">Example link</a>, <a href="#InSensitive">Insensitive internal link</a>, <a href="http://example.org">Example org link</a>]
409409
```
410410

411-
`[attribute operator value i]`<span class="lab badge"></span>
411+
`[attribute operator value i]`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
412412
:
413413
Represents elements with an attribute named **attribute** and whose value, when the **operator** is applied, matches
414414
**value** *without* case sensitivity. In general, attribute comparison is insensitive in normal HTML, but not XML.
@@ -441,7 +441,7 @@ contains whitespace or special characters, you should quote them with either sin
441441
[<a href="#internal">Internal link</a>]
442442
```
443443

444-
`[attribute operator value s]` <span class="lab badge"></span>
444+
`[attribute operator value s]` :material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
445445
:
446446
Represents elements with an attribute named **attribute** and whose value, when the **operator** is applied, matches
447447
**value** *with* case sensitivity.

docs/src/markdown/selectors/index.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# General Details
22

3-
43
## Implementation Specifics
54

65
The CSS selectors are based off of the CSS specification and includes not only stable selectors, but may also include
@@ -29,30 +28,34 @@ any are found.
2928
<table markdown="1">
3029
<tr>
3130
<th>Symbol</th>
31+
<th>Name</th>
3232
<th>Description</th>
3333
</tr>
3434
<tr markdown="1">
35-
<td><span class="html5 big-icon"></span></td>
35+
<td>:material-language-html5:{: data-md-color-primary="orange" .big-icon}</td>
36+
<td>HTML</td>
3637
<td markdown="1">
3738
Some selectors are very specific to HTML and either have no meaningful representation in XML, or such functionality has
38-
not been implemented. Selectors that are HTML only will be noted with <span class="html5"></span>,
39+
not been implemented. Selectors that are HTML only will be noted with :material-language-html5:{: data-md-color-primary="orange"},
3940
and will match nothing if used in XML.
4041
</td>
4142
</tr>
4243
<tr markdown="1">
43-
<td><span class="star big-icon"></span></td>
44+
<td>:material-star:{: data-md-color-primary="green" .big-icon}</td>
45+
<td>Custom</td>
4446
<td markdown="1">
4547
Soup Sieve has implemented a couple non-standard selectors. These can contain useful selectors that were rejected
4648
from the official CSS specifications, selectors implemented by other systems such as JQuery, or even selectors
4749
specifically created for Soup Sieve. If a selector is considered non standard, it will be marked with
48-
<span class="star"></span>.
50+
:material-star:{: title="Custom" data-md-color-primary="green"}.
4951
</td>
5052
</tr>
5153
<tr markdown="1">
52-
<td><span class="lab big-icon"></span></td>
54+
<td>:material-flask:{: title="Experimental" data-md-color-primary="purple" .big-icon}</td>
55+
<td>Experimental</td>
5356
<td markdown="1">
5457
All selectors that are from the current working draft of CSS4 are considered experimental and are marked with
55-
<span class="lab"></span>. Additionally, if there are other immature selectors, they may be marked as experimental as
58+
:material-flask:{: title="Experimental" data-md-color-primary="purple"}. Additionally, if there are other immature selectors, they may be marked as experimental as
5659
well. Experimental may mean we are not entirely sure if our implementation is correct, that things may still be in flux
5760
as they are part of a working draft, or even both.
5861

docs/src/markdown/selectors/pseudo-classes.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ not being in a live, browser environment. Pseudo classes that cannot be implemen
88
non-applicable either are under consideration, have not yet been evaluated, or are too new and viewed as a risk to
99
implement as they might not stick around.
1010

11-
## `:any-link`<span class="html5 badge"></span><span class="lab badge"></span> {:#:any-link}
11+
## `:any-link`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:any-link}
1212

1313
Selects every `#!html <a>`, `#!html <area>`, or `#!html <link>` element that has an `href` attribute, independent of
1414
whether it has been visited.
@@ -37,7 +37,7 @@ whether it has been visited.
3737
!!! tip "Additional Reading"
3838
https://developer.mozilla.org/en-US/docs/Web/CSS/:any-link
3939

40-
## `:checked`<span class="html5 badge"></span> {:#:checked}
40+
## `:checked`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon} {:#:checked}
4141

4242
Selects any `#!html <input type="radio"/>`, `#!html <input type="checkbox"/>`, or `#!html <option>` element (in a
4343
`#!html <select>` element) that is checked or toggled to an on state.
@@ -80,7 +80,7 @@ Selects any `#!html <input type="radio"/>`, `#!html <input type="checkbox"/>`, o
8080
!!! tip "Additional Reading"
8181
https://developer.mozilla.org/en-US/docs/Web/CSS/:checked
8282

83-
## `:contains()`<span class="star badge"></span> {:#:contains}
83+
## `:contains()`:material-star:{: title="Custom" data-md-color-primary="green" .icon} {:#:contains}
8484

8585
Selects elements that contain the provided text. Text can be found in either itself, or its descendants.
8686

@@ -116,7 +116,7 @@ in the comma separated list to be considered matching.
116116
[<div>Here is <span>some text</span>.</div>]
117117
```
118118

119-
## `:default`<span class="html5 badge"></span><span class="lab badge"></span> {:#:default}
119+
## `:default`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:default}
120120

121121
Selects any form element that is the default among a group of related elements, including: `#!html <button>`,
122122
`#!html <input type="checkbox">`, `#!html <input type="radio">`, `#!html <option>` elements.
@@ -168,7 +168,7 @@ Selects any form element that is the default among a group of related elements,
168168
!!! tip "Additional Reading"
169169
https://developer.mozilla.org/en-US/docs/Web/CSS/:default
170170

171-
## `:defined`<span class="html5 badge"></span></span><span class="lab badge"></span> {:#:defined}
171+
## `:defined`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}</span>:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:defined}
172172

173173
In a browser environment, this represents *defined* elements (names without hyphens) and custom elements (names with
174174
hyphens) that have been properly added to the custom element registry. Since elements cannot be added to a custom
@@ -200,7 +200,7 @@ specific selector, so it doesn't apply to XML.
200200
!!! tip "Additional Reading"
201201
https://developer.mozilla.org/en-US/docs/Web/CSS/:defined
202202

203-
## `:dir()`<span class="html5 badge"></span><span class="lab badge"></span> {:#:dir}
203+
## `:dir()`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:dir}
204204

205205
Selects elements based on text directionality. Accepts either `ltr` or `rtl` for "left to right" and "right to left"
206206
respectively.
@@ -232,7 +232,7 @@ respectively.
232232
!!! tip "Additional Reading"
233233
https://developer.mozilla.org/en-US/docs/Web/CSS/:dir
234234

235-
## `:disabled`<span class="html5 badge"></span> {:#:disabled}
235+
## `:disabled`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon} {:#:disabled}
236236

237237
Selects any element that is disabled.
238238

@@ -277,7 +277,7 @@ Selects any element that is disabled.
277277
!!! tip "Additional Reading"
278278
https://developer.mozilla.org/en-US/docs/Web/CSS/:disabled
279279

280-
## `:empty`<span class="lab badge"></span> {:#:empty}
280+
## `:empty`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:empty}
281281

282282
Selects elements that have no children and no text (whitespace is ignored).
283283

@@ -307,7 +307,7 @@ Selects elements that have no children and no text (whitespace is ignored).
307307
!!! tip "Additional Reading"
308308
https://developer.mozilla.org/en-US/docs/Web/CSS/:empty
309309

310-
## `:enabled`<span class="html5 badge"></span> {:#:enabled}
310+
## `:enabled`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon} {:#:enabled}
311311

312312
Selects any element that is enabled.
313313

@@ -424,7 +424,7 @@ Selects the first child of a given type in a group of sibling elements.
424424
!!! tip "Additional Reading"
425425
https://developer.mozilla.org/en-US/docs/Web/CSS/:first-of-type
426426

427-
## `:has()`<span class="lab badge"></span> {:#has}
427+
## `:has()`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#has}
428428

429429
Selects an element if any of the relative selectors passed as parameters (which are relative to the `:scope` of the
430430
given element), match at least one element.
@@ -461,7 +461,7 @@ are planned for level 5 CSS selectors. Soup Sieve supports [complex](#complex-se
461461
!!! tip "Additional Reading"
462462
https://developer.mozilla.org/en-US/docs/Web/CSS/:has
463463

464-
## `:in-range`<span class="html5 badge"></span><span class="lab badge"></span> {:#:in-range}
464+
## `:in-range`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:in-range}
465465

466466
Selects all `#!html <input>` elements whose values are in range according to their `type`, `min`, and `max` attributes.
467467

@@ -490,7 +490,7 @@ Selects all `#!html <input>` elements whose values are in range according to the
490490
!!! tip "Additional Reading"
491491
https://developer.mozilla.org/en-US/docs/Web/CSS/:in-range
492492

493-
## `:indeterminate`<span class="html5 badge"></span><span class="lab badge"></span> {:#:indeterminate}
493+
## `:indeterminate`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:indeterminate}
494494

495495
Selects all form elements whose are in an indeterminate state.
496496

@@ -550,7 +550,7 @@ selected.
550550
!!! tip "Additional Reading"
551551
https://developer.mozilla.org/en-US/docs/Web/CSS/:indeterminate
552552

553-
## `:is()`<span class="lab badge"></span> {:#:is}
553+
## `:is()`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:is}
554554

555555
Selects an element, but only if it matches at least one selector in the selector list.
556556

@@ -629,7 +629,7 @@ Level 3 CSS
629629
[<p id="1"></p>, <p id="2"></p>, <p id="3"></p>, <p id="4"></p>, <p id="5"></p>, <p id="6" lang="de-DE"></p>]
630630
```
631631

632-
Level 4 CSS<span class="lab badge"></span>
632+
Level 4 CSS:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
633633
:
634634
The level 4 CSS specifications adds the ability to define multiple language tags using a comma separated list. The
635635
specifications also allow for BCP 47 language ranges as described in [RFC4647](https://tools.ietf.org/html/rfc4647)
@@ -750,7 +750,7 @@ Selects the last child of a given type in a group of sibling elements.
750750
!!! tip "Additional Reading"
751751
https://developer.mozilla.org/en-US/docs/Web/CSS/:last-of-type
752752

753-
## `:link`<span class="html5 badge"></span> {:#:link}
753+
## `:link`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon} {:#:link}
754754

755755
Selects a link (every `#!html <a>`, `#!html <link>`, and `#!html <area>` element with an `href` attribute) that has not
756756
yet been visited.
@@ -811,7 +811,7 @@ Level 3 CSS
811811
[<div>Here is some text.</div>]
812812
```
813813

814-
Level 4+ CSS<span class="lab badge"></span>
814+
Level 4+ CSS:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
815815
:
816816
Selects all elements that do not match any of the selectors in the selector list. While the level 4 specifications
817817
state that [compound](#compound-selector) selectors are supported, some browsers (Safari) support complex selectors
@@ -890,7 +890,7 @@ Level 3 CSS
890890
[<p id="0"></p>, <p id="1"></p>, <p id="2"></p>]
891891
```
892892

893-
Level 4+ CSS<span class="lab badge"></span>
893+
Level 4+ CSS:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
894894
:
895895
Level 4 CSS adds the additional pattern in the form `an+b of S` where `S` represents a selector list. `an+b` can
896896
also be substituted with `even` or `odd`.
@@ -984,7 +984,7 @@ Level 3 CSS
984984
[<p id="3"></p>, <p id="4"></p>, <p id="5"></p>]
985985
```
986986

987-
Level 4+ CSS<span class="lab badge"></span>
987+
Level 4+ CSS:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon}
988988
:
989989
Level 4 CSS adds the additional pattern in the form `an+b of S` where `S` represents a selector list. `an+b` can
990990
also be substituted with `even` or `odd`.
@@ -1215,7 +1215,7 @@ Selects element without any siblings that matches a given type.
12151215
!!! tip "Additional Reading"
12161216
https://developer.mozilla.org/en-US/docs/Web/CSS/:only-of-type
12171217

1218-
## `:optional`<span class="html5 badge"></span><span class="lab badge"></span> {:#:optional}
1218+
## `:optional`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:optional}
12191219

12201220
Selects any `#!html <input>`, `#!html <select>`, or `#!html <textarea>` element that does not have the `required`
12211221
attribute set on it.
@@ -1252,7 +1252,7 @@ attribute set on it.
12521252
!!! tip "Additional Reading"
12531253
https://developer.mozilla.org/en-US/docs/Web/CSS/:optional
12541254

1255-
## `:out-of-range`<span class="html5 badge"></span><span class="lab badge"></span> {:#:out-of-range}
1255+
## `:out-of-range`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:out-of-range}
12561256

12571257
Selects all `#!html <input>` elements whose values are out of range according to their `type`, `min`, and `max`
12581258
attributes.
@@ -1282,7 +1282,7 @@ attributes.
12821282
!!! tip "Additional Reading"
12831283
https://developer.mozilla.org/en-US/docs/Web/CSS/:out-of-range
12841284

1285-
## `:placeholder-shown`<span class="html5 badge"></span><span class="lab badge"></span> {:#:placeholder-shown}
1285+
## `:placeholder-shown`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:placeholder-shown}
12861286

12871287
Selects any `#!html <input>` or `#!html <textarea>` element that is currently displaying placeholder text via the
12881288
`placeholder` attribute.
@@ -1323,7 +1323,7 @@ Selects any `#!html <input>` or `#!html <textarea>` element that is currently di
13231323
!!! tip "Additional Reading"
13241324
https://developer.mozilla.org/en-US/docs/Web/CSS/:placeholder-shown
13251325

1326-
## `:read-only`<span class="html5 badge"></span><span class="lab badge"></span> {:#:read-only}
1326+
## `:read-only`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:read-only}
13271327

13281328
Selects elements (such as `#!html <input>` or `#!html <textarea>`) that are *not* editable by the user. This does not
13291329
just apply to form elements with `readonly` set, but it applies to **any** element that cannot be edited by the user.
@@ -1361,7 +1361,7 @@ just apply to form elements with `readonly` set, but it applies to **any** eleme
13611361
!!! tip "Additional Reading"
13621362
https://developer.mozilla.org/en-US/docs/Web/CSS/:read-only
13631363

1364-
## `:read-write`<span class="html5 badge"></span><span class="lab badge"></span> {:#:read-write}
1364+
## `:read-write`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:read-write}
13651365

13661366
Selects elements (such as `#!html <input>` or `#!html <textarea>`) that are editable by the user. This does not just
13671367
apply to form elements as it applies to **any** element that can be edited by the user, such as a `#!html <p>` element
@@ -1400,7 +1400,7 @@ with `contenteditable` set on it.
14001400
!!! tip "Additional Reading"
14011401
https://developer.mozilla.org/en-US/docs/Web/CSS/:read-write
14021402

1403-
## `:required`<span class="html5 badge"></span><span class="lab badge"></span> {:#:required}
1403+
## `:required`:material-language-html5:{: title="HTML" data-md-color-primary="orange" .icon}:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:required}
14041404

14051405
Selects any `#!html <input>`, `#!html <select>`, or `#!html <textarea>` element that has the `required` attribute set on
14061406
it.
@@ -1474,7 +1474,7 @@ Selects the root element of a document tree.
14741474
!!! tip "Additional Reading"
14751475
https://developer.mozilla.org/en-US/docs/Web/CSS/:root
14761476

1477-
## `:scope`<span class="lab badge"></span> {:#:scope}
1477+
## `:scope`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:scope}
14781478

14791479
`:scope` represents the the element a `match`, `select`, or `filter` is being called on. If we were, for instance,
14801480
using `:scope` on a div (`#!py3 sv.select(':scope > p', soup.div)`) `:scope` would represent **that** div element, and
@@ -1506,7 +1506,7 @@ no others. If called on the Beautiful Soup object which represents the entire do
15061506
!!! tip "Additional Reading"
15071507
https://developer.mozilla.org/en-US/docs/Web/CSS/:scope
15081508

1509-
## `:where()`<span class="lab badge"></span> {:#:where}
1509+
## `:where()`:material-flask:{: title="Experimental" data-md-color-primary="purple" .icon} {:#:where}
15101510

15111511
Selects an element, but only if it matches at least one selector in the selector list. In browsers, this also has zero
15121512
specificity, but this only has relevance in a browser environment where you have multiple CSS styles, and specificity is

0 commit comments

Comments
 (0)