Skip to content

Commit 4e2e258

Browse files
author
Sine Jespersen
committed
bemified scss
1 parent 59eb299 commit 4e2e258

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

src/stories/Library/Modals/modal-loan/ModalLoan.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const ModalLoan: React.FC<ModalLoanProps> = ({
171171
shoulShowModal ? "modal-show" : ""
172172
}`}
173173
>
174-
<div className="modal-screen-reader-description">
174+
<div className="modal__screen-reader-description">
175175
Denne modal dækker sidens indhold, og er en demo
176176
</div>
177177
<ModalCloseButton toggleModal={toggleModal} />

src/styles/scss/shared.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,7 @@
1515
*
1616
* https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/modules/system/css/components/hidden.module.css#L18-33
1717
*/
18-
.hide-visually {
19-
position: absolute;
20-
left: -10000px;
21-
width: 1px;
22-
height: 1px;
23-
overflow: hidden;
24-
}
25-
26-
.modal-screen-reader-description {
18+
@mixin hide-visually {
2719
position: absolute;
2820
clip: rect(1px, 1px, 1px, 1px);
2921
padding: 0;
@@ -58,6 +50,10 @@
5850
transition: opacity 0.3s;
5951
min-height: 100vh;
6052
height: 100%;
53+
54+
&__screen-reader-description {
55+
@include hide-visually;
56+
}
6157
}
6258

6359
.modal-padding {

0 commit comments

Comments
 (0)