Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions assets/scss/_desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@ $vendor-strip-height: 44px;

@media screen and (min-width: 1024px) {

body:dir(rtl) {
overflow-x: hidden;
}

table:dir(rtl) {
text-align: right;
direction: rtl;
}

.breadcrumb-item:dir(rtl) + .breadcrumb-item:dir(rtl)::before {
float: right;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this affect breadcrumb of ltr pages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you’re absolutely right, and I’ve fixed it.
Many thanks, @bsalamat

}

.td-home {
.header-hero {
#vendorStrip {
Expand Down Expand Up @@ -34,6 +47,9 @@ $vendor-strip-height: 44px;
p {
text-align: left
}
p:dir(rtl) {
text-align: right
}

.image-wrapper {
position: absolute;
Expand Down
12 changes: 9 additions & 3 deletions assets/scss/_documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,20 @@ div.feature-state-notice {

// All callout headings should be bold
.alert {
border-style: solid;
border-width: 0 0 0 4px;
border-radius: 0 0 2rem 0;
h4 {
font-weight: bold;
font-style: initial;
}
}
.alert:dir(ltr) {
// color the left border (left-to-right locales)
border-width: 0 0 0 4px;
}

.alert:dir(rtl) {
// color the right border (right-to-left locales)
border-width: 0 4px 0 0;
}

.glossary-tooltip {
display: inline-block;
Expand Down
13 changes: 13 additions & 0 deletions assets/scss/_tablet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ $vendor-strip-font-size: 16px;
display: none;
}

body:dir(rtl) {
overflow-x: hidden;
}

table:dir(rtl) {
text-align: right;
direction: rtl;
}

.td-home {
#viewDocs,
#tryKubernetes {
Expand Down Expand Up @@ -118,6 +127,10 @@ $vendor-strip-font-size: 16px;
text-align: left;
margin: 0 5% 15px 0;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optionally:

Suggested change
&:dir(ltr) > .light-text {
display: block;
float: right;
text-align: left;
margin: 0 5% 15px 0;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only override RTL ones and do not change anything related to current state of Kubernetes website

&:dir(rtl) > .light-text {
text-align: right;
}
}

#mobileShowVideoButton {
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="{{.Params.class}} no-js">
<html lang="{{ .Site.Language.Lang }}" class="{{.Params.class}} no-js" dir="{{ or .Site.Language.LanguageDirection `ltr` }}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks just right.

{{- if eq hugo.Environment "preview" -}}
<!-- deploy preview -->
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<html lang="{{ .Site.Language.Lang }}" class="no-js" dir="{{ or .Site.Language.LanguageDirection `ltr` }}">
<head>
{{ with .Params.canonicalUrl }}
<link rel="canonical" href="{{ . }}">
Expand Down
2 changes: 1 addition & 1 deletion layouts/docs/baseof.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<html lang="{{ .Site.Language.Lang }}" class="no-js" dir="{{ or .Site.Language.LanguageDirection `ltr` }}">
<head>
{{ partial "head.html" . }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
Expand Down