Skip to content

Commit

Permalink
fix: Add rtl styling for Skip Navigation link
Browse files Browse the repository at this point in the history
Without this styling, RTL languages will overflow to the left, rather
than hiding the link.
  • Loading branch information
sebvilhelm committed Mar 23, 2020
1 parent 87a2952 commit 3e64455
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ ul {
z-index: -999;
}

[dir="rtl"] .skip-navigation {
left: initial;
right: -999px;
}

.skip-navigation:focus, .skip-navigation:active {
left: auto;
overflow: auto;
Expand All @@ -730,6 +735,11 @@ ul {
z-index: 999;
}

[dir="rtl"] .skip-navigation:focus, [dir="rtl"] .skip-navigation:active {
left: initial;
right: auto;
}

/***** User info in header *****/
.user-info {
display: inline-block;
Expand Down
12 changes: 12 additions & 0 deletions styles/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ $header-height: 71px;
top: auto;
z-index: -999;


[dir="rtl"] & {
left: initial;
right: -999px;
}

&:focus,
&:active {
left: auto;
Expand All @@ -115,5 +121,11 @@ $header-height: 71px;
text-decoration: none;
top: auto;
z-index: 999;


[dir="rtl"] & {
left: initial;
right: auto;
}
}
}

0 comments on commit 3e64455

Please sign in to comment.