Skip to content

Commit 2d2cc5e

Browse files
refactor: ansys sphinx theme variables (#657)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent cfc2a3e commit 2d2cc5e

File tree

2 files changed

+26
-31
lines changed

2 files changed

+26
-31
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ansys sphinx theme variables

src/ansys_sphinx_theme/assets/styles/ansys-sphinx-theme-variable.scss

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,16 @@
4242
*
4343
* Colors are defined in rgb string way, "red, green, blue"
4444
*/
45-
--ansysGold: rgb(255, 183, 27); /* #FFB71B */
46-
--ansysBronze: rgb(200, 146, 17); /* #C89211 */
47-
--pythonBlue: rgb(57, 114, 161); /* #3972a1 */
48-
--pst-font-size-h1: 48px;
49-
--pst-font-size-h2: 40px;
50-
--pst-font-size-h3: 32px;
51-
--pst-font-size-h4: 28px;
52-
--pst-font-size-h5: 24px;
53-
--pst-font-size-h6: 20px;
54-
--ast-global-line-height: 24px;
55-
--bs-nav-link-font-size: 14px;
45+
--pst-font-size-h1: 3rem; /* 48px */
46+
--pst-font-size-h2: 2.5rem; /* 40px */
47+
--pst-font-size-h3: 2rem; /* 32px */
48+
--pst-font-size-h4: 1.75rem; /* 28px */
49+
--pst-font-size-h5: 1.5rem; /* 24px */
50+
--pst-font-size-h6: 1.25rem; /* 20px */
51+
--ast-global-line-height: 1.5rem; /* 24px */
52+
--bs-nav-link-font-size: 0.875rem; /* 14px */
5653
--bs-navbar-color: var(--bs-ast-navbar-color);
57-
--ast-font-sidebar-header: 16px;
54+
--ast-font-sidebar-header: 1rem; /* 16px */
5855
/**
5956
* weight
6057
*/
@@ -65,30 +62,29 @@
6562
/**
6663
* table font sizes
6764
*/
68-
--pst-table-font-size: 14px;
69-
--pst-table-header-font-size: 12px;
70-
71-
--pst-sidebar-font-size-mobile: 12px;
72-
--ast-nav-link-font-size: 14px;
65+
--pst-table-font-size: 0.875rem; /* 14px */
66+
--pst-table-header-font-size: 0.75rem; /* 12px */
67+
--pst-sidebar-font-size-mobile: 0.75rem; /* 12px */
68+
--ast-nav-link-font-size: 0.875rem; /* 14px */
7369

7470
/**
7571
* sphinx design font sizes
7672
*/
7773

78-
--ast-sphinx-design-font-size: 14px;
74+
--ast-sphinx-design-font-size: 0.875rem; /* 14px */
7975
--ast-sphinx-design-font-family: "Open Sans", sans-serif;
80-
--ast-sphinx-design-border-radius: 4px;
76+
--ast-sphinx-design-border-radius: 0.25rem; /* 4px */
8177

8278
/**
8379
* admonitions
8480
*/
85-
--ast-admonitions-font-size: 14px;
86-
--ast-admonitions-padding: 8px 16px;
87-
--ast-admonitions-border-radius: 8px;
88-
--ast-admonitions-icon-size: 15px;
89-
--ast-admonition-icon-height: 24px;
90-
--ast-admonition-icon-width: 24px;
91-
--ast-admonition-icon-margin-left: 8px;
81+
--ast-admonitions-font-size: 0.875rem; /* 14px */
82+
--ast-admonitions-padding: 0.5rem 1rem; /* 8px 16px */
83+
--ast-admonitions-border-radius: 0.5rem; /* 8px */
84+
--ast-admonitions-icon-size: 0.9375rem; /* 15px */
85+
--ast-admonition-icon-height: 1.5rem; /* 24px */
86+
--ast-admonition-icon-width: 1.5rem; /* 24px */
87+
--ast-admonition-icon-margin-left: 0.5rem; /* 8px */
9288
}
9389

9490
html[data-theme="light"] {
@@ -119,7 +115,7 @@ html[data-theme="light"] {
119115
--ast-navbar-hover-color: var(--ast-color-hover-text);
120116
--ast-navbar-active-color: var(--ast-color-active-text);
121117
--ast-navbar-active-border-color: #000000;
122-
--ast-ring-shadow-focused: 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px #1a78c2;
118+
--ast-ring-shadow-focused: 0px 0px 0px 0.125rem #ffffff, 0px 0px 0px 0.25rem #1a78c2; /* 2px, 4px */
123119

124120
/**
125121
* sidebar colors
@@ -201,10 +197,8 @@ html[data-theme="light"] {
201197
--ast-tab-border-color-hover: #8e8e8e;
202198
--ast-tab-border-color-active: #000000;
203199
--ast-dropdown-text-color: #686868;
204-
--ast-box-shadow-active: 0px 1px 2px 0px rgba(0, 0, 0, 0.08),
205-
0px 2px 4px 0px rgba(0, 0, 0, 0.12);
206-
--ast-box-shadow-hover: 0px 1px 2px 0px rgba(0, 0, 0, 0.08),
207-
0px 4px 8px 2px rgba(0, 0, 0, 0.12);
200+
--ast-box-shadow-active: 0px 0.0625rem 0.125rem 0px rgba(0, 0, 0, 0.08), 0px 0.25rem 0.5rem 0px rgba(0, 0, 0, 0.12); /* 1px, 2px, 4px, 8px */
201+
--ast-box-shadow-hover: 0px 0.0625rem 0.125rem 0px rgba(0, 0, 0, 0.08), 0px 0.25rem 0.5rem 0px rgba(0, 0, 0, 0.12); /* 1px, 2px, 4px, 8px */
208202
/**
209203
* search hide match
210204
*/

0 commit comments

Comments
 (0)