Skip to content

Commit d532592

Browse files
committed
Remove line between popover and arrow
1 parent c104d82 commit d532592

File tree

3 files changed

+21
-19
lines changed

3 files changed

+21
-19
lines changed

src/components/Popover/Popover.module.scss

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,52 +51,52 @@
5151

5252
// Sides
5353
.isRootAtTop {
54-
bottom: 100%;
54+
bottom: calc(100% + #{theme.$arrow-gap} - #{theme.$arrow-safe-rendering-overlap});
5555
}
5656

5757
.isRootAtBottom {
58-
top: 100%;
58+
top: calc(100% + #{theme.$arrow-gap} - #{theme.$arrow-safe-rendering-overlap});
5959
}
6060

6161
.isRootAtLeft {
62-
right: 100%;
62+
right: calc(100% + #{theme.$arrow-gap} - #{theme.$arrow-safe-rendering-overlap});
6363
}
6464

6565
.isRootAtRight {
66-
left: 100%;
66+
left: calc(100% + #{theme.$arrow-gap} - #{theme.$arrow-safe-rendering-overlap});
6767
}
6868

6969
// Arrows
7070
.isRootAtTop > .arrow {
71-
top: 100%;
71+
top: calc(100% - #{theme.$arrow-safe-rendering-overlap});
7272
}
7373

7474
.isRootAtBottom > .arrow {
75-
bottom: 100%;
75+
bottom: calc(100% - #{theme.$arrow-safe-rendering-overlap});
7676
}
7777

7878
.isRootAtLeft > .arrow {
79-
left: 100%;
79+
left: calc(100% - #{theme.$arrow-safe-rendering-overlap});
8080
}
8181

8282
.isRootAtRight > .arrow {
83-
right: 100%;
83+
right: calc(100% - #{theme.$arrow-safe-rendering-overlap});
8484
}
8585

8686
// Side alignments: top
8787
.isRootAtTop.isRootAtCenter {
8888
left: 50%;
89-
transform: translate(-50%, #{-1 * theme.$arrow-height});
89+
transform: translate(-50%, calc(-1 * #{theme.$arrow-height}));
9090
}
9191

9292
.isRootAtTop.isRootAtStart {
9393
left: 0;
94-
transform: translate(0, #{-1 * theme.$arrow-height});
94+
transform: translate(0, calc(-1 * #{theme.$arrow-height}));
9595
}
9696

9797
.isRootAtTop.isRootAtEnd {
9898
right: 0;
99-
transform: translate(0, #{-1 * theme.$arrow-height});
99+
transform: translate(0, calc(-1 * #{theme.$arrow-height}));
100100
}
101101

102102
.isRootAtTop.isRootAtCenter > .arrow {
@@ -148,17 +148,17 @@
148148
// Side alignments: left
149149
.isRootAtLeft.isRootAtCenter {
150150
top: 50%;
151-
transform: translate(#{-1 * theme.$arrow-height}, -50%);
151+
transform: translate(calc(-1 * #{theme.$arrow-height}), -50%);
152152
}
153153

154154
.isRootAtLeft.isRootAtStart {
155155
top: 0;
156-
transform: translate(#{-1 * theme.$arrow-height}, 0);
156+
transform: translate(calc(-1 * #{theme.$arrow-height}), 0);
157157
}
158158

159159
.isRootAtLeft.isRootAtEnd {
160160
bottom: 0;
161-
transform: translate(#{-1 * theme.$arrow-height}, 0);
161+
transform: translate(calc(-1 * #{theme.$arrow-height}), 0);
162162
}
163163

164164
.isRootAtLeft.isRootAtCenter > .arrow {
@@ -216,15 +216,15 @@
216216
}
217217

218218
.isRootControlled.isRootAtTop {
219-
transform: translate(0, #{-1 * theme.$arrow-height}); // 2.
219+
transform: translate(0, calc(-1 * #{theme.$arrow-height})); // 2.
220220
}
221221

222222
.isRootControlled.isRootAtBottom {
223223
transform: translate(0, #{theme.$arrow-height}); // 2.
224224
}
225225

226226
.isRootControlled.isRootAtLeft {
227-
transform: translate(#{-1 * theme.$arrow-height}, 0); // 2.
227+
transform: translate(calc(-1 * #{theme.$arrow-height}), 0); // 2.
228228
}
229229

230230
.isRootControlled.isRootAtRight {

src/components/Popover/_theme.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ $color: var(--rui-Popover__color);
1111
$background-color: var(--rui-Popover__background-color);
1212
$box-shadow: var(--rui-Popover__box-shadow);
1313

14-
$arrow-width: 1rem;
15-
$arrow-height: math.div($arrow-width, 2); // 1.
14+
$arrow-safe-rendering-overlap: 1px;
15+
$arrow-gap: 1px;
16+
$arrow-width: calc(1rem + #{$arrow-safe-rendering-overlap * 2});
17+
$arrow-height: calc($arrow-width / 2); // 1.
1618
$arrow-corner-offset: 0.75rem;

webpack.config.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const TerserPlugin = require('terser-webpack-plugin');
55
const VisualizerPlugin = require('webpack-visualizer-plugin2');
66

77
const MAX_DEVELOPMENT_OUTPUT_SIZE = 3300000;
8-
const MAX_PRODUCTION_OUTPUT_SIZE = 420000;
8+
const MAX_PRODUCTION_OUTPUT_SIZE = 430000;
99

1010
module.exports = (env, argv) => ({
1111
devtool: argv.mode === 'production'

0 commit comments

Comments
 (0)