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

Removes inline scripts and inline styles to make it compatible with the newly added security headers #4369

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open
49 changes: 28 additions & 21 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
/* Prevents two-dimensional scrolling and content loss. */
h1, code, li {
h1,
code,
li {
overflow-wrap: break-word;
}
/* Provides padding to push down the "breadcrumb" navigation in nested pages. */
.content{
.content {
padding: 1em 3em;
}
/* Improves spacing around custom sidebar section*/
.sidebar-div{
.sidebar-div {
margin: var(--sidebar-caption-space-above) 0 0 0;
padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);
padding: var(--sidebar-item-spacing-vertical)
var(--sidebar-item-spacing-horizontal);
}
/* Custom sidebar heading text. Example: Feedback Section heading. */
.sidebar-heading{
.sidebar-heading {
color: var(--color-sidebar-caption-text);
font-size: var(--font-size--normal);
font-weight: 700;
}
/* Improves text used in custom sidebar section. Example: Feedback section content.*/
.sidebar-text{
.sidebar-text {
color: var(--color-sidebar-caption-text);
font-size: var(--sidebar-item-font-size);
line-height: 1.4;
}
/* Removes empty space above the sidebar-tree (under "Feedback" section) */
.sidebar-tree{
.sidebar-tree {
margin-top: 0px;
}
/* Adds padding around AWS Logo in the left sidebar. */
.sidebar-logo{
.sidebar-logo {
padding: 20% 15%;
}
/* Hides a div by default. */
Expand All @@ -52,7 +55,7 @@ h1, code, li {
visibility: hidden;
}
/* Hides the icon by default and applies relevant styling. */
.nav-close-icon{
.nav-close-icon {
color: var(--color-foreground-secondary);
display: flex;
align-items: center;
Expand All @@ -73,24 +76,24 @@ h1, code, li {
}
}
@media (max-width: 82em) {
/* Displays a div on a medium screen. */
/* Displays a div on a medium screen. */
.show-div-md {
display: flex;
}
}
/* Apply furo styled admonition titles for <h3>. */
h3.admonition-title {
position: relative;
margin: 0 -0.5rem 0.5rem;
padding-left: 2.5rem;
padding-right: .5rem;
padding-top: .4rem;
padding-bottom: .4rem;
font-weight: 700;
font-size: 1.5em;
line-height: 1.25;
border-radius: unset;
background-color: var(--color-admonition-title-background);
position: relative;
margin: 0 -0.5rem 0.5rem;
padding-left: 2.5rem;
padding-right: 0.5rem;
padding-top: 0.4rem;
padding-bottom: 0.4rem;
font-weight: 700;
font-size: 1.5em;
line-height: 1.25;
border-radius: unset;
background-color: var(--color-admonition-title-background);
}
/* Apply furo styled admonition icons before <h3>. */
h3.admonition-title::before {
Expand All @@ -103,3 +106,7 @@ h3.admonition-title::before {
mask-image: var(--icon-admonition-default);
mask-repeat: no-repeat;
}
/* Hides an element by removing it from the document flow */
.hidden {
display: none;
}
20 changes: 20 additions & 0 deletions docs/source/_static/css/dark_light_mode.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
body {
--color-code-background: #f8f8f8;
--color-code-foreground: black;
}

/* Dark theme styles */
@media not print {
body[data-theme="dark"] {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}

/* For users who prefer dark color scheme */
@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) {
--color-code-background: #272822;
--color-code-foreground: #f8f8f2;
}
}
}
Loading
Loading