@douyinfe/semi-foundation 2.99.0 → 2.99.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,7 +41,7 @@
41
41
  }
42
42
  .semi-modal-wrap-center {
43
43
  display: flex;
44
- align-items: center;
44
+ align-items: flex-start;
45
45
  }
46
46
  .semi-modal-title {
47
47
  display: inline-flex;
@@ -152,7 +152,7 @@
152
152
  }
153
153
 
154
154
  .semi-modal-centered {
155
- margin: 0 auto;
155
+ margin: auto;
156
156
  }
157
157
 
158
158
  .semi-modal-popup .semi-modal-mask,
@@ -46,7 +46,14 @@ $module: #{$prefix}-modal;
46
46
  outline: 0;
47
47
  &-center{
48
48
  display: flex;
49
- align-items: center;
49
+ // Use flex-start + auto margin instead of `align-items: center`.
50
+ // When content fits the viewport, `margin: auto` on the modal
51
+ // centers it vertically. When content exceeds the viewport, auto
52
+ // margins collapse to 0 per the flexbox spec, so the modal aligns
53
+ // to the top of the wrap and the wrap's `overflow: auto` can scroll
54
+ // to both the top and the bottom of the modal. This prevents the
55
+ // "centered modal becomes unreachable" bug when content overflows.
56
+ align-items: flex-start;
50
57
  }
51
58
  }
52
59
 
@@ -194,7 +201,10 @@ $module: #{$prefix}-modal;
194
201
  }
195
202
 
196
203
  .#{$module}-centered {
197
- margin: 0 auto;
204
+ // `margin: auto` (instead of `0 auto`) lets the wrap's `display: flex;
205
+ // align-items: flex-start` produce visual vertical centering when content
206
+ // fits, while degrading to top-aligned + scrollable when content overflows.
207
+ margin: auto;
198
208
  }
199
209
 
200
210
  .#{$module}-popup {
@@ -429,7 +429,7 @@
429
429
  pointer-events: none;
430
430
  }
431
431
  .semi-table-bordered:not(.semi-table-scroll-position-right) > .semi-table-container > .semi-table-header {
432
- box-shadow: inset-1px 0 0 0 var(--semi-color-border);
432
+ box-shadow: inset -1px 0 0 0 var(--semi-color-border);
433
433
  }
434
434
  :where(.semi-table-bordered > .semi-table-container) > .semi-table-body > .semi-table-placeholder {
435
435
  border-right: 1px solid var(--semi-color-border);
@@ -579,7 +579,11 @@ $module: #{$prefix}-table;
579
579
  // Ensure header shows a visible right border even when the container overlay
580
580
  // is covered by native scrollbars in some browsers.
581
581
  & > .#{$module}-header {
582
- box-shadow: inset -$width-table_base_border 0 0 0 $color-table-border-default;
582
+ // NOTE: write the negative width as `$var * -1` instead of `-$var` here.
583
+ // Sass >=1.55 treats `inset -$width-...` as the binary expression
584
+ // `inset - $width-...` (strict-unary deprecation), which compiles to the
585
+ // broken value `inset-1px` (no space) and breaks the box-shadow.
586
+ box-shadow: inset $width-table_base_border * -1 0 0 0 $color-table-border-default;
583
587
  }
584
588
  }
585
589
  }
@@ -41,7 +41,7 @@
41
41
  }
42
42
  .semi-modal-wrap-center {
43
43
  display: flex;
44
- align-items: center;
44
+ align-items: flex-start;
45
45
  }
46
46
  .semi-modal-title {
47
47
  display: inline-flex;
@@ -152,7 +152,7 @@
152
152
  }
153
153
 
154
154
  .semi-modal-centered {
155
- margin: 0 auto;
155
+ margin: auto;
156
156
  }
157
157
 
158
158
  .semi-modal-popup .semi-modal-mask,
@@ -46,7 +46,14 @@ $module: #{$prefix}-modal;
46
46
  outline: 0;
47
47
  &-center{
48
48
  display: flex;
49
- align-items: center;
49
+ // Use flex-start + auto margin instead of `align-items: center`.
50
+ // When content fits the viewport, `margin: auto` on the modal
51
+ // centers it vertically. When content exceeds the viewport, auto
52
+ // margins collapse to 0 per the flexbox spec, so the modal aligns
53
+ // to the top of the wrap and the wrap's `overflow: auto` can scroll
54
+ // to both the top and the bottom of the modal. This prevents the
55
+ // "centered modal becomes unreachable" bug when content overflows.
56
+ align-items: flex-start;
50
57
  }
51
58
  }
52
59
 
@@ -194,7 +201,10 @@ $module: #{$prefix}-modal;
194
201
  }
195
202
 
196
203
  .#{$module}-centered {
197
- margin: 0 auto;
204
+ // `margin: auto` (instead of `0 auto`) lets the wrap's `display: flex;
205
+ // align-items: flex-start` produce visual vertical centering when content
206
+ // fits, while degrading to top-aligned + scrollable when content overflows.
207
+ margin: auto;
198
208
  }
199
209
 
200
210
  .#{$module}-popup {
@@ -429,7 +429,7 @@
429
429
  pointer-events: none;
430
430
  }
431
431
  .semi-table-bordered:not(.semi-table-scroll-position-right) > .semi-table-container > .semi-table-header {
432
- box-shadow: inset-1px 0 0 0 var(--semi-color-border);
432
+ box-shadow: inset -1px 0 0 0 var(--semi-color-border);
433
433
  }
434
434
  :where(.semi-table-bordered > .semi-table-container) > .semi-table-body > .semi-table-placeholder {
435
435
  border-right: 1px solid var(--semi-color-border);
@@ -579,7 +579,11 @@ $module: #{$prefix}-table;
579
579
  // Ensure header shows a visible right border even when the container overlay
580
580
  // is covered by native scrollbars in some browsers.
581
581
  & > .#{$module}-header {
582
- box-shadow: inset -$width-table_base_border 0 0 0 $color-table-border-default;
582
+ // NOTE: write the negative width as `$var * -1` instead of `-$var` here.
583
+ // Sass >=1.55 treats `inset -$width-...` as the binary expression
584
+ // `inset - $width-...` (strict-unary deprecation), which compiles to the
585
+ // broken value `inset-1px` (no space) and breaks the box-shadow.
586
+ box-shadow: inset $width-table_base_border * -1 0 0 0 $color-table-border-default;
583
587
  }
584
588
  }
585
589
  }
package/modal/modal.scss CHANGED
@@ -46,7 +46,14 @@ $module: #{$prefix}-modal;
46
46
  outline: 0;
47
47
  &-center{
48
48
  display: flex;
49
- align-items: center;
49
+ // Use flex-start + auto margin instead of `align-items: center`.
50
+ // When content fits the viewport, `margin: auto` on the modal
51
+ // centers it vertically. When content exceeds the viewport, auto
52
+ // margins collapse to 0 per the flexbox spec, so the modal aligns
53
+ // to the top of the wrap and the wrap's `overflow: auto` can scroll
54
+ // to both the top and the bottom of the modal. This prevents the
55
+ // "centered modal becomes unreachable" bug when content overflows.
56
+ align-items: flex-start;
50
57
  }
51
58
  }
52
59
 
@@ -194,7 +201,10 @@ $module: #{$prefix}-modal;
194
201
  }
195
202
 
196
203
  .#{$module}-centered {
197
- margin: 0 auto;
204
+ // `margin: auto` (instead of `0 auto`) lets the wrap's `display: flex;
205
+ // align-items: flex-start` produce visual vertical centering when content
206
+ // fits, while degrading to top-aligned + scrollable when content overflows.
207
+ margin: auto;
198
208
  }
199
209
 
200
210
  .#{$module}-popup {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.99.0",
3
+ "version": "2.99.2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",
@@ -14225,8 +14225,8 @@
14225
14225
  }
14226
14226
  },
14227
14227
  "dependencies": {
14228
- "@douyinfe/semi-animation": "2.99.0",
14229
- "@douyinfe/semi-json-viewer-core": "2.99.0",
14228
+ "@douyinfe/semi-animation": "2.99.2",
14229
+ "@douyinfe/semi-json-viewer-core": "2.99.2",
14230
14230
  "@mdx-js/mdx": "^3.0.1",
14231
14231
  "async-validator": "^3.5.0",
14232
14232
  "classnames": "^2.2.6",
@@ -14247,7 +14247,7 @@
14247
14247
  "*.scss",
14248
14248
  "*.css"
14249
14249
  ],
14250
- "gitHead": "c62861b574b51ae39afe7da796ab4f14d1462ef2",
14250
+ "gitHead": "59e8cd9364e406b5097b86455646171863e10466",
14251
14251
  "devDependencies": {
14252
14252
  "@babel/plugin-transform-runtime": "^7.15.8",
14253
14253
  "@babel/preset-env": "^7.15.8",
package/table/table.scss CHANGED
@@ -579,7 +579,11 @@ $module: #{$prefix}-table;
579
579
  // Ensure header shows a visible right border even when the container overlay
580
580
  // is covered by native scrollbars in some browsers.
581
581
  & > .#{$module}-header {
582
- box-shadow: inset -$width-table_base_border 0 0 0 $color-table-border-default;
582
+ // NOTE: write the negative width as `$var * -1` instead of `-$var` here.
583
+ // Sass >=1.55 treats `inset -$width-...` as the binary expression
584
+ // `inset - $width-...` (strict-unary deprecation), which compiles to the
585
+ // broken value `inset-1px` (no space) and breaks the box-shadow.
586
+ box-shadow: inset $width-table_base_border * -1 0 0 0 $color-table-border-default;
583
587
  }
584
588
  }
585
589
  }