Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(carousel): [carousel] modify smb theme #2153

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Carousel as TinyCarousel, CarouselItem as TinyCarouselItem } from '@ope
}

.carousel-item-demo:nth-child(2n) {
background-color: #fafafa;
background-color: #f0f0f0;
}

.carousel-item-demo:nth-child(2n + 1) {
Expand Down
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/carousel/show-title.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
}

.carousel-item-demo:nth-child(2n) {
background-color: #fafafa;
background-color: #f0f0f0;
}

.carousel-item-demo:nth-child(2n + 1) {
Expand Down
5 changes: 3 additions & 2 deletions packages/theme/src/carousel-item/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@
height: var(--ti-carousel-item-title-height);
width: 100%;
line-height: var(--ti-carousel-item-title-height);
color: var(--ti-carousel-item-title-text-color, #fff);
color: var(--ti-carousel-item-title-text-color);
text-align: left;
background: var(--ti-carousel-item-title-bg-color);
opacity: 0.3;

span {
padding: 0 12px;
padding: 0 16px;
font-size: var(--ti-carousel-item-title-span-font-size);
width: 80%;
display: inline-block;
Expand Down
6 changes: 3 additions & 3 deletions packages/theme/src/carousel-item/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*/

.component-css-vars-carousel-item() {
--ti-carousel-item-title-height: var(--ti-common-size-height-small, 32px);
--ti-carousel-item-title-text-color: var(--ti-common-color-light, #fff);
--ti-carousel-item-title-bg-color: var(--ti-common-color-bg-dark-disabled);
--ti-carousel-item-title-height: var(--ti-common-size-height-medium);
--ti-carousel-item-title-text-color: var(--ti-common-color-light);
--ti-carousel-item-title-bg-color: var(--ti-common-color-bg-primary);
--ti-carousel-item-title-span-font-size: var(--ti-common-font-size-base, 12px);
--ti-carousel-mask-bg-color: var(--ti-common-color-light, #fff);
}
6 changes: 5 additions & 1 deletion packages/theme/src/carousel/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@
margin-right: var(--ti-carousel-indicator-margin-right);
cursor: pointer;

&:last-child {
margin-right: 0;
}

&:hover button {
opacity: var(--ti-carousel-hover-opacity);
}
Expand Down Expand Up @@ -212,7 +216,7 @@
left: auto;
right: 16px;
bottom: 0;
margin: 0 0 8px;
margin: 0 0 16px;
transform: none;
background: transparent;
}
Expand Down
8 changes: 4 additions & 4 deletions packages/theme/src/carousel/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
// 指示器按钮高度
--ti-carousel-indicator-button-height: var(--ti-common-size-2x, 8px);
// 非当前指示器背景色
--ti-carousel-indicator-button-bg-color: var(--ti-common-color-text-secondary);
--ti-carousel-indicator-button-bg-color: #e6e6e6;
// 指示器项右外边距
--ti-carousel-indicator-margin-right: var(--ti-common-space-3x);
// 当前指示器右边距
--ti-carousel-indicator-active-width: var(--ti-common-size-5x);
--ti-carousel-indicator-active-width: var(--ti-common-size-3x);
// 指示器项垂直内边距(hide)
--ti-carousel-indicator-padding-vertical: var(--ti-common-space-0, 0px);
// 指示器项水平内边距
Expand All @@ -58,15 +58,15 @@
// 当前指示器背景色
--ti-carousel-indicator-active-background-color: var(--ti-common-color-primary-active);
// 当前指示器的宽度
--ti-carousel-indicator-active-button-width: var(--ti-common-size-5x);
--ti-carousel-indicator-active-button-width: var(--ti-common-size-3x);
// 当前指示器圆角
--ti-carousel-indicator-active-border-radius: var(--ti-common-space-base);
// 幻灯片外的指示器动画(hide)
--ti-carousel-indicator-active-transition: none;
// 幻灯片外的指示器默认背景色
--ti-carousel-outside-button-bg-color: var(--ti-common-color-dark, #000);
// 幻灯片外的当前指示器背景色
--ti-carousel-outside-button-active-bg-color: var(--ti-common-color-primary-active);
--ti-carousel-outside-button-active-bg-color: var(--ti-common-color-text-secondary);
// 标签按钮的字号(hide)
--ti-carousel-labels-button-font-size: var(--ti-common-font-size-base, 12px);
// 正常透明度颜色
Expand Down
Loading