Skip to content

Commit

Permalink
fix(timeline-item): margin-bottom can't be set by theme variable, c…
Browse files Browse the repository at this point in the history
…loses #3722
  • Loading branch information
07akioni committed Sep 18, 2022
1 parent 8413a51 commit 06d5295
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 7 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGELOG

## NEXT_VERSION

### Fixes

- 修复 `n-timeline-item``title``margin-bottom` 无法通过主题变量设置,关闭 [#3722](https://github.com/tusen-ai/naive-ui/issues/3722)
- 修复 `n-timeline-item``meta` 在水平垂直嵌套时 `margin-bottom` 被覆盖

## 2.33.3

### Feats
Expand All @@ -14,6 +21,9 @@
### Performance

- Fix `n-menu`'s `value` will cause useless rendering of menu item, closes [#3670](https://github.com/tusen-ai/naive-ui/issues/3670).

### Fixes

- Fix `n-date-picker`'s style is unexpected in `inline-theme-disabled` mode, closes [#3655](https://github.com/tusen-ai/naive-ui/issues/3655).
- Fix `n-data-table` can't set `n-dropdown`'s `theme-overrides`, closes [#3613](https://github.com/tusen-ai/naive-ui/issues/3613).
- Fix `n-carousel` displays abnoramlly if `transform: scale` style is set, closes [#3684](https://github.com/tusen-ai/naive-ui/issues/3684).
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

### NEXT_VERSION

## NEXT_VERSION

### Fixes

- Fix `n-timeline-item`'s `title`'s `margin-bottom` can't be set by theme variable, closes [#3722](https://github.com/tusen-ai/naive-ui/issues/3722).
- Fix `n-timeline-item`'s `meta` part's `margin-bottom` is overrided when nested in horizontal and vertical mode.

## 2.33.3

### Feats
Expand All @@ -14,6 +23,9 @@
### Performance

- 修复 `n-menu``value` 改变时会引发菜单项无用的渲染,关闭 [#3670](https://github.com/tusen-ai/naive-ui/issues/3670)

### Fixes

- 修复 `n-date-picker``inline-theme-disabled` 模式下样式不正常,关闭 [#3655](https://github.com/tusen-ai/naive-ui/issues/3655)
- 修复 `n-data-table` 无法设定 `n-dropdown``theme-overrides`,关闭 [#3613](https://github.com/tusen-ai/naive-ui/issues/3613)
- 修复 `n-carousel` 在设定了 `transform: scale` 后显示不正常,关闭 [#3684](https://github.com/tusen-ai/naive-ui/issues/3684)
Expand Down
11 changes: 6 additions & 5 deletions src/timeline/src/styles/index.cssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ export default cB('timeline', `
cB('timeline-item-content', `
margin-top: calc(var(--n-icon-size) + 12px);
`, [
cE('meta', `
margin-top: 6px;
margin-bottom: unset;
`)
c('>', [
cE('meta', `
margin-top: 6px;
margin-bottom: unset;
`)
])
]),
cB('timeline-item-timeline', `
width: 100%;
Expand Down Expand Up @@ -97,7 +99,6 @@ export default cB('timeline', `
font-size: var(--n-title-font-size);
transition: color .3s var(--n-bezier);
font-weight: var(--n-title-font-weight);
margin-bottom: 6px;
color: var(--n-title-text-color);
`),
cE('content', `
Expand Down
4 changes: 2 additions & 2 deletions src/timeline/styles/_common.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
titleMarginMedium: '0',
titleMarginLarge: '-2px 0 0 0',
titleMarginMedium: '0 0 6px 0',
titleMarginLarge: '-2px 0 6px 0',
titleFontSizeMedium: '14px',
titleFontSizeLarge: '16px',
iconSizeMedium: '14px',
Expand Down

0 comments on commit 06d5295

Please sign in to comment.