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

Fix multiple minor styling issues #191

Merged
merged 1 commit into from
Aug 18, 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
2 changes: 1 addition & 1 deletion sass/_component_admotion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
border-radius: $border-radius;
overflow: hidden;

*:last-child {
&:last-child {
margin-bottom: 0;
}

Expand Down
22 changes: 16 additions & 6 deletions sass/_component_search.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
@use "sass:map";

/**
* Search box
* Sidebar with search box
*/

.sidebar-container {
@extend .border-right;

border-right-style: hidden; // hide by default on small devices

/* stylelint-disable-next-line scss/media-feature-value-dollar-variable */
@media screen and (min-width: map.get($grid-breakpoints, "lg")) {
max-width: $size-13;
border-right-style: solid;
}
}

.collapse {
padding-top: 2.4rem !important;
max-height: 100vh;
overflow-x: hidden;
overflow-y: auto;
}

.searchbox {
margin-bottom: 2rem;
}

/**
* Autocomplete
*/
Expand Down
2 changes: 1 addition & 1 deletion sass/_component_versionpicker_fix.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ These overrides are necessary to make the version picker work with the Sphinx Wa
position: fixed;
bottom: 50px;
right: 50px;
max-width: 300px;
max-width: $modal-sm;
max-height: calc(100vh - 50px);
overflow-y: auto;
background: #1f1d1d;
Expand Down
16 changes: 16 additions & 0 deletions sass/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* Add additional spacing between sections using semantic section elements */
section {
margin-top: 2.5rem;
margin-bottom: 2.5rem;
}

/* Workaround for https://github.com/executablebooks/MyST-Parser/issues/533 */
li > p {
margin-bottom: 0;
}

/* override bootstrap's outline: 0 and force a high contrast outline on all focusable elements */
*:focus {
outline: 3px solid $focus-outline !important;
outline-offset: 1px;
}
2 changes: 2 additions & 0 deletions sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ $table-bg: $white;

$yiq-contrasted-threshold: 160;

$focus-outline: #1f7e9a;

// --------------------------------------------------
// Code Colors
// --------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions sass/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
@import "component_versionpicker_fix";

// misc
@import "layout";
@import "utilities";
4 changes: 2 additions & 2 deletions sphinx_wagtail_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
</header>
<div class="container-fluid">
<div class="row">
<aside class="col-12 col-lg-3">
<div id="collapseSidebar" class="collapse sticky-top d-lg-block pt-5">
<aside class="col-12 col-lg-3 sidebar-container">
<div id="collapseSidebar" class="collapse sticky-top d-lg-block pt-5 pr-lg-4">
{%- for sidebartemplate in sidebars %}
{%- include sidebartemplate %}
{%- endfor %}
Expand Down
2 changes: 1 addition & 1 deletion sphinx_wagtail_theme/searchbox.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{%- if builder != "singlehtml" %}
<div id="searchbox" class="searchbox" role="search">
<div id="searchbox" class="searchbox mb-6" role="search">
<form id="search-form" action="{{ pathto('search') }}" autocomplete="off" method="get">
<div class="input-group">
<div class="input-group-prepend">
Expand Down