Skip to content

Commit e823ada

Browse files
committed
Add "steps" list CSS
1 parent 5c38bfc commit e823ada

File tree

10 files changed

+79
-31
lines changed

10 files changed

+79
-31
lines changed

docs/src/markdown/extensions/magiclink.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,19 +453,24 @@ control over specifics, so if this is sufficient for your needs, then it give it
453453

454454
To specify a custom provider, you simply need to specify them via the `custom` option.
455455

456+
/// html | div.steps
456457
1. Simply specify the name to identify the provider (must only contain alphanumeric characters). Provider name is used
457458
when manually specifying a provider (`@provider:user`) and will be used to generate custom CSS classes
458459
`magiclink-provider`.
460+
459461
2. Specify the `type`. Is this a private `github`, `gitlab`, or `bitbucket` provider.
460-
3. Specify the `label` for tooltips.
461-
4. Specify the `host` for your private repository.
462+
463+
3. Specify the `host` for your private repository.
464+
465+
4. Specify the `label` for tooltips.
466+
///
462467

463468
```js
464469
'custom': {
465470
'test': {
471+
'type': 'github',
466472
'host': 'http://test.com',
467473
'label': 'Test',
468-
'type': 'github'
469474
}
470475
}
471476
```

docs/src/scss/extensions/_steps.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@use "../utilities/convert";
2+
3+
.md-typeset div.steps > ol {
4+
counter-reset: item;
5+
6+
li {
7+
position: relative;
8+
padding-left: 1em;
9+
list-style: none;
10+
11+
&::before {
12+
position: absolute;
13+
top: 0;
14+
left: 0;
15+
z-index: -1;
16+
display: block;
17+
width: 1.75em;
18+
height: 1.75em;
19+
margin-left: -1.25em;
20+
color: var(--md-steps-fg-color);
21+
font-weight: 600;
22+
font-size: 0.9em;
23+
text-align: center;
24+
background-color: var(--md-steps-bg-color);
25+
border: 1px solid var(--md-steps-border-color);
26+
border-radius: 100px;
27+
content: counter(item);
28+
counter-increment: item;
29+
}
30+
31+
&::after {
32+
position: absolute;
33+
top: 0;
34+
bottom: 0;
35+
left: -0.36em;
36+
display: block;
37+
width: 1px;
38+
margin-top: 2em;
39+
border-left: 1px solid var(--md-steps-border-color);
40+
content: '';
41+
}
42+
}
43+
}

docs/src/scss/extra.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@
1616
@use "extensions/tasklist";
1717
@use "extensions/toc";
1818
@use "extensions/superfences";
19+
@use "extensions/steps";
1920

2021
@use "material";

docs/src/scss/palette/_colors.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
--md-code-hl-builtin-color: var(--md-code-hl-constant-color);
2525
--md-code-hl-class-color: var(--md-code-hl-function-color);
2626

27+
// List steps
28+
--md-steps-bg-color: var(--md-code-bg-color);
29+
--md-steps-fg-color: var(--md-code-fg-color);
30+
--md-steps-border-color: hsla(0, 0%, 75%, 1);
31+
2732
// Various Material related color variables
2833
--md-typeset-a-color: #{material_color.$clr-cyan-500};
2934

@@ -48,6 +53,9 @@
4853
--md-code-special-bg-color: #{color.adjust(hsl(232, 15%, 15%), $lightness: 5%)};
4954
--md-default-bg-color--trans: hsla(232,15%,15%, 0);
5055

56+
// List steps
57+
--md-steps-border-color: hsla(225, 15%, 30%, 1);
58+
5159
// Keys colors
5260
--md-typeset-kbd-color: var(--md-default-fg-color--lightest);
5361
--md-typeset-kbd-border-color: #{color.adjust(rgb(46, 48, 62), $lightness: -9%)};
@@ -114,6 +122,9 @@
114122
--md-code-alternate-bg-color: #{color_tools.tint(dracula.$drac-bg, 10%)};
115123
--md-code-link-bg-color: #{color.mix(dracula.$drac-cyan, dracula.$drac-bg, 15%)};
116124

125+
// List steps
126+
--md-steps-border-color: #{color.adjust(dracula.$drac-bg, $lightness: 10%)};
127+
117128
// Various Material related color variables
118129
--md-typeset-a-color: #{dracula.$drac-cyan};
119130
--md-typeset-mark-color: #{color.mix(dracula.$drac-yellow, dracula.$drac-bg, 35%)};

docs/theme/assets/pymdownx-extras/extra-3005714f37.css

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/theme/assets/pymdownx-extras/extra-3005714f37.css.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/theme/assets/pymdownx-extras/extra-add764b01e.css

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/theme/assets/pymdownx-extras/extra-add764b01e.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ extra:
239239
link: https://github.com/facelessuser
240240
extra_css:
241241
# - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css
242-
- assets/pymdownx-extras/extra-add764b01e.css
242+
- assets/pymdownx-extras/extra-3005714f37.css
243243
extra_javascript:
244244
- https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js
245245
# - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js

package-lock.json

Lines changed: 12 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)