Skip to content

Commit

Permalink
fix(loading): expose marigin css variable
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Dec 17, 2021
1 parent 46aa154 commit 313d232
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/loading/docs/en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,4 @@ Here are the CSS variables used by the component, Styles can be customized using
| Variable | Default |
| --- | --- |
| `--loading-opacity` | `0.38` |

| `--loading-desc-margin` | `8px 0 0` |
1 change: 1 addition & 0 deletions packages/varlet-ui/src/loading/docs/zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,4 @@ export default {
| 变量名 | 默认值 |
| --- | --- |
| `--loading-opacity` | `0.38` |
| `--loading-desc-margin` | `8px 0 0` |
4 changes: 3 additions & 1 deletion packages/varlet-ui/src/loading/loading.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import '../styles/var';

@loading-opacity: 0.38;
@loading-desc-margin: 8px 0 0;
@loading-normal-width: 50px;
@loading-normal-height: @font-size-md + 2;

Expand All @@ -15,6 +16,7 @@

:root {
--loading-opacity: @loading-opacity;
--loading-desc-margin: @loading-desc-margin;
}

.var-loading {
Expand Down Expand Up @@ -43,7 +45,7 @@

&__description {
color: currentColor;
margin-top: 8px;
margin: var(--loading-desc-margin);

&--large {
font-size: @font-size-lg;
Expand Down

0 comments on commit 313d232

Please sign in to comment.