Skip to content

Commit 9a76dbd

Browse files
authored
fix: fontawesome icon visibility styles (@MirruK) (#7436)
Add styles for fontawesome icons to respect hidden and invisible classes ### Description Icons were removed from layers, this caused the .hidden class to not have any effect on icons, this fixes the problem globally
1 parent 860c0b8 commit 9a76dbd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

frontend/src/styles/vendor.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
@import "fontawesome-5"; // the screenshotting library has some issues with css layers
22

3+
/* fontawesome icon styles do not respect the hidden class from the hidden layer.
4+
* By having these rules outside any layer we make sure that the display none is
5+
* correctly applied when an element possesses both a .fa* class and the hidden class */
6+
.fas.hidden,
7+
.fab.hidden,
8+
.fa.hidden,
9+
.far.hidden {
10+
display: none;
11+
}
12+
13+
// same for invisible
14+
.fas.invisible,
15+
.fab.invisible,
16+
.fa.invisible,
17+
.far.invisible {
18+
opacity: 0;
19+
pointer-events: none;
20+
visibility: hidden;
21+
}
22+
323
@import "normalize.css" layer(normalize);
424
@layer vendor {
525
@import "slim-select/styles";

0 commit comments

Comments
 (0)