Files
FixIt/assets/css/_core/_root.scss
T
Cell 56836eb077 feat: add tabs and tab shortcodes support (#634)
* feat: add tabs and tab shortcodes support

Powered by https://github.com/github/tab-container-element

* fix: adjust tab-container styles for improved layout and responsiveness

- [x] Underline Style (Default)
- [x] Pill Style
- [x] Card Style
- [x] Segment Style

* test: add tabs comprehensive test cases

* style: code optimization

* fix: add tabs support in home scope

* docs: add `<tab-container>` element reference to README files

* feat: enhance tab-container with loading mixin and simplify code

* refactor: update variable references to use root prefix in styles

* docs: add tabs shortcode support to README files

* fix: ensure shortcode is enclosed within a tabs block

* feat: add responsive design for tab-container on smaller screens

* test: remove unnecessary placement attribute for segment tabs

* refactor: remove unused vertical attribute from tabs shortcode

* fix: set default tab type to 'underline' for consistency

* refactor: update tab-button and tab-panel selectors for improved specificity
2025-09-11 22:59:33 +08:00

50 lines
1.8 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-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;
#{$rootPrefix}code-inline-background-color: rgba(175, 184, 193, 0.2);
}
// Dark theme
[data-theme=dark] {
#{$rootPrefix}global-font-color: #{$global-font-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);
}