mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
56836eb077
* 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
109 lines
2.7 KiB
SCSS
109 lines
2.7 KiB
SCSS
.#{$prefix}timeline {
|
|
list-style: none;
|
|
box-sizing: border-box;
|
|
overflow: auto;
|
|
margin: 1rem auto;
|
|
--timeline-color: #{darken($global-border-color, 5%)};
|
|
--timeline-circle-color: #FF735A;
|
|
--timeline-circle-size: 10px;
|
|
--timeline-width: 2px;
|
|
|
|
&[data-animation] {
|
|
.#{$prefix}timeline-item::before {
|
|
border-color: var(--timeline-color);
|
|
animation-name: border-color-fade;
|
|
animation-duration: 2s;
|
|
animation-iteration-count: infinite;
|
|
animation-delay: calc(var(--timeline-index) * 0.3s);
|
|
|
|
@keyframes border-color-fade {
|
|
0% {
|
|
border-color: var(--timeline-color);
|
|
}
|
|
50% {
|
|
border-color: var(--timeline-circle-color);
|
|
}
|
|
100% {
|
|
border-color: var(--timeline-color);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.#{$prefix}timeline-item {
|
|
position: relative;
|
|
padding: 0.5rem 1.75rem;
|
|
|
|
@each $color, $value in $theme-colors {
|
|
&[data-type='#{$color}'] {
|
|
--timeline-circle-color: var(#{$rootPrefix}#{$color});
|
|
}
|
|
}
|
|
|
|
.#{$prefix}timeline-item__timestamp {
|
|
font-size: 0.8125rem;
|
|
line-height: 1;
|
|
color: var(#{$rootPrefix}secondary);
|
|
|
|
&.is-top {
|
|
margin-bottom: 0.25rem;
|
|
padding-top: 0.34375rem;
|
|
}
|
|
&.is-bottom {
|
|
margin-top: 0.25rem;
|
|
}
|
|
}
|
|
|
|
.#{$prefix}timeline-item__content {
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
&[data-node='dot']::before {
|
|
background-color: var(--timeline-circle-color) !important;
|
|
}
|
|
&[data-size='small']::before {
|
|
transform: scale(0.8) translateY(-50%);
|
|
}
|
|
&[data-size='large']::before {
|
|
transform: scale(1.2) translateY(-50%);
|
|
}
|
|
|
|
&::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 1.25rem;
|
|
transform: translateY(-50%);
|
|
left: 0;
|
|
width: var(--timeline-circle-size);
|
|
height: var(--timeline-circle-size);
|
|
font-size: var(--timeline-circle-size);
|
|
line-height: var(--timeline-circle-size);
|
|
text-align: center;
|
|
border-radius: 50%;
|
|
border-width: var(--timeline-width);
|
|
border-style: solid;
|
|
border-color: var(--timeline-circle-color);
|
|
background-color: $global-background-color;
|
|
color: transparent;
|
|
z-index: 1;
|
|
|
|
[data-theme='dark'] & {
|
|
background-color: $global-background-color-dark;
|
|
}
|
|
}
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: calc(var(--timeline-circle-size) / 2 + var(--timeline-width) / 2);
|
|
width: var(--timeline-width);
|
|
height: 100%;
|
|
background-color: var(--timeline-color);
|
|
}
|
|
|
|
[data-theme='dark'] & {
|
|
--timeline-color: #{darken($global-border-color, 50%)};
|
|
}
|
|
}
|
|
}
|