toshiki-notebook/docs/.vitepress/theme/styles/custom.scss

381 lines
8.4 KiB
SCSS

// slim scroll bar for windows based web browsers - works on firefox
* {
scrollbar-color: var(--vp-c-divider-light) var(--vp-button-alt-bg);
scrollbar-width: thin;
}
// slim scroll bar for windows based web browsers - works on chrome, edge, and safari
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
// scrolling handle
::-webkit-scrollbar-thumb {
background: var(--vp-c-mute);
}
// handle on hover
::-webkit-scrollbar-thumb:hover {
background: var(--vp-button-alt-hover-bg);
}
// scrolling track/backgronund color
::-webkit-scrollbar-track {
background: var(--vp-button-alt-bg);
}
// tweak for removing webkit scrollbar's small corner square at the right buttom
::-webkit-scrollbar-corner {
background: transparent;
}
// slim scrollbar styles end
// responsible katex style with horizontal scroll on small screen devices
// fix katex display overflowing on small screen devices with horizontal scrollbar for viewing full formulas
.katex {
font-size: 1.05em;
direction: ltr;
}
.katex-display {
overflow: auto hidden;
-webkit-overflow-scrolling: touch;
padding-top: 0.2em;
padding-bottom: 0.2em;
&::-webkit-scrollbar {
height: 3px;
}
.katex {
font-size: 1.21em;
}
}
.katex-error {
color: #f00;
}
/* katex styles end */
/* custom responsive medium zoom component style */
.medium-zoom-overlay {
z-index: 20;
}
.medium-zoom-image {
z-index: 21;
}
.medium-zoom-image {
/* border-radius: 5px; */
align-items: center;
}
/* medium zoom style ends */
/* global border radius style for image within article container */
.VPDoc .content-container img {
border-radius: 5px;
}
/* image style ends */
/* fontawesome heart pumping styles */
.heart {
animation: heart 5s ease infinite;
color: red;
}
@keyframes heart {
0% {
transform: scale(1);
}
5% {
transform: scale(1.25);
}
20% {
transform: scale(1);
}
30% {
transform: scale(1);
}
35% {
transform: scale(1.25);
}
50% {
transform: scale(1);
}
55% {
transform: scale(1.25);
}
70% {
transform: scale(1);
}
}
/* font awesome heart pumping style ends */
// font awesome coffee brown color style
.coffee {
color: rgb(88, 13, 13);
}
// font awesome coffee brown color style ends
/* glonal code font styles */
pre,
code,
kbd,
samp {
font-family: var(--vp-font-family-mono);
}
/* global code font styles ends */
// specify vitepress home hero image's width to 300 px for preventing image overlapping on text
img.VPImage.image-src {
width: 300px;
}
// hero image sytles ends
// aligning homepage team member section vertically in straight line
.vp-doc > div {
width: 100%;
}
// team member section styles end
// set maximum document width for better mobile viewing experience instead of letting text clustered altogether at a small width
@media (min-width: 1440px) {
.VPDoc.has-aside .content-container.content-container {
max-width: 100%;
}
}
.vp-doc p a + a {
margin-left: 17px;
}
// maximum document width style ends
// vitepress navbar title line breaking issue tweak
@media (max-width: 1080px) {
:root {
--vp-sidebar-width: 260px;
}
.VPNav {
// refering solutions by https://cn.vuejs.org
.DocSearch-Button-Placeholder {
display: none;
}
.VPNavBarMenuLink,
.VPNavBarMenuGroup .button {
padding-left: 10px;
padding-right: 10px;
}
}
}
@media (max-width: 992px) {
.VPNav {
.VPNavBar {
padding-left: 24px;
padding-right: 24px;
}
.VPNavBarMenuLink,
.VPNavBarMenuGroup .button {
padding-left: 8px;
padding-right: 8px;
}
}
}
@media (max-width: 800px) {
.VPNav {
.VPNavBarSearch {
padding-left: 16px;
}
.VPNavBarMenuLink,
.VPNavBarMenuGroup .button {
padding-left: 6px;
padding-right: 6px;
}
}
}
// menu new-lining issue on title
.VPMenuGroup .title {
white-space: nowrap;
}
// vitepress navbar style ends
// VP Footer .VPFooter {
// z-index: none;
// }
// remove search box footer text
.DocSearch-Logo {
display: none;
}
// remove search box footer text section styles ends
.link-preview-widget {
display: table;
width: 100%;
border: 2px solid rgba(55, 53, 47, 0.16);
border-radius: 5px;
}
.link-preview-widget-title {
font-size: 16px;
font-weight: 700;
display: -webkit-box;
overflow: hidden;
margin-bottom: 8px;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.link-preview-widget-description {
font-size: 12px;
font-style: normal;
line-height: 1.5;
display: -webkit-box;
overflow: hidden;
max-height: 3em;
margin-bottom: 4px;
word-break: break-all;
color: rgba(55, 53, 47, 0.65);
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.link-preview-widget-url {
font-size: 12px;
font-style: normal;
line-height: 1.5;
display: block;
margin-bottom: 0;
color: rgba(55, 53, 47, 0.65);
}
.link-preview-widget > a {
text-decoration: none !important;
display: table-cell;
flex-direction: column;
padding: 16px;
cursor: pointer;
vertical-align: middle;
color: inherit;
background-color: transparent;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-box-flex: 1;
flex: 1;
transition: background-color 0.2s ease-in-out;
border-radius: 5px;
// border-style: solid;
// border-color: rgba(55, 53, 47, 0.16); // background color: var(--vp-c-text-light-1)
// border-right: none;
}
.link-preview-widget > a:hover {
background-color: var(--vp-custom-block-tip-bg);
}
.link-preview-widget-image {
width: 260px;
min-width: 220px;
height: 150px;
padding: 0;
vertical-align: middle;
border-left: 1px rgba(55, 53, 47, 0.16) #f2f2f2;
border-radius: 5px;
background-repeat: no-repeat;
background-position: 50%;
background-size: cover;
-webkit-box-flex: 0;
flex: 0;
// border-left: none;
}
// dark theme text & url color scheme var(--vp-c-text-2) for text color
html.dark {
.link-preview-widget {
display: table;
width: 100%;
border: 2px solid rgba(200, 202, 208, 0.16);
border-radius: 5px;
}
.link-preview-widget-title {
font-size: 16px;
font-weight: 700;
display: -webkit-box;
overflow: hidden;
margin-bottom: 8px;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.link-preview-widget-description {
font-size: 12px;
font-style: normal;
line-height: 1.5;
display: -webkit-box;
overflow: hidden;
max-height: 3em;
margin-bottom: 4px;
word-break: break-all;
color: var(--vp-c-text-2);
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.link-preview-widget-url {
font-size: 12px;
font-style: normal;
line-height: 1.5;
display: block;
margin-bottom: 0;
color: var(--vp-c-text-2);
}
.link-preview-widget > a {
text-decoration: none !important;
display: table-cell;
flex-direction: column;
padding: 16px;
cursor: pointer;
vertical-align: middle;
color: inherit;
background-color: transparent;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-box-flex: 1;
flex: 1;
transition: background-color 0.2s ease-in-out;
// border-style: solid;
// border-color: rgba(55, 53, 47, 0.16); // background color: var(--vp-c-text-light-1)
// border-right: none;
}
.link-preview-widget > a:hover {
background-color: var(--vp-custom-block-tip-bg);
}
.link-preview-widget-image {
width: 260px;
min-width: 220px;
height: 150px;
padding: 0;
vertical-align: middle;
border-left: 1px rgba(200, 202, 208, 0.16) #f2f2f2;
border-radius: 5px;
background-repeat: no-repeat;
background-position: 50%;
background-size: cover;
-webkit-box-flex: 0;
flex: 0;
// border-left: none;
}
}
// link preview markdown-it plugin dark mode style ends