Commit 1e8fab3fe5dcac78e9d2c53682527259234f95ce

Authored by 前端爱码士
Committed by GitHub
1 parent 7e0456cc

perf: 优化modal弹窗样式 (#2824)

src/components/Modal/src/index.less
@@ -2,10 +2,7 @@ @@ -2,10 +2,7 @@
2 overflow: hidden; 2 overflow: hidden;
3 3
4 .ant-modal { 4 .ant-modal {
5 - top: 0 !important;  
6 - right: 0 !important;  
7 - bottom: 0 !important;  
8 - left: 0 !important; 5 + inset: 0 !important;
9 width: 100% !important; 6 width: 100% !important;
10 height: 100%; 7 height: 100%;
11 8
@@ -63,8 +60,8 @@ @@ -63,8 +60,8 @@
63 } 60 }
64 61
65 &-close { 62 &-close {
66 - font-weight: normal;  
67 outline: none; 63 outline: none;
  64 + font-weight: normal;
68 } 65 }
69 66
70 &-close-x { 67 &-close-x {
@@ -110,17 +107,20 @@ @@ -110,17 +107,20 @@
110 .ant-modal-confirm .ant-modal-body { 107 .ant-modal-confirm .ant-modal-body {
111 padding: 24px !important; 108 padding: 24px !important;
112 } 109 }
113 -@media screen and (max-height: 600px) { 110 +
  111 +@media screen and (height <= 600px) {
114 .ant-modal { 112 .ant-modal {
115 top: 60px; 113 top: 60px;
116 } 114 }
117 } 115 }
118 -@media screen and (max-height: 540px) { 116 +
  117 +@media screen and (height <= 540px) {
119 .ant-modal { 118 .ant-modal {
120 top: 30px; 119 top: 30px;
121 } 120 }
122 } 121 }
123 -@media screen and (max-height: 480px) { 122 +
  123 +@media screen and (height <= 480px) {
124 .ant-modal { 124 .ant-modal {
125 top: 10px; 125 top: 10px;
126 } 126 }