Skip to content

Commit

Permalink
fix: fix inset not support in old browser
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Mar 9, 2023
1 parent 4b188c4 commit 539a954
Show file tree
Hide file tree
Showing 31 changed files with 196 additions and 59 deletions.
15 changes: 12 additions & 3 deletions packages/platform/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
<style type="text/css">
.fp-loader {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 9999;
overflow: hidden;
background: #000;
Expand Down Expand Up @@ -39,13 +42,19 @@
}

.fp-loader-inner::before {
inset: 5px;
top: 5px;
right: 5px;
bottom: 5px;
left: 5px;
box-shadow: 0 3px 3px 0 rgb(255 228 32);
animation: fp-loader-spin 3s linear infinite;
}

.fp-loader-inner::after {
inset: 15px;
top: 15px;
right: 15px;
bottom: 15px;
left: 15px;
box-shadow: 0 3px 3px 0 rgb(61 175 255);
animation: fp-loader-spin 1.5s linear infinite;
}
Expand Down
5 changes: 4 additions & 1 deletion packages/platform/src/styles/_app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ body {

&::after {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/platform/src/styles/components/chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

@include e(container) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
}
}
15 changes: 12 additions & 3 deletions packages/platform/src/styles/components/map.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@

@include e(container) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
}

Expand Down Expand Up @@ -63,11 +66,17 @@

@include e(marker-cluster-ripple) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;

div {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
border: 1px solid currentcolor;
border-radius: 50%;
animation: map-marker-cluster-ripple 3s infinite linear;
Expand Down
5 changes: 4 additions & 1 deletion packages/platform/src/styles/components/status-dot.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
@include e(dot) {
&::after {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
border: 1px solid var(--app-status-dot-color);
border-radius: 50%;
Expand Down
10 changes: 8 additions & 2 deletions packages/site/src/styles/routes/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@

&::after {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
}
Expand Down Expand Up @@ -179,7 +182,10 @@

&::after {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
}
}
Expand Down
15 changes: 12 additions & 3 deletions packages/ui/src/styles/_common.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
@include b(mask) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: var(--#{$rd-prefix}mask-background-color);
}

Expand All @@ -25,7 +28,10 @@
}

position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
border-radius: inherit;
animation: wave-wave 0.4s cubic-bezier(0.08, 0.82, 0.17, 1), wave-fade-out 2s cubic-bezier(0.08, 0.82, 0.17, 1);
Expand All @@ -34,7 +40,10 @@

@include b(focus-outline) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
border: 1px dashed var(--#{$rd-prefix}color-primary-lighter);
}
5 changes: 4 additions & 1 deletion packages/ui/src/styles/components/auto-complete.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ $auto-complete-option-height: 32px;

@include e(loading) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 5;
display: flex;
align-items: center;
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/styles/components/cascader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ $cascader-option-height: 32px;

@include e(loading) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 5;
display: flex;
align-items: center;
Expand Down
22 changes: 16 additions & 6 deletions packages/ui/src/styles/components/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,21 @@

&::before {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
border: 1px solid transparent;
border-radius: var(--#{$rd-prefix}border-radius);
}

&::after {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
background-color: transparent;
border-radius: var(--#{$rd-prefix}border-radius);
Expand All @@ -128,7 +134,10 @@

@include e(tick) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
overflow: hidden;
border-radius: var(--#{$rd-prefix}border-radius);
Expand Down Expand Up @@ -159,10 +168,11 @@

@include e(input) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 5;
width: 100%;
height: 100%;
margin: 0;
cursor: inherit;
border: 1px solid var(--#{$rd-prefix}color-border);
Expand Down
10 changes: 8 additions & 2 deletions packages/ui/src/styles/components/date-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@
@include m(today) {
&::after {
position: absolute;
inset: 2px;
top: 2px;
right: 2px;
bottom: 2px;
left: 2px;
content: '';
border: 1px solid var(--#{$rd-prefix}color-primary);
}
Expand Down Expand Up @@ -127,7 +130,10 @@
@include when(between-hover) {
&::before {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
content: '';
background-color: var(--#{$rd-prefix}background-color-primary);
}
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/styles/components/drawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
@include component-footer;

position: fixed;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
outline: none;

Expand Down
10 changes: 8 additions & 2 deletions packages/ui/src/styles/components/image.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

@include e(actions) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
Expand Down Expand Up @@ -55,7 +58,10 @@

@include b(image-preview) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
padding: 68px 68px 98px;
overflow: hidden;
Expand Down
10 changes: 8 additions & 2 deletions packages/ui/src/styles/components/mixins/_selectbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@
@include utils-input;

position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 5;
min-width: 0;
padding: 0;
Expand All @@ -97,7 +100,10 @@

@include e(placeholder-wrapper) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: flex;
align-items: center;
color: $rd-placeholder-color;
Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/styles/components/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
@include component-footer;

position: fixed;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
outline: none;

Expand Down
5 changes: 4 additions & 1 deletion packages/ui/src/styles/components/pagination.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@

@include e(ellipsis) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: inline-flex;
align-items: center;
justify-content: center;
Expand Down
10 changes: 8 additions & 2 deletions packages/ui/src/styles/components/popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
@include component-footer;

position: fixed;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
outline: none;

Expand Down Expand Up @@ -166,7 +169,10 @@

@include e(mask) {
position: absolute;
inset: 0;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: all;
}
}
Loading

0 comments on commit 539a954

Please sign in to comment.