Skip to content

Commit d1ee9eb

Browse files
committed
Autofix (stylelint)
1 parent 4d6e9d0 commit d1ee9eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+268
-112
lines changed

docs/_static/custom.css

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,44 @@
55
/* begin-custom-color/* <your static path>/custom.css */
66

77
div.admonition.admonition-olive {
8-
border-color: hsl(60, 100%, 25%);
8+
border-color: hsl(60deg 100% 25%);
99
}
10+
1011
div.admonition.admonition-olive > .admonition-title {
11-
background-color: hsl(60, 100%, 14%);
12+
background-color: hsl(60deg 100% 14%);
1213
color: white;
1314
}
14-
div.admonition.admonition-olive > .admonition-title:after {
15-
color: hsl(60, 100%, 25%);
15+
16+
div.admonition.admonition-olive > .admonition-title::after {
17+
color: hsl(60deg 100% 25%);
1618
}
19+
1720
/* end-custom-color */
1821

1922
/* begin-custom-icon/* <your static path>/custom.css */
2023

21-
div.admonition.admonition-icon > .admonition-title:after {
24+
div.admonition.admonition-icon > .admonition-title::after {
2225
content: "\f24e"; /* the fa-scale icon */
2326
}
27+
2428
/* end-custom-icon */
2529

2630
/* begin-custom-youtube/* <your static path>/custom.css */
2731

2832
div.admonition.admonition-youtube {
29-
border-color: hsl(0, 100%, 50%); /* YouTube red */
33+
border-color: hsl(0deg 100% 50%); /* YouTube red */
3034
}
35+
3136
div.admonition.admonition-youtube > .admonition-title {
32-
background-color: hsl(0, 99%, 18%);
37+
background-color: hsl(0deg 99% 18%);
3338
color: white;
3439
}
35-
div.admonition.admonition-youtube > .admonition-title:after {
36-
color: hsl(0, 100%, 50%);
40+
41+
div.admonition.admonition-youtube > .admonition-title::after {
42+
color: hsl(0deg 100% 50%);
3743
content: "\f26c"; /* fa-solid fa-tv */
3844
}
45+
3946
/* end-custom-youtube */
4047

4148
/* fix for project names that are parsed as links: the whole card is a link so

src/pydata_sphinx_theme/assets/styles/abstracts/_accessibility.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@
2222

2323
@each $fg in $foregrounds {
2424
$contrast-ratio: get-contrast-ratio($bg, $fg);
25+
2526
@if $contrast-ratio >= $min-contrast-ratio {
2627
@return $fg;
2728
} @else if $contrast-ratio > $max-ratio {
2829
$max-ratio: $contrast-ratio;
2930
$max-ratio-color: $fg;
3031
}
3132
}
32-
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$bg}...";
3333

34+
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$bg}...";
3435
@return $max-ratio-color;
3536
}
3637

src/pydata_sphinx_theme/assets/styles/abstracts/_color.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
// We must add ::before pseudo-element to some theme components (such as admonitions)
99
// because users were instructed to customize the background color this way.
1010
@mixin legacy-backdrop-placeholder {
11-
&:before {
11+
&::before {
1212
content: "";
1313
width: 100%;
1414
height: 100%;
1515
position: absolute;
1616
left: 0;
1717
top: 0;
1818
z-index: -1;
19+
1920
// So that hovering over the text within background is still possible.
2021
// Otherwise the background overlays the text and you cannot click or select easily.
2122
// ref: https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events
@@ -33,6 +34,7 @@
3334
@each $key in $keys {
3435
$map: map-get($map, $key);
3536
}
37+
3638
@return $map;
3739
}
3840

@@ -47,6 +49,7 @@
4749
@if type-of($color) == string {
4850
$color: from-hex($color);
4951
}
52+
5053
@return $color;
5154
}
5255

@@ -99,8 +102,8 @@
99102
$hex: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "a" "b" "c" "d" "e" "f";
100103
$string: to-lower-case($string);
101104
$length: str-length($string);
102-
103105
$dec: 0;
106+
104107
@for $i from 1 through $length {
105108
$factor: 1 + (15 * ($length - $i));
106109
$index: index($hex, str-slice($string, $i, $i));

src/pydata_sphinx_theme/assets/styles/abstracts/_links.scss

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
// - 0.0625rem if it's thicker than 1px because the user has changed the text
1111
// size in their browser
1212
$link-underline-thickness: unquote("max(1px, .0625rem)") !default;
13+
1314
// Offset of link underlines from text baseline
1415
// The default is 3px expressed as ems, as calculated against the default body
1516
// font size (on desktop).
1617
$link-underline-offset: 0.1578em !default;
18+
1719
// Thickness of link underlines in hover state
1820
// The default for each link will be the thickest of the following:
1921
// - 3px
@@ -41,6 +43,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
4143
@mixin link-decoration-hover {
4244
@if $link-hover-decoration-thickness {
4345
text-decoration-thickness: $link-hover-decoration-thickness;
46+
4447
// Disable ink skipping on underlines on hover.
4548
text-decoration-skip-ink: none;
4649
}
@@ -52,6 +55,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
5255
@mixin link-style-hover {
5356
@include link-decoration;
5457
@include link-decoration-hover;
58+
5559
color: var(--pst-color-link-hover);
5660
}
5761

@@ -62,12 +66,13 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
6266
@mixin link-style-default {
6367
// So that really long links don't spill out of their container
6468
word-wrap: break-word;
65-
6669
color: var(--pst-color-link);
70+
6771
@include link-decoration;
6872

6973
&:hover {
7074
color: var(--pst-color-link-hover);
75+
7176
@include link-decoration-hover;
7277
}
7378

@@ -79,6 +84,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
7984
// Visited should still be hoverable
8085
&:visited {
8186
color: var(--pst-color-link);
87+
8288
&:hover {
8389
color: var(--pst-color-link-hover);
8490
}
@@ -95,6 +101,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
95101

96102
&:hover {
97103
color: var(--pst-color-link-hover);
104+
98105
@include link-decoration;
99106
@include link-decoration-hover;
100107
}
@@ -113,6 +120,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
113120
text-decoration: underline;
114121
background-color: transparent;
115122
color: var(--pst-color-link-hover);
123+
116124
@include link-decoration-hover;
117125
}
118126

@@ -137,13 +145,16 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
137145
@mixin link-sidebar-current {
138146
font-weight: 600;
139147
color: var(--pst-color-primary);
148+
140149
@if $link-hover-decoration-thickness {
141150
$notch-shadow: inset
142151
$link-hover-decoration-thickness
143-
0px
144-
0px
152+
0
153+
0
145154
var(--pst-color-primary);
155+
146156
box-shadow: $notch-shadow;
157+
147158
&:focus-visible {
148159
box-shadow: $notch-shadow, $focus-ring-box-shadow;
149160
outline: none;
@@ -159,6 +170,7 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
159170
@mixin link-navbar-current {
160171
font-weight: 600;
161172
color: var(--pst-color-primary);
173+
162174
@if $link-hover-decoration-thickness {
163175
border-bottom: $link-hover-decoration-thickness
164176
solid
@@ -173,10 +185,11 @@ $link-hover-decoration-thickness: unquote("max(3px, .1875rem, .12em)") !default;
173185
@mixin icon-navbar-hover {
174186
&:hover {
175187
color: var(--pst-color-link-hover);
188+
176189
@if $link-hover-decoration-thickness {
177-
box-shadow: 0px
190+
box-shadow: 0
178191
$link-hover-decoration-thickness
179-
0px
192+
0
180193
var(--pst-color-link-hover);
181194
}
182195
}
@@ -203,14 +216,12 @@ corresponds to the section in the docs that the user is currently reading.
203216
> .nav-link {
204217
// Set up pseudo-element for hover and current states below.
205218
position: relative;
219+
206220
&::before {
207221
content: "";
208222
display: block;
209223
position: absolute;
210-
top: 0;
211-
right: 0;
212-
bottom: 0;
213-
left: 0;
224+
inset: 0;
214225
background-color: transparent;
215226
}
216227

@@ -244,6 +255,7 @@ corresponds to the section in the docs that the user is currently reading.
244255
&:focus-visible {
245256
box-shadow: $focus-ring-box-shadow;
246257
}
258+
247259
&:hover {
248260
text-decoration: none;
249261
box-shadow: 0 0 0 $focus-ring-width var(--pst-color-link-hover); // purple focus ring

src/pydata_sphinx_theme/assets/styles/abstracts/_mixins.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@
4646
&:nth-child(odd) {
4747
background-color: var(--pst-color-table-row-zebra-low-bg);
4848
}
49+
4950
&:nth-child(even) {
5051
background-color: var(--pst-color-table-row-zebra-high-bg);
5152
}
53+
5254
&:hover {
5355
background-color: var(--pst-color-table-row-hover-bg);
5456
}

src/pydata_sphinx_theme/assets/styles/base/_base.scss

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ a {
4141
color: var(--pst-color-secondary);
4242
opacity: 0.7;
4343
font-size: 0.8em;
44-
padding: 0 4px 0 4px;
44+
padding: 0 4px;
4545
margin-left: 0.2em;
4646
text-decoration: none;
4747
transition: all 0.2s ease-out;
@@ -80,37 +80,43 @@ a {
8080

8181
h1 {
8282
@extend .heading-style;
83+
8384
margin-top: 0;
8485
font-size: var(--pst-font-size-h1);
8586
color: var(--pst-heading-color);
8687
}
8788

8889
h2 {
8990
@extend .heading-style;
91+
9092
font-size: var(--pst-font-size-h2);
9193
color: var(--pst-heading-color);
9294
}
9395

9496
h3 {
9597
@extend .heading-style;
98+
9699
font-size: var(--pst-font-size-h3);
97100
color: var(--pst-heading-color);
98101
}
99102

100103
h4 {
101104
@extend .heading-style;
105+
102106
font-size: var(--pst-font-size-h4);
103107
color: var(--pst-heading-color);
104108
}
105109

106110
h5 {
107111
@extend .heading-style;
112+
108113
font-size: var(--pst-font-size-h5);
109114
color: var(--pst-color-text-base);
110115
}
111116

112117
h6 {
113118
@extend .heading-style;
119+
114120
font-size: var(--pst-font-size-h6);
115121
color: var(--pst-color-text-base);
116122
}
@@ -151,7 +157,7 @@ code {
151157
}
152158

153159
pre {
154-
margin: 1.5em 0 1.5em 0;
160+
margin: 1.5em 0;
155161
padding: 1rem;
156162
background-color: var(--pst-color-surface);
157163
color: var(--pst-color-text-base);
@@ -186,6 +192,7 @@ pre {
186192

187193
&:hover {
188194
@include link-style-hover;
195+
189196
text-decoration-thickness: 1px;
190197
background-color: var(--pst-violet-600);
191198
color: var(--pst-color-secondary-text);

src/pydata_sphinx_theme/assets/styles/components/_breadcrumbs.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ ul.bd-breadcrumbs {
1717
// Style should look like heavier in-page links
1818
// keeping visited in the default link colour
1919
font-weight: bold;
20+
2021
a {
2122
@include link-style-text;
2223
}
2324

2425
// Items that aren't the home have a caret to the left
25-
&:not(.breadcrumb-home):before {
26+
&:not(.breadcrumb-home)::before {
2627
font: var(--fa-font-solid);
2728
font-size: 0.8rem;
2829
content: var(--pst-breadcrumb-divider);

src/pydata_sphinx_theme/assets/styles/components/_icon-links.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44

55
.navbar-icon-links {
66
display: flex;
7-
flex-direction: row;
7+
flex-flow: row wrap;
88
column-gap: 1rem;
9-
flex-wrap: wrap;
109
justify-content: space-evenly;
1110

1211
// Remove the padding so that we can define it with flexbox gap above
1312
li.nav-item a.nav-link {
1413
padding-left: 0;
1514
padding-right: 0;
15+
1616
@include icon-navbar-hover;
17+
1718
&:focus {
1819
color: inherit;
1920
}
@@ -36,15 +37,15 @@
3637
}
3738

3839
/* Social media buttons hard-code the brand color */
39-
&.fa-square-twitter:before {
40+
&.fa-square-twitter::before {
4041
color: #55acee;
4142
}
4243

43-
&.fa-square-gitlab:before {
44+
&.fa-square-gitlab::before {
4445
color: #548;
4546
}
4647

47-
&.fa-bitbucket:before {
48+
&.fa-bitbucket::before {
4849
color: #0052cc;
4950
}
5051
}

src/pydata_sphinx_theme/assets/styles/components/_navbar-links.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
height: 100%;
2424
padding-top: 0.25rem;
2525
padding-bottom: 0.25rem;
26+
2627
@include link-style-text;
2728
}
2829
}

0 commit comments

Comments
 (0)