Skip to content

Commit 7a2b900

Browse files
committed
ui-core: adapt tooltip position
Change the element receiving the relative position in order to improve scalability for positioning elements relative to it. Signed-off-by: SharglutDev <[email protected]>
1 parent d1f2f1b commit 7a2b900

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

ui-core/src/styles/inputs/fieldWrapper.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
--status-message-wrapper-tooltip--offset: 4px;
55

66
border-radius: 0.5rem;
7-
position: relative;
87
padding: 0.625rem 0.813rem 1rem 1rem;
98

109
&.success:not(:has(.status-message-wrapper-tooltip)) {
@@ -24,6 +23,8 @@
2423
}
2524

2625
.custom-field {
26+
position: relative;
27+
2728
display: flex;
2829
flex-direction: column;
2930

ui-core/src/styles/inputs/label.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
.required {
1010
position: absolute;
11-
left: -0.5rem;
11+
left: -24px;
1212
border-radius: 0.031rem;
1313
@apply text-info-30;
1414
}

ui-core/src/styles/inputs/statusMessage.css

+3-6
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
display: flex;
3838
align-items: center;
3939
width: 320px;
40-
top: calc(
41-
100% - var(--input-wrapper-padding) - var(--field-wrapper-padding-bottom) -
42-
var(--status-message-wrapper-tooltip--offset)
43-
);
40+
top: calc(100% - var(--input-wrapper-padding) - var(--status-message-wrapper-tooltip--offset));
4441
gap: 12px;
4542
border-radius: 8px;
4643
box-shadow:
@@ -84,11 +81,11 @@
8481
}
8582

8683
&.tooltip-left {
87-
left: 8px;
84+
left: -6px;
8885
}
8986

9087
&.tooltip-right {
91-
right: 8px;
88+
right: -2px;
9289
}
9390

9491
.status-message {

0 commit comments

Comments
 (0)