Skip to content

Commit 6ca4aee

Browse files
Modify font style and size (#93)
* Modify font size ane format * remove table hover * Add padding for blocke and link color * Add google font
1 parent 25971d0 commit 6ca4aee

File tree

4 files changed

+51
-24
lines changed

4 files changed

+51
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ venv/
120120
ENV/
121121
env.bak/
122122
venv.bak/
123+
.vscode
123124

124125
# Spyder project settings
125126
.spyderproject

doc/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
************
22
Installation
33
************
4-
`Sphinx <https://www.sphinx-doc.org/en/master/>`_. is a Python
4+
`Sphinx <https://www.sphinx-doc.org/en/master/>`_ is a Python
55
documentation generator for creating documentation. If you are new to
66
using Sphinx, see `Sphinx Getting Started <https://www.sphinx-doc.org/en/master/usage/quickstart.html>`_.
77

src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css

Lines changed: 49 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* Provided by the Sphinx base theme template at build time */
22
@import "../basic.css";
33
@import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@600&display=swap');
4+
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;600;700&display=swap');
45
@import "../tabs.css";
56
@import "../sg_gallery.css";
67

@@ -42,20 +43,24 @@
4243

4344
--pst-color-active-navigation: 200, 146, 17; /* --ansysBronze */
4445
--pst-color-navbar-link: 255, 255, 255;
45-
--pst-color-navbar-link-hover: 255, 183, 27; /* --ansysBronze */
46+
--pst-color-navbar-link-hover: 200, 146, 17; /* --ansysBronze */
4647
--pst-color-navbar-link-active: 255, 183, 27; /* --ansysBronze */
47-
--pst-font-size-h1: 40px;
48-
48+
--pst-font-size-h1: 48px;
49+
--pst-font-size-h2: 36px;
50+
--pst-font-size-h3: 28px;
51+
--pst-font-size-h4: 20px;
52+
--pst-font-size-h5: 14px;
53+
--pst-font-size-h6: 11px;
4954
}
5055

5156
html[data-theme="light"] {
5257
/*****************************************************************************
5358
* main colors
5459
*/
55-
--pst-color-primary: rgb(255, 183, 27);
60+
--pst-color-primary: #fff;
5661
--pst-color-secondary: rgb(200, 146, 17);
5762
--pst-color-success: rgb(40, 167, 69);
58-
--pst-color-text-base: rgb(51, 51, 51);
63+
--pst-color-text-base: rgb(0, 0, 0);
5964
--pst-color-text-muted: rgb(26, 24, 24);
6065
--pst-color-border: #c9c9c9;
6166
--pst-color-shadow: rgb(216, 216, 216);
@@ -81,7 +86,7 @@ html[data-theme="light"] {
8186
* layout
8287
*/
8388

84-
--pst-color-link:#0077B3;
89+
--pst-color-link:#1E6DDC;
8590
--pst-color-link-hover:#32cfea;
8691
--pst-color-inline-code: #CD186D;
8792
--pst-color-target: rgb(255, 255, 255);
@@ -134,7 +139,7 @@ h1, h2 {
134139
}
135140

136141
.bd-header.navbar-light#navbar-main .navbar-nav li a.nav-link {
137-
color:#ffffff;
142+
color: #a2a2a2;
138143
}
139144

140145
.docutils {
@@ -201,8 +206,8 @@ p.rubric {
201206
Sphinx-tab
202207
###############
203208
*/
204-
.sphinx-tabs-panel, p{
205-
font-weight: 100;
209+
.sphinx-tabs-panel p{
210+
font-weight: 400;
206211
font-family: 'Source Sans Pro', sans-serif;
207212
font-size: 1rem;
208213
font-style: var(--pst-font-family-base-system);
@@ -303,16 +308,6 @@ table.table-centered {
303308
}
304309

305310

306-
/*
307-
###############
308-
longtable
309-
###############
310-
*/
311-
312-
table.longtable tr:hover td {
313-
background-color: rgb(255, 183, 27, 0.6);
314-
}
315-
316311
/*
317312
#########################
318313
longtable-centered
@@ -496,18 +491,22 @@ Side column size (first and second column from left)
496491
}
497492

498493
a.headerlink {
499-
color: var(--pst-color-text-base);
494+
color: #222;
500495
}
501496

502497
/*
503498
#################################
504499
Right side toctree color and font
505500
#################################
506501
*/
502+
.toc-entry a {
503+
padding: .125rem 1.5rem;
504+
color: var(--pst-color-link);
505+
}
507506

508507
.toc-entry>.nav-link.active {
509-
font-weight: 500;
510-
color: var(--pst-color-link);
508+
font-weight: bold;
509+
color: var(--pst-color-text-base);
511510
background-color: transparent;
512511
border-left: 2px solid var(--pst-color-text-muted);
513512
}
@@ -562,4 +561,32 @@ Bold font weight for **code**
562561

563562
b, strong {
564563
font-weight: 900;
564+
}
565+
566+
#theme-switch {
567+
border-color: #fff;
568+
border: 2px solid #898A8D;
569+
margin-right: .4rem;
570+
}
571+
572+
#theme-switch:hover {
573+
background-color: #fff
574+
}
575+
576+
.bd-header.navbar-light#navbar-main .navbar-nav li a.nav-link:hover {
577+
color: #fff;
578+
}
579+
580+
.bd-header.navbar-light#navbar-main .navbar-nav>.active>.nav-link {
581+
border-bottom: 2px solid #fff;
582+
}
583+
584+
/*
585+
#############################
586+
Padding of main content block
587+
#############################
588+
*/
589+
590+
.bd-content {
591+
padding: 1.5rem 1.5rem 2rem 3rem;
565592
}

src/ansys_sphinx_theme/static/css/breadcrumbs.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
padding-top: 1rem;
33
padding-bottom: 1rem;
44
padding-left: 3rem;
5-
border-bottom: 1px solid rgba(0,0,0,.1);
65

76
}
87

0 commit comments

Comments
 (0)