Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce padding in some container elements #1818

Merged
merged 6 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
matrix:
version:
- '1.0'
- '1.6'
- '1'
- 'nightly'
os:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.5'
version: '1.6'
- name: Run online linkcheck tests
run: julia --color=yes test/run_docchecks.jl
manual_linkcheck:
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: '1.5'
version: '1.6'
- name: Install dependencies
run: julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and check documentation
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Unreleased

* ![Enhancement][badge-enhancement] The padding of the various container elements in the HTML style has been reduced, to improve the look of the generated HTML pages. ([#1814][github-1814], [#1818][github-1818])
* ![Bugfix][badge-bugfix] Build failures now only show fatal errors, rather than all errors. ([#1816][github-1816])

## Version `v0.27.17`
Expand Down Expand Up @@ -1028,7 +1029,9 @@
[github-1807]: https://github.com/JuliaDocs/Documenter.jl/pull/1807
[github-1810]: https://github.com/JuliaDocs/Documenter.jl/issues/1810
[github-1811]: https://github.com/JuliaDocs/Documenter.jl/pull/1811
[github-1814]: https://github.com/JuliaDocs/Documenter.jl/issues/1814
[github-1816]: https://github.com/JuliaDocs/Documenter.jl/pull/1816
[github-1818]: https://github.com/JuliaDocs/Documenter.jl/pull/1818
<!-- end of issue link definitions -->

[julia-38079]: https://github.com/JuliaLang/julia/issues/38079
Expand Down
6 changes: 3 additions & 3 deletions assets/html/scss/documenter/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ pre {
overflow: hidden;

code, code.hljs {
padding: 0 0.5rem !important;
padding: 0 $documenter-container-left-padding !important;
overflow: auto;
display: block;
}

code:first-of-type, code.hljs:first-of-type {
padding-top: 0.7rem !important;
padding-top: 0.5rem !important;
}

code:last-of-type, code.hljs:last-of-type {
padding-bottom: 0.7rem !important;
padding-bottom: 0.5rem !important;
}

.copy-button {
Expand Down
17 changes: 10 additions & 7 deletions assets/html/scss/documenter/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ $documenter-main-padding: 1rem !default;
// to be in px, hence the unit conversion.
$desktop: round($body-size * ($documenter-max-width + $documenter-sidebar-width + $documenter-sidebar-main-gap + $documenter-main-padding-right - 5rem)/1rem) !default;

// Admonitions
$message-header-padding: 0.75em;
$message-body-padding: 1em 1.25em;
// Docstrings
$card-content-padding-v: 1rem;
$card-content-padding-h: 1.25rem;
$card-content-padding: $card-content-padding-v $card-content-padding-h;
// Padding for admonitions and docstrings.
// We'll try to keep the left padding consistent between the various container
// elements:
$documenter-container-left-padding: 0.75rem;
$documenter-admonition-header-padding: 0.5rem $documenter-container-left-padding;
$documenter-admonition-body-padding: 0.5rem $documenter-container-left-padding;
$documenter-docstring-header-padding: 0.5rem $documenter-container-left-padding;
$documenter-docstring-body-padding-h: $documenter-container-left-padding;
$documenter-docstring-body-padding-v: 0.75rem;
$documenter-docstring-body-padding: $documenter-docstring-body-padding-v $documenter-docstring-body-padding-h;
6 changes: 3 additions & 3 deletions assets/html/scss/documenter/components/_admonition.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ $admonition-header-color: () !default;
font-weight: $message-header-weight;
justify-content: space-between;
line-height: 1.25;
padding: $message-header-padding;
padding: $documenter-admonition-header-padding;
position: relative;

&:before {
@include font-awesome;
margin-right: $message-header-padding;
margin-right: $documenter-container-left-padding;
content: "\f06a";
}
}

.admonition-body {
color: $message-body-color;
padding: $message-body-padding;
padding: $documenter-admonition-body-padding;

pre {
background-color: $pre-background;
Expand Down
8 changes: 4 additions & 4 deletions assets/html/scss/documenter/components/_docstring.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
display: flex;
flex-grow: 1;
align-items: stretch;
padding: $card-header-padding;
padding: $documenter-docstring-header-padding;

background-color: $documenter-docstring-header-background;
box-shadow: $card-header-shadow;
Expand All @@ -31,7 +31,7 @@

> section {
position: relative;
padding: $card-content-padding;
padding: $documenter-docstring-body-padding;

border-bottom: 1px solid $border;
&:last-child {
Expand All @@ -42,8 +42,8 @@
transition: opacity 0.3s;
opacity: 0;
position: absolute;
right: $card-content-padding-h / 2;
bottom: $card-content-padding-v / 2;
right: $documenter-docstring-body-padding-h / 2;
bottom: $documenter-docstring-body-padding-v / 2;
@extend .tag;
@extend .is-primary;
@extend .is-size-7;
Expand Down
26 changes: 13 additions & 13 deletions assets/html/themes/documenter-dark.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 13 additions & 13 deletions assets/html/themes/documenter-light.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"

[compat]
DocumenterTools = "=0.1.12"
DocumenterTools = "=0.1.14"