Skip to content

Commit 9386b15

Browse files
Add styles for focus in button
1 parent e557ee1 commit 9386b15

File tree

1 file changed

+54
-44
lines changed

1 file changed

+54
-44
lines changed

src/css/_modebar.scss

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,85 @@
11
.modebar {
2-
position: absolute;
3-
top: 2px;
4-
right: 2px;
2+
position: absolute;
3+
top: 2px;
4+
right: 2px;
55
}
66

77
.ease-bg {
88
@include vendor('transition', background-color 0.3s ease 0s);
99
}
1010

1111
.modebar--hover > :not(.watermark) {
12-
opacity: 0;
12+
opacity: 0;
1313
@include vendor('transition', opacity 0.3s ease 0s);
1414
}
1515

1616
&:hover .modebar--hover .modebar-group {
17-
opacity: 1;
17+
opacity: 1;
1818
}
1919

2020
&:focus-within .modebar--hover .modebar-group {
2121
opacity: 1;
2222
}
2323

2424
.modebar-group {
25-
float: left;
26-
display: inline-block;
27-
box-sizing: border-box;
28-
padding-left: 8px;
29-
position: relative;
30-
vertical-align: middle;
31-
white-space: nowrap;
25+
float: left;
26+
display: inline-block;
27+
box-sizing: border-box;
28+
padding-left: 8px;
29+
position: relative;
30+
vertical-align: middle;
31+
white-space: nowrap;
32+
33+
a {
34+
display: grid;
35+
place-content: center;
36+
}
3237
}
3338

3439
.modebar-btn {
40+
position: relative;
41+
font-size: 16px;
42+
padding: 3px 4px;
43+
height: 22px;
44+
/* display: inline-block; including this breaks 3d interaction in .embed mode. Chrome bug? */
45+
cursor: pointer;
46+
line-height: normal;
47+
box-sizing: border-box;
48+
border: none;
49+
background: transparent;
50+
51+
svg {
3552
position: relative;
36-
font-size: 16px;
37-
padding: 3px 4px;
38-
height: 22px;
39-
/* display: inline-block; including this breaks 3d interaction in .embed mode. Chrome bug? */
40-
cursor: pointer;
41-
line-height: normal;
42-
box-sizing: border-box;
43-
border: none;
44-
background: transparent;
45-
svg {
46-
position: relative;
47-
top: 2px;
48-
}
53+
}
4954

50-
&.modebar-btn--logo {
55+
&:focus-visible {
56+
outline: 1px solid black;
57+
outline-offset: 1px;
58+
border-radius: 3px;
59+
}
5160

52-
}
61+
&.modebar-btn--logo {
62+
}
5363
}
5464

5565
.modebar.vertical {
56-
display: flex;
57-
flex-direction: column;
58-
flex-wrap: wrap;
59-
align-content: flex-end;
60-
max-height: 100%;
61-
svg {
62-
top: -1px;
63-
}
64-
.modebar-group {
65-
display: block;
66-
float: none;
67-
padding-left: 0px;
68-
padding-bottom: 8px;
66+
display: flex;
67+
flex-direction: column;
68+
flex-wrap: wrap;
69+
align-content: flex-end;
70+
max-height: 100%;
71+
svg {
72+
top: -1px;
73+
}
74+
.modebar-group {
75+
display: block;
76+
float: none;
77+
padding-left: 0px;
78+
padding-bottom: 8px;
6979

70-
.modebar-btn {
71-
display: block;
72-
text-align: center;
73-
}
80+
.modebar-btn {
81+
display: block;
82+
text-align: center;
7483
}
84+
}
7585
}

0 commit comments

Comments
 (0)