Skip to content

Commit

Permalink
Advanced CSS layout (#2)
Browse files Browse the repository at this point in the history
* update

* update

* update
  • Loading branch information
rusty1s authored May 17, 2022
1 parent a142722 commit e2b524f
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 5 deletions.
109 changes: 104 additions & 5 deletions pyg_sphinx_theme/static/css/mytheme.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import 'theme.css';

.rst-content a:visited {
color: #2980b9; /* No visiting color */
color: #3091d1; /* No visiting color */
}

/* Remove elements */
Expand Down Expand Up @@ -29,6 +29,7 @@
border-radius: 0;
font-size: inherit;
}
.wy-menu-vertical li.current a,
.wy-menu-vertical li.toctree-l1.current > a {
border: none;
}
Expand Down Expand Up @@ -77,14 +78,112 @@ em.sig-param span.default_value {
}

/* Function Details */
html.writer-html5 .rst-content dl.field-list {
html.writer-html5 .rst-content dl.simple {
display: inherit;
}
html.writer-html5 .rst-content dl.field-list dt,
html.writer-html5 .rst-content dl.field-list dd {
html.writer-html5 .rst-content dl.simple dt,
html.writer-html5 .rst-content dl.simple dd {
margin: 0;
padding: 0;
}
html.writer-html5 .rst-content dl.field-list dt {
html.writer-html5 .rst-content dl.simple dt {
text-transform: uppercase !important;
margin-bottom: 0 !important;
border: inherit !important;
background: none !important;
color: inherit !important;
}

/* Tables */
.wy-table-responsive table td,
.wy-table-responsive table th {
white-space: normal;
}
.wy-table-bordered-all,
.rst-content table.docutils {
border: none;
}
.wy-table-bordered-all td,
.rst-content table.docutils td {
border: none;
}
.wy-table-odd td,
.wy-table-striped tr:nth-child(2n-1) td,
.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
background: rgb(243,244,247);
}
.wy-table td,
.rst-content table.docutils td,
.rst-content table.field-list td,
.wy-table th,
.rst-content table.docutils th,
.rst-content table.field-list th {
padding: 14px;
}
table.colwidths-given tr td p,
table.colwidths-given tr th p {
text-align: center;
}
table.colwidths-given tr td:first-child p,
table.colwidths-given tr th:first-child p {
text-align: left;
}
html.writer-html5 .rst-content table.docutils th {
border: none;
}

/* Code */
.highlight,
.rst-content code.xref {
border: none;
background: rgba(27,31,35,.05);
border-radius: 6px;
}
.rst-content code.xref {
padding: .2em .4em;
}
.rst-content pre.literal-block,
.rst-content div[class^="highlight"] {
border: none;
}
.rst-content pre.literal-block,
.rst-content div[class^="highlight"] pre,
.rst-content .linenodiv pre {
font-size: 80%;
}
.highlight .kn,
.highlight .k {
color: #d73a49;
}
.highlight .nn {
color: inherit;
font-weight: inherit;
}
.highlight .nc {
color: #e36209;
font-weight: inherit;
}
.highlight .fm,
.highlight .nd,
.highlight .nf,
.highlight .nb {
color: #6f42c1;
}
.highlight .bp,
.highlight .n {
color: inherit;
}
.highlight .kc,
.highlight .s1,
.highlight .s2,
.highlight .mi,
.highlight .mf,
.highlight .bp,
.highlight .bn,
.highlight .ow {
color: #005cc5;
font-weight: inherit;
}
.highlight .c1 {
color: #6a737d;
}
Binary file added pyg_sphinx_theme/static/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions pyg_sphinx_theme/theme.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[theme]
inherit=sphinx_rtd_theme
stylesheet=css/mytheme.css

[options]
logo_only=True
navigation_depth=2

0 comments on commit e2b524f

Please sign in to comment.