Skip to content

Commit 50fa477

Browse files
authored
move parent theme css earlier in the inclusion order (#451)
1 parent 201eefb commit 50fa477

File tree

10 files changed

+22
-16
lines changed

10 files changed

+22
-16
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* This file is intentionally left blank to override the stylesheet of the
2+
parent theme via theme.conf. The parent style we import directly in theme.css */

pydata_sphinx_theme/static/css/index.ba352cd6b068e1f086448f8c213af9de.css renamed to pydata_sphinx_theme/static/css/index.0884b3a9c6335b337dc42acb87c1ef31.css

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

pydata_sphinx_theme/static/css/theme.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* Provided by the Sphinx base theme template at build time */
2+
@import "../basic.css";
3+
14
:root {
25
/*****************************************************************************
36
* Theme config

pydata_sphinx_theme/static/webpack-macros.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
{% macro head_pre_bootstrap() %}
1515
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet">
16-
<link href="{{ pathto('_static/css/index.ba352cd6b068e1f086448f8c213af9de.css', 1) }}" rel="stylesheet">
16+
<link href="{{ pathto('_static/css/index.0884b3a9c6335b337dc42acb87c1ef31.css', 1) }}" rel="stylesheet">
1717
{% endmacro %}
1818

1919
{% macro head_js_preload() %}
20-
<link rel="preload" as="script" href="{{ pathto('_static/js/index.1426bd52e66c6024bf44.js', 1) }}">
20+
<link rel="preload" as="script" href="{{ pathto('_static/js/index.8ce51e06244021f9481b.js', 1) }}">
2121
{% endmacro %}
2222

2323
{% macro body_post() %}
24-
<script src="{{ pathto('_static/js/index.1426bd52e66c6024bf44.js', 1) }}"></script>
24+
<script src="{{ pathto('_static/js/index.8ce51e06244021f9481b.js', 1) }}"></script>
2525
{% endmacro %}

pydata_sphinx_theme/theme.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[theme]
22
inherit = basic
3+
stylesheet = css/blank.css
34
pygments_style = tango
45
sidebars = search-field.html, sidebar-nav-bs.html, sidebar-ethical-ads.html
56

src/scss/_admonitions.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Admonitions CSS originally inspired by https://squidfunk.github.io/mkdocs-material/getting-started/
22

3-
.admonition {
3+
div.admonition, .admonition{
44
margin: 1.5625em auto;
5-
padding: 0 0.6rem 0.8rem 0.6rem !important;
5+
padding: 0 0.6rem 0.8rem 0.6rem;
66
overflow: hidden;
77
page-break-inside: avoid;
88
border-left: 0.2rem solid;
@@ -30,7 +30,7 @@
3030
// Defaults for all admonitions
3131
> .admonition-title {
3232
position: relative;
33-
margin: 0 -0.6rem !important;
33+
margin: 0 -0.6rem;
3434
padding: 0.4rem 0.6rem 0.4rem 2rem;
3535
font-weight: 700;
3636
background-color: rgba(var(--pst-color-admonition-default), 0.1);

src/scss/_navbar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
// If we want the shadow to only point downward in the future, set
3333
// box-shadow to: 0 0.125rem 0.25rem -0.125rem rgba(0, 0, 0, 0.11);
3434
.navbar-light {
35-
background: #fff !important;
35+
background: #fff;
3636
box-shadow: 0 0.125rem 0.25rem 0 rgba(0, 0, 0, 0.11);
3737

3838
.navbar-nav {

src/scss/index.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ footer {
229229
margin-left: -15px;
230230

231231
@include media-breakpoint-up(md) {
232-
display: block !important;
232+
display: block;
233233

234234
@supports (position: -webkit-sticky) or (position: sticky) {
235235
max-height: calc(100vh - 11rem);
@@ -500,7 +500,7 @@ nav.bd-links {
500500

501501
// xarray output display in bootstrap
502502
.xr-wrap[hidden] {
503-
display: block !important;
503+
display: block;
504504
}
505505

506506

@@ -579,9 +579,9 @@ nav.bd-links {
579579
table.highlighttable td.linenos,
580580
span.linenos,
581581
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
582-
user-select: none !important;
583-
-webkit-user-select: text !important; /* Safari fallback only */
584-
-webkit-user-select: none !important; /* Chrome/Safari */
585-
-moz-user-select: none !important; /* Firefox */
586-
-ms-user-select: none !important; /* IE10+ */
582+
user-select: none;
583+
-webkit-user-select: text; /* Safari fallback only */
584+
-webkit-user-select: none; /* Chrome/Safari */
585+
-moz-user-select: none; /* Firefox */
586+
-ms-user-select: none; /* IE10+ */
587587
}

webpack.common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module.exports = {
108108
},
109109
plugins: [
110110
new CleanWebpackPlugin({
111-
cleanOnceBeforeBuildPatterns: ['**/*', '!css', '!css/theme.css'],
111+
cleanOnceBeforeBuildPatterns: ['**/*', '!css', '!css/theme.css', '!css/blank.css'],
112112
}),
113113
new HtmlWebpackPlugin({
114114
filename: resolve(staticPath, 'webpack-macros.html'),

0 commit comments

Comments
 (0)