Files
FixIt/assets/css/_core/_root.scss
T
Cell 93478b47e1 refactor: code block wrapper (#665)
* feat: optimize code highlighting for diff language

* refactor: update codeblock configuration and enhance code wrapper functionality

* fix: extra blank lines would appear when copying lines containing code highlighting

* refactor: enhance code block wrapper functionality and add new styles (mac style)

* refactor: enhance code block normal mode

* feat: do noting for code block simple mode

* feat: add copy btn for code block modes mac and simple

* refactor: add code-related variables and update styles for code blocks and gist layout

* feat: update code copy button visibility on hover for larger screens

* feat: update code block mode attribute and remove mac wrapper

* feat!: code block parameters accurate to a single

Remove the `data-open` attribute and use `.open` instead.

* refactor: enhance initCopyCode method to accept optional button parameter

* feat: improve code/diagram copy button styles and transitions for better visibility

* fix: disable copy buttons for simple/mac mode code blocks when copyable set to false

* chore: rename normal partial to code-header

* feat: add preview and expand feature for code blocks (close #312)

* fix: adjust transition timing for code header and fade-out animation

* test: update code block test case

* docs: update comments for code highlight and markup configurations

* feat: adjust code header background color darkening for light and dark themes

* fix: hide aside and breadcrumb pseudo-elements on small screens

* perf: change the code copy button and code expand button to server-side rendering

* fix: the code expand button obscured the code content

* fix: update code background and header colors for improved visibility

* fix: ensure code copy button is only added for copyable code blocks

* feat(code block): add lineNosToggler and lineWrapToggler params and feature for code blocks

* refactor: code syntax highlighting styles

* fix: update background color for line numbers and ensure proper sticky effect

* feat(code block): add support for code file names in code blocks

* fix: code review for PR #665

* feat(i18n): add Japanese and Korean translations; update toggle options in multiple languages

* docs: update configurations and comments
2025-12-17 16:56:52 +08:00

61 lines
2.5 KiB
SCSS

:root {
// Note: Custom variable values only support SassScript inside `#{}`.
// TODO migrate SCSS variables to CSS variables
interpolate-size: allow-keywords;
#{$rootPrefix}global-font-color: #{$global-font-color};
#{$rootPrefix}global-font-secondary-color: #{$global-font-secondary-color};
#{$rootPrefix}global-border-color: #{$global-border-color};
// Theme colors variables
@each $color, $value in $theme-colors {
#{$rootPrefix}#{$color}: #{$value};
}
// Scroll margin top and Stack sticky top related
#{$rootPrefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top});
// Set breadcrumb height to 0px if breadcrumb is disabled
#{$rootPrefix}breadcrumb-height: 0px;
// hr / divider style
#{$rootPrefix}hr-background-color: #{darken($global-border-color, 5%)};
#{$rootPrefix}hr-before-color: #{lighten($single-link-hover-color, 4%)};
#{$rootPrefix}divider-edge-weak: linear-gradient(to right, transparent, var(#{$rootPrefix}divider-bg, #d0d0d5), transparent);
// Scrollbar related variables
#{$rootPrefix}scrollbar-thumb-color: #{$scrollbar-color};
#{$rootPrefix}scrollbar-thumb-hover-color: #{$scrollbar-hover-color};
#{$rootPrefix}scrollbar-track-color: transparent;
#{$rootPrefix}scrollbar-width: thin;
#{$rootPrefix}scrollbar-width-legacy: 12px;
// Code related variables
#{$rootPrefix}code-inline-background-color: rgba(175, 184, 193, 0.2);
#{$rootPrefix}code-block-background-color: #{$code-background-color};
#{$rootPrefix}code-header-color: #{$code-header-color};
#{$rootPrefix}code-header-bg: #{darken($code-background-color, 5%)};
#{$rootPrefix}gist-meta-background-color: #{darken($code-background-color, 5%)};
}
// Dark theme
[data-theme=dark] {
#{$rootPrefix}global-font-color: #{$global-font-color-dark};
#{$rootPrefix}global-font-secondary-color: #{$global-font-secondary-color-dark};
#{$rootPrefix}global-border-color: #{$global-border-color-dark};
@each $color, $value in $theme-colors {
#{$rootPrefix}#{$color}: #{darken($value, 5%)};
}
#{$rootPrefix}hr-background-color: #{lighten($global-border-color-dark, 5%)};
#{$rootPrefix}hr-before-color: #{darken($global-link-hover-color-dark, 4%)};
#{$rootPrefix}code-inline-background-color: rgba(99, 110, 123, 0.4);
#{$rootPrefix}code-block-background-color: #{$code-background-color-dark};
#{$rootPrefix}code-header-color: #{$code-header-color-dark};
#{$rootPrefix}code-header-bg: #{darken($code-background-color-dark, 5%)};
#{$rootPrefix}gist-meta-background-color: #{darken($code-background-color-dark, 5%)};
}