Files
FixIt/assets/css/_core/_common.scss
T
Cell 164a699701 refactor(UI/UX)!: refactor styles for theme support and enhance visual consistency (#722)
* refactor(styles): unify theme properties and update color variables across stylesheets

* Implement theme mode support with light-dark color adjustments across stylesheets

- Added color-scheme support in _root.scss for light and dark modes.
- Replaced theme property mixins with light-dark function in various widget styles including _cell-tooltip.scss, _cookieconsent.scss, _fixed-button.scss, and others.
- Updated alert styles in _alert.scss to use light-dark for border and text colors.
- Refactored code syntax highlighting in _code.scss and _code-syntax/_index.scss to utilize light-dark for background gradients.
- Enhanced search input styles in _search.scss to adapt to theme mode.
- Modified theme switching logic in color-scheme.js and theme.js to support new theme mode structure.
- Adjusted APlayer and Valine styles to accommodate dark mode using new theme variables.

* feat(shortcode): add auto-dark shortcode for dark mode adaptation

* refactor(styles): update theme colors and improve box-shadow properties for better visual consistency

* feat(header): add scroll-state container queries and enhance header shadow effects

* feat(styles): enhance scroll behavior with overscroll-behavior adjustments for better UX

* feat(styles): update code&table styles and colors for improved visual consistency

* feat(styles): update color variables and improve font styling for better visual hierarchy
2026-03-30 16:48:55 +08:00

100 lines
1.4 KiB
SCSS

// ==============================
// Common Styles
// 常用样式
// ==============================
.text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.text-start {
text-align: left !important;
}
.text-end {
text-align: right !important;
}
.text-center {
text-align: center !important;
}
.d-none {
display: none !important;
}
.ms-1,
.mx-1 {
margin-left: 0.25em !important;
}
.me-1,
.mx-1 {
margin-right: 0.25em !important;
}
.ps-1,
.px-1 {
padding-left: 0.25em !important;
}
.pe-1,
.px-1 {
padding-right: 0.25em !important;
}
@each $color, $value in $theme-colors {
.text-#{$color} {
color: fixit-var(#{$color}) !important;
}
}
@each $key, $value in $orders {
.order-#{$key} {
order: #{$value} !important;
}
}
.variant-numeric {
font-variant-numeric: tabular-nums lining-nums;
}
.rounded-full {
@include border-radius(full);
}
// auto adapt to dark mode by inverting the color and hue
.auto-dark-mode {
@include dark-mode {
filter: invert(1) hue-rotate(0.5turn);
}
}
// print view helper
.page-break-before {
break-before: page;
}
.page-break-after {
break-after: page;
}
@include media('sm', 'up') {
.d-none-desktop {
display: none;
}
}
@include media('xs') {
.d-none-mobile {
display: none !important;
}
}
@include media('print') {
@page {
size: A4 portrait;
margin: 1.27cm;
}
.d-none-print {
display: none !important;
}
}