Skip to content

Commit f13f87a

Browse files
Merge branch 'develop' into chore/ddw-1037-vulnerabilities
2 parents bd75418 + 1caf60a commit f13f87a

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

source/themes/simple/SimplePopOver.scss

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
@import "theme";
1+
@use "sass:math";
2+
@import 'theme';
23

34
// OVERRIDABLE CONFIGURATION VARIABLES
45

56
$pop-over-box-shadow: var(--rp-pop-over-box-shadow, 0 1.5px 5px 0 rgba(0, 0, 0, 0.18)) !default;
67
$pop-over-font-family: var(--rp-pop-over-font-family, $theme-font-regular), sans-serif !default;
78
$pop-over-font-size: var(--rp-pop-over-font-size, 14px) !default;
89
$pop-over-padding: var(--rp-pop-over-padding, 6px 12px) !default;
9-
$pop-over-arrow-size: var(--rp-pop-over-arrow-size, 16px) !default;
10+
$pop-over-arrow-width: var(--rp-pop-over-arrow-size, 16px) !default;
11+
$pop-over-arrow-height: calc(#{$pop-over-arrow-width} * #{math.sqrt(2)} / 2);
12+
$pop-over-arrow-nesting: calc(-1 * #{$pop-over-arrow-width} * #{math.sqrt(2)} / 2);
1013
$pop-over-bg-color: var(--rp-pop-over-bg-color, rgba(94, 96, 102, 0.9)) !default;
1114
$pop-over-text-color: var(--rp-pop-over-text-color, white) !default;
1215
$pop-over-line-height: var(--rp-pop-over-line-height, 19px) !default;
@@ -22,22 +25,22 @@ $pop-over-border-color: var(--rp-pop-over-border-color, transparent) !default;
2225
}
2326

2427
[data-tippy-root] {
25-
max-width: calc(100vw - 10px)
28+
max-width: calc(100vw - 10px);
2629
}
2730

2831
.tippy-box {
2932
position: relative;
30-
transition-property: transform, visibility, opacity
33+
transition-property: transform, visibility, opacity;
3134
}
3235

3336
.tippy-box[data-inertia][data-state=visible] {
34-
transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11)
37+
transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);
3538
}
3639

3740
.tippy-content {
3841
position: relative;
3942
line-height: $pop-over-line-height;
40-
z-index: 1
43+
z-index: 1;
4144
}
4245
}
4346

@@ -61,13 +64,13 @@ $pop-over-border-color: var(--rp-pop-over-border-color, transparent) !default;
6164
position: relative;
6265
overflow: hidden;
6366
display: flex;
64-
width: calc(#{$pop-over-arrow-size} * 1.5);
65-
height: calc(#{$pop-over-arrow-size} * 1.5);
67+
width: $pop-over-arrow-width;
68+
height: $pop-over-arrow-height;
6669
&:before {
6770
content: "";
6871
display: block;
69-
width: $pop-over-arrow-size;
70-
height: $pop-over-arrow-size;
72+
width: $pop-over-arrow-width;
73+
height: $pop-over-arrow-width;
7174
background-color: $pop-over-bg-color;
7275
border-width: $pop-over-border-width;
7376
border-color: $pop-over-border-color;
@@ -81,7 +84,7 @@ $pop-over-border-color: var(--rp-pop-over-border-color, transparent) !default;
8184
justify-content: center;
8285
align-items: flex-start;
8386
&:before {
84-
margin-top: calc(-1 * #{$pop-over-arrow-size} / 2 - #{$pop-over-border-width} * 2);
87+
margin-top: $pop-over-arrow-nesting;
8588
}
8689
}
8790

@@ -90,25 +93,29 @@ $pop-over-border-color: var(--rp-pop-over-border-color, transparent) !default;
9093
align-items: flex-end;
9194
bottom: 100%;
9295
&:before {
93-
margin-bottom: calc(-1 * #{$pop-over-arrow-size} / 2 - #{$pop-over-border-width} * 2);
96+
margin-bottom: $pop-over-arrow-nesting;
9497
}
9598
}
9699

97100
&[data-placement^='left'] > :global(.tippy-arrow) {
98101
justify-content: flex-start;
99102
align-items: center;
100103
left: 100%;
104+
width: $pop-over-arrow-height;
105+
height: $pop-over-arrow-width;
101106
&:before {
102-
margin-left: calc(-1 * #{$pop-over-arrow-size} / 2 - #{$pop-over-border-width} * 2);
107+
margin-left: $pop-over-arrow-nesting;
103108
}
104109
}
105110

106111
&[data-placement^='right'] > :global(.tippy-arrow) {
107112
justify-content: flex-end;
108113
align-items: center;
109114
right: 100%;
115+
width: $pop-over-arrow-height;
116+
height: $pop-over-arrow-width;
110117
&:before {
111-
margin-right: calc(-1 * #{$pop-over-arrow-size} / 2 - #{$pop-over-border-width} * 2);
118+
margin-right: $pop-over-arrow-nesting;
112119
}
113120
}
114121
}

0 commit comments

Comments
 (0)