clearml-docs/src/css/custom.css
2023-02-22 12:29:36 +02:00

903 lines
20 KiB
CSS

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
html {
scroll-behavior: smooth;
}
:root {
--ifm-color-primary: #14aa8c;
--ifm-color-primary-dark: #109177;
--ifm-color-primary-darker: #0d7560;
--ifm-color-primary-darkest: #085344;
--ifm-color-primary-light: #17c5a2;
--ifm-color-primary-lighter: #2edfbb;
--ifm-color-primary-lightest: #51f1d1;
--ifm-toc-background-color: #141722;
--ifm-code-font-size: 95%;
--search-local-modal-width: 480px;
--ifm-navbar-item-padding-horizontal: 1rem;
--ifm-hr-margin-vertical: 4rem;
--max-page-width: 1600px;
--docusaurus-announcement-bar-height: 40px !important;
--ifm-link-color: var(--ifm-color-primary-darker);
--ifm-code-font-size: 85%;
--ifm-code-padding-horizontal: 0.3rem;
--ifm-code-padding-vertical: 0.2rem;
}
html[data-theme="dark"] {
--ifm-background-color: #1a1e2c;
--ifm-footer-background-color: #1a1e2c;
--ifm-footer-link-color: #a4a5aa;
--ifm-footer-link-hover-color: #14aa8c;
--ifm-dropdown-background-color: #2c3246;
--ifm-table-stripe-background: #141722;
--ifm-link-color: var(--ifm-color-primary-light);
}
@media (min-width: 1400px) {
/* Expand sidebar width above 1400px */
html[data-theme="light"],
html[data-theme="dark"] {
--doc-sidebar-width: 400px;
}
}
/* ===LAYOUT=== */
a {
text-underline-offset: 4px;
}
html[data-theme="dark"] a:hover {
color: var(--ifm-color-primary-lightest);
}
.max-w-75 {
max-width: 75%;
}
.max-w-50 {
max-width: 50%;
}
.max-w-25 {
max-width: 25%;
}
/* sidebar & content in the center of the page */
.navbar__inner,
.main-wrapper > div {
margin: 0 auto;
max-width: var(--max-page-width);
}
/* Scrollbar style in dark-mode */
html[data-theme="dark"] ::-webkit-scrollbar-thumb {
background: #565b6b;
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
background: #70778b;
}
html[data-theme="dark"] ::-webkit-scrollbar-track {
background: transparent;
}
/* Announcement Bar (above header) */
div[role="banner"] {
height: var(--docusaurus-announcement-bar-height);
display: flex;
align-items: center;
justify-content: center;
}
div[role="banner"] > div {
padding-left: 55px;
}
html[data-theme="light"] div[role="banner"] {
background-color: #0b2471 !important;
color: #fff !important;
border-bottom:1px solid rgba(255,255,255,0.1);
}
html[data-theme="dark"] div[role="banner"] {
background-color: #141722 !important;
color: #fff !important;
border-bottom:1px solid rgba(255,255,255,0.1);
}
.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
/* ===NAVBAR=== */
.navbar--dark {
background-color: #09173C;
}
html[data-theme="dark"] .navbar--dark {
background-color: #151722;
}
.navbar--dark.navbar .navbar__toggle {
color: white; /* opener icon color */
}
/* ===HEADER=== */
/* header content */
html[data-theme="light"] .hero--primary {
background: linear-gradient(to bottom, #09173c, #09173c 20%, #18378b 50%, #22408a);
}
html[data-theme="dark"] .hero--primary {
background: linear-gradient(to bottom, #151722, #192341 20%, #18378b 50%, #22408a);
}
.hero-intro {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-areas: "hero-title hero-figure";
align-items: center;
}
.hero-title {
grid-area: hero-title;
}
.hero-figure {
grid-area: hero-figure;
animation-duration: 2s;
animation-name: inTheBox;
}
.hero-figure img {transition: max-width 0.8s;}
@media only screen and (max-width: 768px) {
.hero-intro {
grid-template-columns: 1fr;
grid-template-areas: "hero-figure" "hero-title";
}
.hero-figure img {
max-width: 300px;
}
}
@keyframes inTheBox {
from {
opacity: 0;
transform: scale(0.1) rotate(30deg);
transform-origin: center bottom;
}
50% {
transform: rotate(-10deg);
}
70% {
transform: rotate(3deg);
}
to {
opacity: 1;
transform: scale(1);
}
}
@media only screen and (min-width: 767px) {
.hero--primary h1 {
text-align: left;
}
}
img[class^="heroLogo"] {
width: 300px;
}
.hero .button {
position:relative;
top:0;
}
.hero .button:active {
top:1px;
}
.hero .button.button--secondary.button--outline:not(.button--active):not(:hover) {
color:#fff;
}
.hero .button.button--primary {
background-color: #afe61e;
border-color: #afe61e;
}
.hero .button.button--primary:hover {
background-color: #c0f830;
border-color: #c0f830;
box-shadow: none !important;
}
.button.button--rounded {
border-radius: 6rem;
}
html[data-theme="light"] .hero .button.button--primary{
color: var(--ifm-color-primary-darkest);
}
.col--feature {
margin-top: 3rem;
}
.col--feature h3 {
color: var(--ifm-color-primary);
}
.col--feature img {
height: 84px;
width: auto;
}
.col--feature h3,
.col--feature p {
padding-left: 0.5rem;
}
/* header social icons */
.header-ico--github {
background-image: url('/img/ico-github.svg');
margin-right: calc(var(--ifm-navbar-item-padding-horizontal) * 2);
}
.header-ico--twitter {
background-image: url('/img/ico-twitter.svg');
}
.header-ico--youtube {
background-image: url('/img/ico-youtube.svg');
}
.header-ico--slack {
background-image: url('/img/ico-slack.svg');
}
.header-ico {
width:24px;
height:24px;
padding:0 calc(var(--ifm-navbar-item-padding-horizontal) * 1.2);
background-repeat: no-repeat;
background-position: center;
background-size: 24px;
}
.header-ico:hover {
opacity: 0.8;
}
/* social icon tooltip */
.header-ico[aria-label]:hover:after {
opacity: 1;
transition: opacity 0.25s ease, visibility 0.25s ease;
visibility: visible;
}
.header-ico[aria-label]:after {
content: attr(aria-label);
padding: 0.5rem 1rem;
color: #fff;
background-color: #10141f;
border-radius: 4px;
font-size: 0.875rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -4rem;
z-index: 100;
white-space: nowrap;
opacity: 0;
visibility: hidden;
}
.header-ico[aria-label] {
position: relative;
display: flex;
align-items: center;
}
@media (max-width: 996px) {
.header-ico--github {
margin-right: 12rem;
}
}
@media (max-width: 768px) {
.header-ico[aria-label] {
display:none;
}
}
/* ===SIDEBAR=== */
@media (min-width: 997px) {
[class^="sidebarLogo"] {
padding:0 1rem;
margin: 0 !important;
}
html[data-theme="dark"] .docSidebarContainer_node_modules-\@docusaurus-theme-classic-lib-next-theme-DocPage- {
border-right-color: rgba(255,255,255,0.1) !important;
}
}
html[data-theme="light"] [class^="sidebarLogo"] {
background: url('/img/logo--on-light.svg') 1rem center no-repeat;
background-size: 6rem;
}
html[data-theme="light"] [class^="sidebarLogo"] > img {
visibility: hidden;
}
.menu__list {
font-size: 0.875rem;
}
.menu__link--sublist:after {
background-size: 1.25rem;
background-repeat: no-repeat;
}
.navbar-sidebar .navbar-sidebar__back {color: var(--ifm-link-color);}
html[data-theme="dark"] .menu__link--active {
color: var(--ifm-color-primary-lighter);
}
html[data-theme="light"] .menu__link:not(.menu__link--active) {
color: #606a78;
}
/* ===NAV-SIDEBAR=== */
html[data-theme="light"] .navbar-sidebar {
background-color: white;
}
html[data-theme="dark"] .navbar-sidebar {
background-color: #141722;
}
html[data-theme="light"] .navbar-sidebar .navbar__brand {
background: url('/img/logo--on-light.svg') 0 center no-repeat;
background-size: 5.5rem;
}
html[data-theme="light"] .navbar-sidebar .navbar__logo {
visibility: hidden;
}
html[data-theme="dark"] .menu--show {
background-color: #141722;
}
.navbar-sidebar .menu__link.header-ico--slack {
margin-top:3rem;
}
.navbar-sidebar .menu__link.header-ico--slack:before {
content: "";
position:absolute;
left:0;
top:-1.8rem;
height:1px;
width: var(--ifm-navbar-sidebar-width);
}
html[data-theme="light"] .navbar-sidebar .menu__link.header-ico--slack:before {
background-color: rgba(0,0,0,0.1);
}
html[data-theme="dark"] .navbar-sidebar .menu__link.header-ico--slack:before {
background-color: rgba(255,255,255,0.1);
}
.navbar-sidebar .menu__link.header-ico--slack:hover {
background: url('/img/ico-slack.svg') no-repeat center;
}
.navbar-sidebar .menu__link.header-ico--twitter:hover {
background: url('/img/ico-twitter.svg') no-repeat center;
}
.navbar-sidebar .menu__link.header-ico--github:hover {
background: url('/img/ico-github.svg') no-repeat center;
}
.navbar-sidebar .menu__link.header-ico--youtube:hover {
background: url('/img/ico-youtube.svg') no-repeat center;
}
.menu__link.header-ico {
margin: 1rem 0 0 0.5rem;
background-size: 20px;
}
.menu__link.header-ico[aria-label]:after {
position: static;
color: white;
transform: unset;
background: unset;
padding: 0 0 0 1.5rem;
opacity: 1;
visibility: visible;
}
html[data-theme="light"] .menu__link.header-ico {
filter: brightness(0.5);
}
/* ===TABLE OF CONTENT=== */
/* _toc */
.table-of-contents {
padding:1rem;
border-radius: 6px;
}
html[data-theme="light"] .table-of-contents {
box-shadow: 0 0 0 2px rgba(0,0,0,0.1) inset;
}
html[data-theme="dark"] .table-of-contents {
background-color: var(--ifm-toc-background-color);
box-shadow: 0 0 0 2px rgba(0,0,0,0.4) inset;
}
html[data-theme="dark"] a.table-of-contents__link--active {
color: var(--ifm-color-primary-light);
}
.table-of-contents__left-border {
border:none;
}
a.table-of-contents__link--active:before {
content: "";
position: absolute;
left: 0;
height: 10px;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-left: 6px solid var(--ifm-color-primary);
transform: translateY(5px);
}
html[data-theme="light"] .table-of-contents__link:not(.table-of-contents__link--active) {
color: rgba(0,0,0,0.9);
}
/* toc: show "..." inside code tag */
.table-of-contents code {
width: 22px;
margin: 0 6px;
padding: 0;
overflow: hidden;
white-space: nowrap;
color: transparent;
background: transparent;
vertical-align: middle;
display: inline-block;
}
.table-of-contents code:before {
content: "...";
color: var(--ifm-color-primary-darker);
}
/* ===FOOTER=== */
.footer__item {
font-size: 0.875rem;
}
.footer__copyright {
font-size: 0.75rem;
}
html[data-theme="light"] .footer {
border-top: 1px solid rgba(0,0,0,0.1);
}
html[data-theme="dark"] .footer {
border-top: 1px solid rgba(255,255,255,0.1);
}
html[data-theme="dark"] .footer__copyright {
color: rgba(255,255,255,0.4);
}
/* Search bar */
.navbar--dark .navbar__search-input {
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="16px" width="16px"><path d="M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z" fill="rgba(255,255,255,0.5)" /></svg>')
}
/* GLOBAL SEARCH PAGE */
html[data-theme="dark"] input[class^="searchQueryInput"] {
color: #fff;
background-color: #141722;
border-color: #fff3;
padding: 1rem;
}
/* social links icons */
.footer__link-item[href*="slack"] {
padding-left: 1.4rem;
background: url('/img/ico-slack.svg') no-repeat left center;
background-size: 1rem;
}
.footer__link-item[href*="youtube"] {
padding-left: 1.4rem;
background: url('/img/ico-youtube.svg') no-repeat left center;
background-size: 1rem;
}
.footer__link-item[href*="twitter"] {
padding-left: 1.4rem;
background: url('/img/ico-twitter.svg') no-repeat left center;
background-size: 1rem;
}
.footer__link-item[href*="stackoverflow"] {
padding-left: 1.4rem;
background: url('/img/ico-stackoverflow.svg') no-repeat left center;
background-size: 1rem;
}
html[data-theme="light"] .footer__link-item[href*="slack"],
html[data-theme="light"] .footer__link-item[href*="youtube"],
html[data-theme="light"] .footer__link-item[href*="twitter"],
html[data-theme="light"] .footer__link-item[href*="stackoverflow"] {
filter: brightness(0.5);
}
html[data-theme="dark"] .footer__link-item:hover {
color: var(--ifm-color-primary-lighter);
}
/* ===MARKDOWN=== */
.markdown img.medium-zoom-image[src*="png"],
.markdown img.medium-zoom-image[src*="gif"] {
border:1px solid #2c3246;
}
.getting-started-buttons > .col {
margin-top: 1rem;
}
.getting-started-buttons .button {
font-size: 1rem;
padding: 1rem;
white-space: unset; /* allow wrap text when minimize */
}
.wb-normal [class^='codeBlockLines'] {
white-space: normal;
}
/* disable medium-zoom-image on svg icons */
.markdown img.medium-zoom-image[src*="svg"] {
pointer-events: none;
}
/* table */
.markdown table {
border-spacing: 0;
border-collapse: separate;
}
.markdown thead th {
text-align: left;
font-size: var(--ifm-h6-font-size);
}
.markdown thead th:not(:last-child) {
border-right: none;
}
.markdown table tbody td:not(tr:last-child td) {
border-bottom: none;
}
.markdown table tbody td:not(:last-child) {
border-right: none;
}
.markdown table thead tr:first-child th:first-child {
border-top-left-radius: var(--ifm-card-border-radius);
}
.markdown table thead tr:first-child th:last-child {
border-top-right-radius: var(--ifm-card-border-radius);
}
.markdown table tbody tr:last-child td:first-child {
border-bottom-left-radius: var(--ifm-card-border-radius);
}
.markdown table tbody tr:last-child td:last-child {
border-bottom-right-radius: var(--ifm-card-border-radius);
}
.markdown table code {
font-size: 12px;
}
@media only screen and (min-width: 1400px) {
.tbl-cmd tbody tr td:first-child code {
white-space: nowrap;
}
}
html[data-theme="dark"] .markdown thead th {
color: var(--ifm-color-gray-600);
}
html[data-theme="light"] .markdown table td {
border-color: rgba(0,0,0,0.2);
}
html[data-theme="dark"] .markdown table th {
border-color: var(--ifm-color-gray-800);
}
html[data-theme="dark"] .markdown table td {
border-color: var(--ifm-color-gray-800);
}
/* icons */
.icon {
position: relative;
vertical-align: middle;
transform: translateY(-2px);
}
.icon.lt {
filter: brightness(0.5);
}
.icon.size-sm {
width: 16px;
height: 16px;
}
.icon.size-md {
width: 24px;
height: 24px;
}
.icon.size-lg {
width: 32px;
height: 32px;
}
html[data-theme="light"] .icon {
filter: brightness(0.8);
}
.space-sm {
margin: 0 0.5rem;
}
.space-md {
margin: 0 1rem;
}
.space-lg {
margin: 0 1.5rem;
}
.center-md {
left: calc(50% - 10px);
}
/* light mode */
html[data-theme="light"] .cml-expansion-panel[open] {
border-left-color: var(--ifm-color-primary);
}
html[data-theme="light"] .cml-expansion-panel,
html[data-theme="light"] .cml-expansion-panel-summary:before {
background-color: #f2f2f2;
}
html[data-theme="light"] .cml-expansion-panel-summary {
color: #5a668d;
}
/* opened expansion */
.cml-expansion-panel[open] {
border-left-color: var(--ifm-color-primary-dark);
}
.cml-expansion-panel[open] .cml-expansion-panel-summary:after {
transform: rotate(-180deg);
}
/* md headding style */
/* <h3> */
.markdown h3 {
font-size: 1.6rem;
}
html[data-theme="light"] h3 {
color: var(--ifm-color-primary-darker);
}
html[data-theme="dark"] h3 {
color: var(--ifm-color-primary-lightest);
}
/* <h4> */
.markdown h4 {
font-size: 1.3rem;
}
html[data-theme="light"] h4 {
color: #62b00d;
}
html[data-theme="dark"] h4 {
color: #83de1f;
}
/* <hr> */
.markdown hr {
border-bottom: none;
}
html[data-theme="dark"] .markdown hr {
border-color: rgba(255,255,255,0.1);
}
/* admonition */
.admonition {
overflow: hidden;
border:none;
font-size: 0.875rem;
padding: 0.875rem;
}
.admonition .admonition-heading {
margin: -1rem -1rem 1rem -1rem;
padding: 0.45rem 0.75rem 0.05rem 0.75rem;
background: rgba(255,255,255,0.2);
}
.admonition .admonition-icon {
margin-right: 0.5rem;
}
.admonition .admonition-heading h5 {
display: flex;
align-items: center;
font-size: 0.75rem;
line-height: normal;
margin-bottom: 0.25rem;
}
.admonition-content code {
font-size: 0.75rem;
}
.admonition-content .link-code a {
color: var(--ifm-color-primary);
text-decoration: none;
}
.admonition-content .link-code a:hover {
text-decoration: underline;
}
/* admonition note */
html[data-theme="light"] .alert.alert--secondary {
background-color: #efefef;
}
html[data-theme="dark"] .alert.alert--secondary {
background-color: var(--ifm-toc-background-color);
}
/* show visual identification for external links */
.markdown a[href^="https://"] {
background: url('/icons/ico-open-in-new.svg') center right no-repeat;
background-size: 0.9rem;
margin-right: 0.4rem;
padding-right: 1rem;
}
.markdown .img-swt {
margin-bottom: 2.4rem;
}
/* PANEL COLLAPSIBLE */
.panel {
margin-bottom: 12px;
padding: 0;
border: 1px solid;
border-radius: var(--ifm-global-radius);
box-shadow: none;
overflow: hidden;
}
/* PANEL COLORS */
.panel.info {
background-color: var(--ifm-color-info-contrast-background);
border-color: var(--ifm-color-info-lightest);
}
html[data-theme="dark"] .panel.info {
border-color: var(--ifm-color-info-darkest);
}
.panel.tips {
background-color: var(--ifm-color-success-contrast-background);
border-color: var(--ifm-color-success-dark);
}
.panel.alert {
background-color: var(--ifm-color-warning-contrast-background);
border-color: var(--ifm-color-warning-dark);
}
.panel.screenshot {
background-color: var(--ifm-color-gray-100);
border-color: var(--ifm-color-gray-600);
}
html[data-theme="dark"] .panel.screenshot {
background-color: var(--ifm-toc-background-color);
border-color: rgba(255,255,255,0.1);
}
.panel.configuration {
background-color: var(--ifm-color-gray-100);
border-color: var(--ifm-color-gray-600);
}
html[data-theme="dark"] .panel.configuration {
background-color: var(--ifm-toc-background-color);
border-color: rgba(255,255,255,0.1);
}
/* PANEL TITLE */
.panel-title {
display: flex;
align-items: center;
width: 100%;
margin: 0;
padding: 12px;
position: relative;
cursor: pointer;
font-size: 16px;
text-align: left;
background-color: inherit;
border: none;
color: var(--ifm-font-color-base);
}
.panel-title:after {
content:"";
position: absolute;
right: 12px;
top: calc(50% - 12px);
width: 24px;
height: 24px;
transform: rotate(0);
transition: transform 0.35s;
background: url('/icons/ico-chevron-down.svg') no-repeat center;
}
.panel-open .panel-title:after {
transform: rotate(-180deg);
}
/* PANEL CONTENT */
.panel-content {
padding: 12px 40px;
max-height: unset;
overflow: hidden;
transition: padding 0.35s;
}
.panel-close .panel-content {
padding: 0 40px;
max-height: 0;
}
/* PANEL ICONS */
/* info */
.panel.info .panel-title:before {
background-image: url('/icons/ico-info-circle.svg');
}
/* tips */
.panel.tips .panel-title:before {
background-image: url('/icons/ico-tips.svg');
}
/* alert */
.panel.alert .panel-title:before {
background-image: url('/icons/ico-alert.svg');
}
/* screenshot */
.panel.screenshot .panel-title:before {
background-image: url('/icons/ico-image.svg');
}
/* configuration */
.panel.configuration .panel-title:before {
background-image: url('/icons/ico-config.svg');
}
/* panel icon generic style */
.panel-title:before {
content:"";
display: flex;
align-items: center;
justify-content: center;
margin-right: 6px;
width: 24px;
height: 24px;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
}