Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit cda18a3

Browse files
authored
Improve CSS rules of zoom buttons on live location (#8728)
* Use flex to stop redundant margin-top from appearing Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove ButtonResetDefault which resets nothing It should be avoided to use ButtonResetDefault where there is nothing to be reset, in order to prevent resources from being wasted. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Ensure that unexpected regressions will never happen on the buttons and their icons Rules can be extracted when needed. Until then there is no point of exposing elements to possible regressions, which could easily happen on the current architecture. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use SASS variables and remove a redundant declaration Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
1 parent 68ce7bf commit cda18a3

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

res/css/components/views/location/_ZoomButtons.scss

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,28 @@ limitations under the License.
1818
position: absolute;
1919
bottom: $spacing-32;
2020
right: $spacing-24;
21-
}
22-
23-
.mx_ZoomButtons_button {
24-
@mixin ButtonResetDefault;
25-
26-
margin-top: $spacing-8;
27-
border-radius: 4px;
2821
display: flex;
29-
flex-direction: row;
30-
justify-content: center;
31-
align-items: center;
32-
33-
height: 24px;
34-
width: 24px;
35-
36-
background: $background;
37-
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
38-
}
39-
40-
.mx_ZoomButtons_icon {
41-
height: 10px;
42-
width: 10px;
43-
44-
color: $primary-content;
22+
flex-direction: column;
23+
row-gap: $spacing-8;
24+
25+
.mx_ZoomButtons_button {
26+
$ZoomButtons_button-size: 24px;
27+
28+
border-radius: 4px;
29+
display: flex;
30+
justify-content: center;
31+
align-items: center;
32+
height: $ZoomButtons_button-size;
33+
width: $ZoomButtons_button-size;
34+
background: $background;
35+
box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.25);
36+
37+
.mx_ZoomButtons_icon {
38+
$ZoomButtons_icon-size: 10px;
39+
40+
height: $ZoomButtons_icon-size;
41+
width: $ZoomButtons_icon-size;
42+
color: $primary-content;
43+
}
44+
}
4545
}

0 commit comments

Comments
 (0)