-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: 趋势表tooltip类名不再使用css-modules (#1501)
* refactor: 趋势表tooltip类名不再使用css-modules * refactor: 统一css类名前缀变量到shared
- Loading branch information
Showing
12 changed files
with
222 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
159 changes: 159 additions & 0 deletions
159
packages/s2-react/src/components/sheets/strategy-sheet/custom-tooltip/index.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
@import '@antv/s2-shared/src/styles/variables.less'; | ||
|
||
.@{strategySheetTooltipClsPrefix} { | ||
line-height: 20px; | ||
font-size: 12px; | ||
color: rgba(0, 0, 0, 0.65); | ||
overflow: hidden; | ||
padding: 12px; | ||
|
||
ul, | ||
li { | ||
list-style: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
& &-divider { | ||
border-top: 1px solid #e9e9e9; | ||
margin: 10px -12px; | ||
} | ||
|
||
// tooltip for row cell | ||
// ------------------------------------------------------ | ||
&&-row &-value { | ||
font-weight: 700; | ||
} | ||
|
||
// tooltip for col cell | ||
// ------------------------------------------------------ | ||
&&-col &-name { | ||
margin-right: 20px; | ||
} | ||
|
||
&&-col &-value { | ||
color: rgba(0, 0, 0, 0.85); | ||
} | ||
|
||
// tooltip for normal data cell | ||
// ------------------------------------------------------ | ||
&&-data &-header { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.header-label { | ||
font-weight: 700; | ||
} | ||
} | ||
|
||
&&-data &-original-value { | ||
text-align: right; | ||
} | ||
|
||
&&-data &-derived-values { | ||
position: relative; | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
|
||
li.derived-value-item { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
|
||
.derived-value-group { | ||
color: rgba(0, 0, 0, 0.65); | ||
|
||
.derived-value-trend-icon { | ||
display: inline-block; | ||
width: 0; | ||
height: 0; | ||
margin-right: 4px; | ||
border-right: 4px solid transparent; | ||
border-bottom: 9px solid #000; | ||
border-left: 4px solid transparent; | ||
transform: rotate(0deg); | ||
} | ||
|
||
&.derived-value-trend-up { | ||
color: #f46649; | ||
|
||
.derived-value-trend-icon { | ||
border-bottom-color: #f46649; | ||
} | ||
} | ||
|
||
&.derived-value-trend-down { | ||
color: #2aa491; | ||
|
||
.derived-value-trend-icon { | ||
transform: rotate(180deg); | ||
border-bottom-color: #2aa491; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// tooltip for bullet data cell | ||
// ------------------------------------------------------ | ||
&-bullet { | ||
// 让描述一行显示 | ||
max-width: max-content; | ||
} | ||
|
||
&-bullet &-title { | ||
font-weight: 500; | ||
font-size: 14px; | ||
color: rgba(0, 0, 0, 0.85); | ||
line-height: 22px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
&-bullet &-desc { | ||
color: rgba(0, 0, 0, 0.45); | ||
margin: 0; | ||
padding: 0; | ||
list-style: none; | ||
font-weight: 400; | ||
white-space: pre-wrap; | ||
|
||
> li + li { | ||
margin-top: 6px; | ||
} | ||
} | ||
|
||
&-bullet .tooltip-bullet-item { | ||
color: rgba(0, 0, 0, 0.45); | ||
position: relative; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
font-weight: 400; | ||
font-size: 12px; | ||
|
||
&:last-child { | ||
margin-top: 2px; | ||
} | ||
|
||
&-value { | ||
color: rgba(0, 0, 0, 0.85); | ||
} | ||
|
||
&.bullet-current-item .bullet-item-legend { | ||
display: inline-block; | ||
width: 10px; | ||
height: 10px; | ||
margin-right: 8px; | ||
} | ||
|
||
&.bullet-target-item .bullet-item-legend { | ||
display: inline-block; | ||
width: 1px; | ||
height: 12px; | ||
border-left: 1px solid rgba(0, 0, 0, 0.25); | ||
margin: 0 12px 0 4px; | ||
} | ||
} | ||
} |
Oops, something went wrong.