Skip to content

feat(divider): [divider]modify smb theme #2179

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

Merged
merged 1 commit into from
Sep 25, 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
@@ -1,12 +1,12 @@
<template>
<p>自定义分隔线颜色</p>
<tiny-divider color="#7693f5"></tiny-divider>
<tiny-divider color="#1476ff"></tiny-divider>
<p>自定义分隔线的样式</p>
<tiny-divider border-style="dashed"></tiny-divider>
<p>自定义文案的颜色</p>
<tiny-divider content-color="#7693f5">文案</tiny-divider>
<tiny-divider content-color="#1476ff">文案</tiny-divider>
<p>文案的背景颜色</p>
<tiny-divider content-color="#ffffff" content-background-color="#7693f5">文案</tiny-divider>
<tiny-divider content-color="#ffffff" content-background-color="#1476ff">文案</tiny-divider>
</template>

<script setup>
Expand Down
6 changes: 3 additions & 3 deletions examples/sites/demos/pc/app/divider/customStyle.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div>
<p>自定义分隔线颜色</p>
<tiny-divider color="#7693f5"></tiny-divider>
<tiny-divider color="#1476ff"></tiny-divider>
<p>自定义分隔线的样式</p>
<tiny-divider border-style="dashed"></tiny-divider>
<p>自定义文案的颜色</p>
<tiny-divider content-color="#7693f5">文案</tiny-divider>
<tiny-divider content-color="#1476ff">文案</tiny-divider>
<p>文案的背景颜色</p>
<tiny-divider content-color="#ffffff" content-background-color="#7693f5">文案</tiny-divider>
<tiny-divider content-color="#ffffff" content-background-color="#1476ff">文案</tiny-divider>
</div>
</template>

Expand Down
6 changes: 2 additions & 4 deletions packages/theme/src/divider/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@

&&--horizontal {
display: block;
height: 1px;
margin: 24px 0;
border-top: var(--ti-divider-dividing-line);
border-top: 1px solid var(--ti-divider-dividing-line);
opacity: var(--ti-divider-horizontal-opacity);
}

Expand All @@ -21,13 +20,12 @@
height: 1em;
margin: 0 8px;
vertical-align: middle;
border-left: var(--ti-divider-dividing-line);
border-left: 1px solid var(--ti-divider-dividing-line);
opacity: var(--ti-divider-vertical-opacity);
}

&__text {
position: absolute;
padding: 0 20px;
font-size: 14px;
font-weight: 500;
color: var(--ti-divider-text-color);
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/divider/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// 文案文本色
--ti-divider-text-color: var(--ti-common-color-text-primary);
//分割线横向透明度
--ti-divider-horizontal-opacity: 0.5;
--ti-divider-horizontal-opacity: 1;
//分割线纵向透明度
--ti-divider-vertical-opacity: 0.5;
--ti-divider-vertical-opacity: 1;
Comment on lines +9 to +11
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Suggestion: Add documentation and visual tests for the opacity change.

Given that this is a visual change that could impact the user interface, it's important to:

  1. Update the documentation to reflect this change in the divider's appearance.
  2. Add visual regression tests to ensure the new appearance is consistent across different scenarios and doesn't unintentionally affect other components.

Could you please add appropriate documentation updates and consider implementing visual tests for this change? This will help maintain the quality and consistency of the theme.

}
Loading