mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
3926cc0220
* refactor: CSS variables to use fixit-var for consistency across styles * refactor: reorganize CSS structure and consolidate imports for improved maintainability * refactor: unify CSS variable usage and improve structure across stylesheets * refactor: standardize CSS variable usage for layout * refactor: standardize CSS variable usage for archive and special pages * refactor: standardize CSS variable usage for single page * refactor: standardize CSS variable usage for widgets * refactor(css): refactors the border-radius mixin and adds the .rounded-full utility class * refactor: standardize z-index usage across components * refactor(css): removes deprecated compatibility mixins and replaces them with native CSS properties * feat: unify color variable naming and update theme color values - Rename `global-font-secondary-color` to `global-placeholder-color` for more accurate description of its purpose - Update multiple style references to use the new `secondary` theme color variable - Update theme color mapping to the new color values for improved visual consistency - Fixed the use of search box placeholder colors and removed hard-coded transparency values - Added color preview test documentation for easier verification of color rendering - Cleaned up some duplicate dark mode styles and replaced them with unified CSS variables * refactor: remove the `hr-background-color` variable and uses `global-border-color` uniformly * feat(CSE): add dark theme style to Google CSE search box and results container * fix(task-lists): fixed styling and rendering issues with nested task lists
273 lines
5.5 KiB
SCSS
273 lines
5.5 KiB
SCSS
@media only screen and (min-width: 1441px) {
|
|
%page-style {
|
|
width: ROUND(60%, 2px);
|
|
max-width: 1200px;
|
|
|
|
[data-page-style='wide'] & {
|
|
width: ROUND(64%, 2px);
|
|
max-width: 1600px;
|
|
}
|
|
|
|
[data-page-style='narrow'] & {
|
|
max-width: 800px;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 1440px) {
|
|
%page-style {
|
|
width: ROUND(56%, 2px);
|
|
|
|
[data-page-style='wide'] & {
|
|
width: ROUND(60%, 2px);
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (min-width: 1201px) {
|
|
.single .content {
|
|
:is(.code-block, .diagram-container) {
|
|
:is(.code-copy-btn, .diagram-copy-btn) {
|
|
display: none;
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
transition:
|
|
display 0.25s allow-discrete,
|
|
opacity 0.25s,
|
|
transform 0.25s,
|
|
color 0.1s,
|
|
background-color 0.1s,
|
|
box-shadow 0.1s,
|
|
border-color 0.1s;
|
|
}
|
|
&:hover {
|
|
:is(.code-copy-btn, .diagram-copy-btn) {
|
|
display: block;
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
@starting-style {
|
|
opacity: 0;
|
|
transform: scale(0.9);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 1200px) {
|
|
%page-style {
|
|
width: ROUND(52%, 2px);
|
|
|
|
[data-page-style='wide'] & {
|
|
width: ROUND(56%, 2px);
|
|
}
|
|
}
|
|
|
|
#header-desktop .header-wrapper {
|
|
padding-right: 1rem;
|
|
}
|
|
|
|
.search-dropdown.desktop {
|
|
right: 1rem;
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 1200px) and (min-width: 961px) {
|
|
.wrapper {
|
|
main {
|
|
// Hide empty aside and expand article when only one aside is empty
|
|
aside:first-child:empty:has(~ aside:not(:empty)),
|
|
aside:first-child:not(:empty) ~ aside#toc-auto:empty {
|
|
display: none;
|
|
}
|
|
|
|
aside:first-child:empty:has(~ aside:not(:empty)) ~ article,
|
|
aside:first-child:not(:empty) ~ article:has(~ aside:empty) {
|
|
flex: 3;
|
|
}
|
|
}
|
|
|
|
// Adjust breadcrumb flex when asides are empty
|
|
&:has(main > aside:first-child:empty ~ aside:not(:empty)) .breadcrumb-container {
|
|
.breadcrumb {
|
|
flex: 3;
|
|
}
|
|
|
|
&::before {
|
|
display: none;
|
|
}
|
|
}
|
|
&:has(main > aside:first-child:not(:empty) ~ aside#toc-auto:empty) .breadcrumb-container {
|
|
.breadcrumb {
|
|
flex: 3;
|
|
}
|
|
|
|
&::after {
|
|
display: none;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 960px) {
|
|
%page-style {
|
|
width: ROUND(80%, 2px) !important;
|
|
}
|
|
|
|
aside,
|
|
.breadcrumb-container::before,
|
|
.breadcrumb-container::after {
|
|
display: none !important;
|
|
}
|
|
|
|
#toc-static {
|
|
display: block;
|
|
}
|
|
|
|
#header-desktop .header-wrapper {
|
|
padding-left: 1rem;
|
|
}
|
|
}
|
|
|
|
@media only screen and (min-width: 681px) {
|
|
.d-none-desktop {
|
|
display: none;
|
|
}
|
|
.breadcrumb-container.sticky {
|
|
body:not([data-header-desktop='sticky']) & {
|
|
top: 0;
|
|
}
|
|
// adjust the scroll margin top of the content anchors on the page
|
|
body:not([data-header-desktop='auto']) &+.fi-container .content [id] {
|
|
scroll-margin-top: calc(#{fixit-var(scroll-mt)} + #{fixit-var(breadcrumb-height)});
|
|
}
|
|
}
|
|
|
|
[data-header-desktop='normal'] .page .content [id] {
|
|
@include set-fixit-var(scroll-mt, fixit-var(global-scroll-margin-top));
|
|
}
|
|
[data-header-desktop='normal'] {
|
|
#toc-auto,
|
|
.aside-collection {
|
|
top: 0;
|
|
}
|
|
}
|
|
[data-header-desktop='sticky'] {
|
|
.page .content .highlight.code-block .code-header {
|
|
top: calc(#{fixit-var(header-height)} + #{fixit-var(breadcrumb-height)});
|
|
}
|
|
}
|
|
}
|
|
|
|
@media only screen and (max-width: 680px) {
|
|
#header-desktop {
|
|
display: none;
|
|
}
|
|
|
|
#header-mobile {
|
|
display: block;
|
|
}
|
|
|
|
.d-none-mobile {
|
|
display: none !important;
|
|
}
|
|
|
|
.breadcrumb-container.sticky {
|
|
body:not([data-header-mobile='sticky']) & {
|
|
top: 0;
|
|
}
|
|
// adjust the scroll margin top of the content anchors on the page
|
|
body:not([data-header-mobile='auto']) &+.fi-container .content [id] {
|
|
scroll-margin-top: calc(#{fixit-var(scroll-mt)} + #{fixit-var(breadcrumb-height)});
|
|
}
|
|
}
|
|
|
|
[data-header-mobile='normal'] .page .content [id] {
|
|
@include set-fixit-var(scroll-mt, fixit-var(global-scroll-margin-top));
|
|
}
|
|
[data-header-mobile='normal'] {
|
|
#toc-auto,
|
|
.aside-collection {
|
|
top: 0;
|
|
}
|
|
}
|
|
[data-header-mobile='sticky'] {
|
|
.page .content .highlight.code-block .code-header {
|
|
top: calc(#{fixit-var(header-height)} + #{fixit-var(breadcrumb-height)});
|
|
}
|
|
}
|
|
|
|
%page-style {
|
|
width: 100% !important;
|
|
}
|
|
|
|
.page {
|
|
.taxonomy-cards {
|
|
.card-item {
|
|
width: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
footer {
|
|
.footer-container {
|
|
font-size: 0.618rem;
|
|
}
|
|
}
|
|
|
|
.pagination .page-item {
|
|
margin: 0 5px;
|
|
}
|
|
}
|
|
|
|
@media only print {
|
|
|
|
// 确保打印时没有 scrollbar
|
|
:root {
|
|
@include set-fixit-var(scrollbar-width, none !important);
|
|
}
|
|
|
|
*::-webkit-scrollbar {
|
|
display: none !important;
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
}
|
|
|
|
.scrollbar-thin {
|
|
scrollbar-width: none !important;
|
|
-ms-overflow-style: none !important;
|
|
}
|
|
|
|
@page {
|
|
size: A4 portrait;
|
|
margin: 1.27cm;
|
|
}
|
|
|
|
.page {
|
|
width: 100% !important;
|
|
padding-top: 0 !important;
|
|
|
|
&.single {
|
|
.single-title,
|
|
.single-subtitle,
|
|
.post-meta {
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
h1:not(.single-title),
|
|
.page-break-before {
|
|
page-break-before: always;
|
|
}
|
|
|
|
.page-break-after {
|
|
page-break-after: always;
|
|
}
|
|
}
|
|
|
|
.print-d-none {
|
|
display: none !important;
|
|
}
|
|
}
|