Skip to content

Commit

Permalink
Various CSS tweaks and cleanup (#4847)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored May 15, 2023
1 parent 92578ea commit 984de06
Show file tree
Hide file tree
Showing 68 changed files with 4,854 additions and 3,515 deletions.
45 changes: 25 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,46 @@

default_stages: [commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-toml
- id: check-json
- id: detect-private-key
- id: end-of-file-fixer
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-toml
- id: check-json
- id: detect-private-key
- id: end-of-file-fixer
exclude: \.min\.js$
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.261'
hooks:
- id: ruff # See 'setup.cfg' for args
- id: ruff # See 'setup.cfg' for args
args: [panel]
files: panel/
- repo: https://github.com/pycqa/isort
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/hoxbro/clean_notebook
- repo: https://github.com/hoxbro/clean_notebook
rev: v0.1.9
hooks:
- id: clean-notebook
args: [-i, tags]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
types_or: [css]
ci:
autofix_prs: false
autoupdate_schedule: quarterly
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
151 changes: 76 additions & 75 deletions doc/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,178 +1,179 @@
:root[data-theme="light"], :root[data-theme="dark"] {
--pst-color-primary: #0072B5;
--pst-color-link: #0072B5;
--pst-color-inline-code: #0072B5;
--sd-color-card-border-hover: #0072B5;
:root[data-theme='light'],
:root[data-theme='dark'] {
--pst-color-primary: #0072b5;
--pst-color-link: #0072b5;
--pst-color-inline-code: #0072b5;
--sd-color-card-border-hover: #0072b5;
}

html[data-theme=dark] .bd-content div.cell_output .text_html {
background-color: var(--pst-color-background);
color: var(--pst-color-text-base);
html[data-theme='dark'] .bd-content div.cell_output .text_html {
background-color: var(--pst-color-background);
color: var(--pst-color-text-base);
}

/* Align navbar item in center */
.navbar-header-items__center {
margin-left: auto;
margin-right: auto;
margin-left: auto;
margin-right: auto;
}

/* Ensure content fills full space */
.bd-main .bd-content .bd-article-container {
max-width: unset;
max-width: unset;
}

/* Hide primary sidenav bottom section to avoid extra scroll */
.sidebar-primary-items__end.sidebar-primary__section {
display: none;
display: none;
}

.nav-link {
white-space: nowrap;
white-space: nowrap;
}

.showcase-table {
border-spacing: 15px
border-spacing: 15px;
}

.showcase-table td {
border: 0px;
vertical-align: top;
border: 0px;
vertical-align: top;
}

.cell_output {
padding-left: 0;
padding-left: 0;
}

html[data-theme=dark] .bd-content div.cell_output .text_html,
html[data-theme=light] .bd-content div.cell_output .text_html {
padding: 0;
html[data-theme='dark'] .bd-content div.cell_output .text_html,
html[data-theme='light'] .bd-content div.cell_output .text_html {
padding: 0;
}

@media (max-width: 960px) {
.homepage-logo {
display: none;
}
.homepage-logo {
display: none;
}
}

@media (min-width: 1400px) {
.bd-sidebar {
max-width: 300px;
}
.bd-sidebar {
max-width: 300px;
}

.bd-main .bd-content .bd-article-container .bd-article {
padding-left: 0.5rem;
padding-top: 0.5rem;
}
.bd-main .bd-content .bd-article-container .bd-article {
padding-left: 0.5rem;
padding-top: 0.5rem;
}

.bd-page-width {
max-width: 100%;
}
.bd-page-width {
max-width: 100%;
}
}

@media (min-width: 1600px) {
.bd-page-width {
max-width: 85%;
}
.bd-page-width {
max-width: 85%;
}
}

@media (min-width: 1800px) {
.bd-page-width {
max-width: 80%;
}
.bd-page-width {
max-width: 80%;
}
}

#scroller-right {
max-width: 14%;
max-width: 14%;
}

@media (max-width: 1400px) {
#scroller-right {
position: relative;
right: unset;
top: unset;
max-width: 100%;
transform: unset;
}
#scroller-right {
position: relative;
right: unset;
top: unset;
max-width: 100%;
transform: unset;
}
}
.theme-switch-button {
font-size: unset;
font-size: unset;
}

.sd-card-body.sponsor-logo {
flex-grow: unset;
margin: auto;
flex-grow: unset;
margin: auto;
}

.sponsor-logo img {
min-height: 80px;
object-fit: contain;
min-height: 80px;
object-fit: contain;
}

button.toggle-button {
display: none;
display: none;
}

.toggle-hidden:not(.admonition) {
height: 0;
height: 0;
}

.tag_hide-input {
margin-bottom: 0 !important;
margin-bottom: 0 !important;
}

details.hide.above-input {
display: none;
display: none;
}

.toggle-hidden + .cell_output {
margin-top: 0 !important;
margin-top: 0 !important;
}

dl.field-list {
display: none
display: none;
}

/* Improve styling */

div.cell div.cell_input {
border: none;
border: none;
}

.highlight {
border-radius: 4px;
border-radius: 4px;
}

html[data-theme="light"] .highlight {
background-color: #263238;
color: #f8f8f2;
html[data-theme='light'] .highlight {
background-color: #263238;
color: #f8f8f2;
}

pre[id^='codecell'] {
background-color: unset;
border: none;
border-radius: 0.5em;
color: #f8f8f2;
box-shadow: none;
padding: 1.5em;
background-color: unset;
border: none;
border-radius: 0.5em;
color: #f8f8f2;
box-shadow: none;
padding: 1.5em;
}

button.copybtn {
background-color: #263238;
background-color: #263238;
}

button.copybtn:hover {
background-color: #263238;
color: #f8f8f2;
background-color: #263238;
color: #f8f8f2;
}

.highlight button.copybtn:hover {
background: none
background: none;
}

.o-tooltip--left:after {
background: none;
background: none;
}

ul.current.nav.bd-sidenav {
padding: 0;
padding: 0;
}
Loading

0 comments on commit 984de06

Please sign in to comment.