tidy up custom css

This commit is contained in:
james
2020-10-07 16:14:35 +01:00
parent 239ea80975
commit 439f0a030e

View File

@@ -1,151 +1,19 @@
/*
* Sphinx stylesheet to add some customizations to the default Alabaster theme.
* This Sphinx stylesheet adds some customizations to the default Alabaster theme.
*
* The source for the default stylesheet can be found at
* https://github.com/bitprophet/alabaster/blob/master/alabaster/static/alabaster.css_t
*
* For the classes provided by the primer, see https://unpkg.com/@primer/css/dist/primer.css
*/
/* -- HEADER ------------------------------------------------------------------------------- */
div.header {
background-color: #140f46;
top:0;
position: fixed;
width: 100%;
padding: 0 30px 30px 30px;
}
#siteBanner {
width: 100%;
height: 80px;
margin: 0;
opacity: 0.95;
z-index: 1;
transform: translate3d(0px, 0px, 0px);
position: relative;
}
#siteBanner input {
border-width: 0;
/*color: rgb(244, 244, 244);
background-color: #140f46;
font-size: 0.9rem;*/
letter-spacing: 0.1rem;
/*width: 12rem;*/
}
#siteBanner input:focus,
#siteBanner textarea:focus,
#siteBanner select:focus{
outline: none;
}
div.logocontainer {
height: 72px;
width: 350px;
position: absolute;
top: 50%;
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
}
div.linkcontainer {
width: 70%;
position: absolute;
top: 50%;
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
right: 15px;
}
div.linkbar {
float:right;
}
.linkbar a {
color: black;
font-size: 20px;
margin-left: 20px;
text-decoration: none;
}
.linkbar a:hover {
text-decoration: underline;
}
/* -- FOOTER ------------------------------------------------------------------------------- */
div.footer {
width: 100%;
}
/* CODEQL DOCUMENTATION AND SEARCHBOX BANNER ---------------------------------------------------------- */
#title-banner {
background: #140f46;
height: 50px;
position: relative;
}
#title-banner a {
color: white;
font-size: 32px;
text-decoration: none;
position: absolute;
top: 50%;
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
left: 32px;
}
#searchbox-title-banner {
position: absolute;
top: 50%;
transform: translateY(-50%);
-ms-transform: translateY(-50%);
-webkit-transform: translateY(-50%);
right: 32px;
}
#searchbox-navbar {
display: none;
}
#textfield {
position: relative;
float: left;
}
#searchbutton {
position: relative;
float: left;
}
/* -- WRAPPER CONTAINING NAVBAR AND MAIN BOX --------------------------------------------------*/
div.wrapper {
margin-bottom: 0px;
height: 637px;
}
/* -- DOCUMENT ------------------------------------------------------------------------------- */
div.document {
width: 95%;
padding: 0;
margin: 0 0 30px 0;
}
div.documentwrapper {
width: 90%;
margin: 20px 20px 20px 20px;
padding-bottom: 50px;
}
div.mainBox {
margin-left: calc(30% + 25px); /* Allow 25px for the width of the ToC scrollbar */
}
/* -- PRIVACY NOTICE ----------------------------------------------------------------------- */
div.privacy {
text-align: right;
@@ -153,6 +21,16 @@ div.privacy {
padding-bottom: 20px;
}
code {
font-size: 0.9em !important; /* makes code snippets in headings the correct size */
}
/* -- MAIN BODY ---------------------------------------------------------------------------- */
div.body {
max-width: 100%;
}
div.body li {
margin: 0 0 0.5em 0; /* Increase spacing between list items */
}
@@ -163,36 +41,25 @@ div.body li {
height: 100vh;
}
div.navBox {
width:29%;
padding-left: 25px;
height: calc(100% - 108px);
z-index: 100;
background-color: #FFFFFF;
padding-top: 30px;
color: black;
float: left;
}
.navBox li {
.SideNav li {
margin: 10px 0 10px 0px;
}
.navBox ul, .navBox ol, .navBox li {
.SideNav ul, .SideNav ol, .SideNav li {
list-style-type: none;
}
.navBox ul li a {
.SideNav ul li a {
border-bottom: none;
color: black;
}
.navBox ul li a:hover {
.SideNav ul li a:hover {
font-weight: bold;
border-bottom: none;
}
.navBox a.current {
.SideNav a.current {
font-weight: bold;
text-decoration: underline;
}
@@ -203,6 +70,8 @@ div.related ul {
padding: 0;
}
/* -- LINKS --------------------------------------------------------------------------------------*/
a.reference {
border-bottom: none;
}
@@ -211,158 +80,7 @@ a.reference:hover {
text-decoration: none;
}
/* -- SIDEBAR TOC ----------------------------------------------------------------------------------*/
#toc h1 {
font-size: 20px;
font-weight: bold;
margin-left: 28px;
}
/* -- SMALL SCREEN ------------------------------------------------------------------------------- */
@media screen and (max-width: 875px){
/* Override strange behaviour caused by default styles */
body {
padding: 0;
}
div.footer {
display: block;
}
#siteBanner {
position: relative;
}
div.logocontainer {
width: 200px;
}
.linkcontainer a:not(:first-child) { /* Only display Learn CodeQL link on small screen */
display: none;
}
#title-banner a {
font-size: 5vw;
}
#searchbox-title-banner { /* Move searchbox from title banner to sidebar on small screen */
display: none;
}
#searchbox-navbar {
display: block;
float: left;
margin-right: 20px;
}
div.navBox {
position: relative;
width: 95%;
border-color: #2f1695;
padding-top: 10px;
}
#toc h1 { /* Slightly reposition the heading on small screens */
margin-left: 18px;
}
div.wrapper {
flex-direction: column;
height: 100%;
width: 100%;
padding-top: 0px;
}
div.mainBox {
margin: 0 10px 0 10px;
position: relative;
height: 100%;
width: 95%;
}
div.documentwrapper {
padding-left: 20px;
width:100%;
box-shadow: none;
margin: 0;
padding-left:0;
}
ul {
margin: 10px 20px 10px 20px;
}
div.privacy {
padding-right: 0%;
}
}
/* -- PRINT VIEW ----------------------------------------------------------------------------*/
@media print {
div.navBox {
display: none;
}
#siteBanner {
display: none;
}
div.wrapper {
/*margin-top:-100px;*/
flex-direction: column;
height: 100%;
width: 100%;
padding-top: 0px;
}
div.mainBox {
margin: 0 10px 0 10px;
position: relative;
height: 100%;
width: 100%;
}
div.documentwrapper {
padding-left: 20px;
width:100%;
box-shadow: none;
margin: 0;
padding-left:0;
}
body {
margin: 0;
padding: 0;
overflow: inherit;
width:95%;
}
div.body {
min-width: unset;
}
div.linkbar {
display: none;
}
.small-bar {
display: inherit;
}
ul {
margin: 10px 20px 10px 20px;
}
div.privacy {
display: none;
}
}
/* -- MAIN BODY ---------------------------------------------------------------------------- */
div.body {
max-width: 100%; /* overrule 800px in basic.css */
}
/* -- ADMONITIONS ---------------------------------------------------------------------------- */
/*
* Override default styling for "admonitions".
@@ -403,6 +121,8 @@ pre {
white-space: pre-wrap;
}
/* -- QL SYNTAX HIGHLIGHTING -------------------------------------------------- */
/*
* Use more appropriate colors for syntax highlighting
*
@@ -418,30 +138,20 @@ pre {
.highlight .kt { color: #7a65cd; font-weight: bold } /* built-in type keywords */
.highlight .kr { color: #333; font-style: italic } /* annotations */
/* -- SEARCH PAGE ---------------------------------------------------------------------------- */
div.context { /* hide rst search snippets */
display: none;
}
/* -- INDEX -------------------------------------------------------------------------------- */
/* -- INDEX ---------------------------------------------------------------------------------------- */
table.indextable li > a {
text-decoration: unset;
}
/* -- FOOTER ------------------------------------------------------------------------------- */
/* Adjust anchor targets to allow for the fixed banner */
div.documentwrapper a[name],
div.documentwrapper :target::before,
div.footnote-group a[name],
div.footnote-group :target::before
{
content: "";
display: block;
height: 78px; /* Height of banner */
margin-top: -78px; /* Prevent this showing as a gap */
}
/* -- ANCHOR LINKS ------------------------------------------------------------------------------- */
/* make anchor highlighting more sensible */
@@ -508,4 +218,39 @@ blockquote.pull-quote > :last-child {
.toggle .name.open:after {
content: " ▼";
}
/* -- PRINT VIEW ----------------------------------------------------------------------------*/
@media print {
div.SideNav {
display: none;
}
body {
margin: 0;
padding: 0;
overflow: inherit;
width:95%;
}
div.privacy {
display: none;
}
}
/* -- SMALL SCREEN ------------------------------------------------------------------------------- */
@media screen and (max-width: 875px) {
/* Overrides strange behaviour caused by default styles */
body {
padding: 0;
}
div.footer {
display: block;
}
}