Switched to logical CSS properties

This commit is contained in:
squidfunk 2021-12-13 19:10:58 +01:00
parent 306cc73013
commit bfe7540d2a
35 changed files with 123 additions and 489 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -34,7 +34,7 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.23b6d78a.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/main.f8ff4087.min.css' | url }}">
{% if config.theme.palette %} {% if config.theme.palette %}
{% set palette = config.theme.palette %} {% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}"> <link rel="stylesheet" href="{{ 'assets/stylesheets/palette.e6a45f82.min.css' | url }}">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"sources":["src/overrides/assets/stylesheets/main/_typeset.scss","../../../../src/overrides/assets/stylesheets/main.scss","src/assets/stylesheets/utilities/_break.scss","src/overrides/assets/stylesheets/main/layout/_banner.scss","src/overrides/assets/stylesheets/main/layout/_hero.scss","src/overrides/assets/stylesheets/main/layout/_iconsearch.scss","src/overrides/assets/stylesheets/main/layout/_sponsorship.scss"],"names":[],"mappings":"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","file":"main.css"} {"version":3,"sources":["src/overrides/assets/stylesheets/main/_typeset.scss","../../../../src/overrides/assets/stylesheets/main.scss","src/assets/stylesheets/utilities/_break.scss","src/overrides/assets/stylesheets/main/layout/_banner.scss","src/overrides/assets/stylesheets/main/layout/_hero.scss","src/overrides/assets/stylesheets/main/layout/_iconsearch.scss","src/overrides/assets/stylesheets/main/layout/_sponsorship.scss"],"names":[],"mappings":"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","file":"main.css"}

View File

@ -3,7 +3,7 @@
-#} -#}
{% extends "base.html" %} {% extends "base.html" %}
{% block extrahead %} {% block extrahead %}
<link rel="stylesheet" href="{{ 'overrides/assets/stylesheets/main.b745cb77.min.css' | url }}"> <link rel="stylesheet" href="{{ 'overrides/assets/stylesheets/main.bf23d911.min.css' | url }}">
{% endblock %} {% endblock %}
{% block announce %} {% block announce %}
<a href="https://twitter.com/squidfunk"> <a href="https://twitter.com/squidfunk">

View File

@ -35,27 +35,22 @@
float: left; float: left;
width: px2rem(234px); width: px2rem(234px);
margin-top: 0; margin-top: 0;
margin-right: px2rem(16px); margin-inline-end: px2rem(16px);
margin-bottom: px2rem(16px); margin-bottom: px2rem(16px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
float: right; float: right;
margin-right: 0;
margin-left: px2rem(16px);
} }
// Modifier to move to end (ltr: right, rtl: left) // Modifier to move to end (ltr: right, rtl: left)
&.end { &.end {
float: right; float: right;
margin-right: 0; margin-inline: px2rem(16px) 0;
margin-left: px2rem(16px);
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
float: left; float: left;
margin-right: px2rem(16px);
margin-left: 0;
} }
} }
} }

View File

@ -292,7 +292,7 @@ kbd {
// Tooltip // Tooltip
&[title]:where(:focus, :hover)::after { &[title]:where(:focus, :hover)::after {
position: absolute; position: absolute;
left: 0; inset-inline-start: 0;
display: inline-block; display: inline-block;
width: auto; width: auto;
min-width: max-content; min-width: max-content;
@ -316,28 +316,14 @@ kbd {
// Superscript and subscript // Superscript and subscript
:where(sup, sub) { :where(sup, sub) {
margin-left: px2em(1px, 12.8px); margin-inline-start: px2em(1px, 12.8px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2em(1px, 12.8px);
margin-left: initial;
}
} }
// Blockquotes, possibly nested // Blockquotes, possibly nested
blockquote { blockquote {
padding-left: px2rem(12px); padding-inline-start: px2rem(12px);
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
border-left: px2rem(4px) solid var(--md-default-fg-color--lighter); border-inline-start: px2rem(4px) solid var(--md-default-fg-color--lighter);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(12px);
padding-left: initial;
border-right: px2rem(4px) solid var(--md-default-fg-color--lighter);
border-left: initial;
}
} }
// Unordered list // Unordered list
@ -347,7 +333,7 @@ kbd {
// Unordered and ordered list // Unordered and ordered list
:where(ul, ol) { :where(ul, ol) {
margin-left: px2em(10px); margin-inline-start: px2em(10px);
padding: 0; padding: 0;
// Adjust display mode if not hidden // Adjust display mode if not hidden
@ -355,12 +341,6 @@ kbd {
display: flow-root; display: flow-root;
} }
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2em(10px);
margin-left: initial;
}
// Nested ordered list // Nested ordered list
ol { ol {
list-style-type: lower-alpha; list-style-type: lower-alpha;
@ -374,13 +354,7 @@ kbd {
// List element // List element
li { li {
margin-bottom: 0.5em; margin-bottom: 0.5em;
margin-left: px2em(20px); margin-inline-start: px2em(20px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2em(20px);
margin-left: initial;
}
// Adjust spacing // Adjust spacing
:where(p, blockquote) { :where(p, blockquote) {
@ -394,26 +368,16 @@ kbd {
// Nested list // Nested list
:where(ul, ol) { :where(ul, ol) {
margin: 0.5em 0 0.5em px2em(10px); margin-block: 0.5em;
margin-inline-start: px2em(10px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2em(10px);
margin-left: initial;
}
} }
} }
} }
// Definition list // Definition list
dd { dd {
margin: 1em 0 1.5em px2em(30px); margin-block: 1em 1.5em;
margin-inline-start: px2em(30px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2em(30px);
margin-left: initial;
}
} }
// Image or icon // Image or icon
@ -563,7 +527,7 @@ kbd {
display: inline-block; display: inline-block;
width: 1.2em; width: 1.2em;
height: 1.2em; height: 1.2em;
margin-left: 0.5em; margin-inline-start: 0.5em;
vertical-align: text-bottom; vertical-align: text-bottom;
mask-image: var(--md-typeset-table-sort-icon); mask-image: var(--md-typeset-table-sort-icon);
mask-repeat: no-repeat; mask-repeat: no-repeat;

View File

@ -71,7 +71,7 @@ $admonitions: (
page-break-inside: avoid; page-break-inside: avoid;
background-color: var(--md-admonition-bg-color); background-color: var(--md-admonition-bg-color);
border: 0 solid $clr-blue-a200; border: 0 solid $clr-blue-a200;
border-left-width: px2rem(4px); border-inline-start-width: px2rem(4px);
border-radius: px2rem(2px); border-radius: px2rem(2px);
box-shadow: var(--md-shadow-z1); box-shadow: var(--md-shadow-z1);
@ -86,12 +86,6 @@ $admonitions: (
box-sizing: border-box; box-sizing: border-box;
} }
// Adjust for right-to-left languages
[dir="rtl"] & {
border-right-width: px2rem(4px);
border-left-width: 0;
}
// Adjust vertical spacing for nested admonitions // Adjust vertical spacing for nested admonitions
:where(.admonition, details) { :where(.admonition, details) {
margin-top: 1em; margin-top: 1em;
@ -122,21 +116,15 @@ $admonitions: (
// Admonition title // Admonition title
:where(.admonition-title, summary) { :where(.admonition-title, summary) {
position: relative; position: relative;
margin: 0 px2rem(-12px) 0 px2rem(-16px); margin-block: 0;
padding: px2rem(8px) px2rem(12px) px2rem(8px) px2rem(40px); margin-inline: px2rem(-16px) px2rem(-12px);
padding-block: px2rem(8px);
padding-inline: px2rem(40px) px2rem(12px);
font-weight: 700; font-weight: 700;
background-color: color.adjust($clr-blue-a200, $alpha: -0.9); background-color: color.adjust($clr-blue-a200, $alpha: -0.9);
border: 0 solid $clr-blue-a200; border: 0 solid $clr-blue-a200;
border-left-width: px2rem(4px); border-inline-start-width: px2rem(4px);
border-top-left-radius: px2rem(2px); border-start-start-radius: px2rem(2px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin: 0 px2rem(-16px) 0 px2rem(-12px);
padding: px2rem(8px) px2rem(40px) px2rem(8px) px2rem(12px);
border-right-width: px2rem(4px);
border-left-width: 0;
}
// Adjust spacing for title-only admonitions // Adjust spacing for title-only admonitions
html &:last-child { html &:last-child {
@ -147,7 +135,7 @@ $admonitions: (
&::before { &::before {
position: absolute; position: absolute;
top: px2em(10px); top: px2em(10px);
left: px2rem(12px); inset-inline-start: px2rem(12px);
width: px2rem(20px); width: px2rem(20px);
height: px2rem(20px); height: px2rem(20px);
background-color: $clr-blue-a200; background-color: $clr-blue-a200;
@ -155,12 +143,6 @@ $admonitions: (
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-size: contain; mask-size: contain;
content: ""; content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(12px);
left: initial;
}
} }
} }
} }

View File

@ -41,7 +41,7 @@
// Footnote list - omit left indentation // Footnote list - omit left indentation
> ol { > ol {
margin-left: 0; margin-inline-start: 0;
// Footnote item - footnote items can contain lists, so we need to scope // Footnote item - footnote items can contain lists, so we need to scope
// the spacing adjustments to the top-level footnote item. // the spacing adjustments to the top-level footnote item.

View File

@ -30,7 +30,7 @@
// Headerlink // Headerlink
.headerlink { .headerlink {
display: inline-block; display: inline-block;
margin-left: px2rem(10px); margin-inline-start: px2rem(10px);
color: var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--lighter);
opacity: 0; opacity: 0;
transition: transition:
@ -41,12 +41,6 @@
@media print { @media print {
display: none; display: none;
} }
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(10px);
margin-left: initial;
}
} }
// Show headerlinks on parent hover // Show headerlinks on parent hover

View File

@ -61,8 +61,7 @@
.critic.block { .critic.block {
display: block; display: block;
margin: 1em 0; margin: 1em 0;
padding-right: px2rem(16px); padding-inline: px2rem(16px);
padding-left: px2rem(16px);
overflow: auto; overflow: auto;
box-shadow: none; box-shadow: none;

View File

@ -64,16 +64,11 @@
summary { summary {
display: block; display: block;
min-height: px2rem(20px); min-height: px2rem(20px);
padding-right: px2rem(36px); padding-inline-end: px2rem(36px);
border-top-left-radius: px2rem(2px); border-start-start-radius: px2rem(2px);
border-top-right-radius: px2rem(2px); border-start-end-radius: px2rem(2px);
cursor: pointer; cursor: pointer;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding: px2rem(8px) px2rem(44px) px2rem(8px) px2rem(36px);
}
// Show outline for keyboard devices // Show outline for keyboard devices
&.focus-visible { &.focus-visible {
outline-color: var(--md-accent-fg-color); outline-color: var(--md-accent-fg-color);
@ -90,7 +85,7 @@
&::after { &::after {
position: absolute; position: absolute;
top: px2em(10px); top: px2em(10px);
right: px2rem(8px); inset-inline-end: px2rem(8px);
width: px2rem(20px); width: px2rem(20px);
height: px2rem(20px); height: px2rem(20px);
background-color: currentColor; background-color: currentColor;
@ -103,8 +98,6 @@
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
right: initial;
left: px2rem(8px);
transform: rotate(180deg); transform: rotate(180deg);
} }
} }

View File

@ -191,8 +191,7 @@
// don't overlay line numbers, as active annotations have a `z-index` of 2. // don't overlay line numbers, as active annotations have a `z-index` of 2.
z-index: 3; z-index: 3;
float: left; float: left;
margin-right: px2em(16px, 13.6px); margin-inline: px2em(16px, 13.6px);
margin-left: px2em(-16px, 13.6px);
padding-left: px2em(16px, 13.6px); padding-left: px2em(16px, 13.6px);
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
background-color: var(--md-code-bg-color); background-color: var(--md-code-bg-color);

View File

@ -94,11 +94,9 @@
"page-up": "\21DE", "page-up": "\21DE",
"print-screen": "\2399" "print-screen": "\2399"
) { ) {
.key-#{$name} { .key-#{$name}::before {
&::before { padding-right: px2em(6.4px);
padding-right: px2em(6.4px); content: $code;
content: $code;
}
} }
} }
@ -108,11 +106,9 @@
"num-enter": "\2324", "num-enter": "\2324",
"enter": "\23CE" "enter": "\23CE"
) { ) {
.key-#{$name} { .key-#{$name}::after {
&::after { padding-left: px2em(6.4px);
padding-left: px2em(6.4px); content: $code;
content: $code;
}
} }
} }
} }

View File

@ -162,8 +162,8 @@
// Omit rounded borders // Omit rounded borders
> code { > code {
border-top-left-radius: 0; border-start-start-radius: 0;
border-top-right-radius: 0; border-start-end-radius: 0;
} }
} }
@ -185,28 +185,14 @@
.md-content__inner > .tabbed-set .tabbed-labels { .md-content__inner > .tabbed-set .tabbed-labels {
max-width: 100vw; max-width: 100vw;
margin: 0 px2rem(-16px); margin: 0 px2rem(-16px);
padding-left: px2rem(16px); padding-inline-start: px2rem(16px);
scroll-padding-left: px2rem(16px); scroll-padding-inline-start: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(16px);
padding-left: initial;
scroll-padding-right: px2rem(16px);
scroll-padding-left: initial;
}
// Hack: some browsers ignore the right padding on flex containers, // Hack: some browsers ignore the right padding on flex containers,
// see https://bit.ly/3lsPS3S // see https://bit.ly/3lsPS3S
&::after { &::after {
padding-right: px2rem(16px); padding-inline-end: px2rem(16px);
content: ""; content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: initial;
padding-left: px2rem(16px);
}
} }
} }
} }

View File

@ -47,13 +47,7 @@
[type="checkbox"] { [type="checkbox"] {
position: absolute; position: absolute;
top: 0.45em; top: 0.45em;
left: -2em; inset-inline-start: -2em;
// Adjust for right-to-left languages
[dir="rtl"] & {
right: -2em;
left: initial;
}
} }
} }
@ -67,7 +61,7 @@
.task-list-indicator::before { .task-list-indicator::before {
position: absolute; position: absolute;
top: 0.15em; top: 0.15em;
left: px2em(-24px); inset-inline-start: px2em(-24px);
width: px2em(20px); width: px2em(20px);
height: px2em(20px); height: px2em(20px);
background-color: var(--md-default-fg-color--lightest); background-color: var(--md-default-fg-color--lightest);
@ -75,12 +69,6 @@
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-size: contain; mask-size: contain;
content: ""; content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2em(-24px);
left: initial;
}
} }
// Tasklist indicator in checked state // Tasklist indicator in checked state

View File

@ -82,8 +82,7 @@ body {
// to `1220px`, and they are rendered centered if the screen is larger. // to `1220px`, and they are rendered centered if the screen is larger.
.md-grid { .md-grid {
max-width: px2rem(1220px); max-width: px2rem(1220px);
margin-right: auto; margin-inline: auto;
margin-left: auto;
} }
// Main container // Main container

View File

@ -42,30 +42,12 @@
// Sidebar with navigation is visible // Sidebar with navigation is visible
.md-sidebar--primary:not([hidden]) ~ .md-content > & { .md-sidebar--primary:not([hidden]) ~ .md-content > & {
margin-inline-start: px2rem(24px);
// Adjust for left-to-right languages
[dir="ltr"] & {
margin-left: px2rem(24px);
}
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(24px);
}
} }
// Sidebar with table of contents is visible // Sidebar with table of contents is visible
.md-sidebar--secondary:not([hidden]) ~ .md-content > & { .md-sidebar--secondary:not([hidden]) ~ .md-content > & {
margin-inline-end: px2rem(24px);
// Adjust for left-to-right languages
[dir="ltr"] & {
margin-right: px2rem(24px);
}
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-left: px2rem(24px);
}
} }
} }
@ -88,7 +70,7 @@
&__button { &__button {
float: right; float: right;
margin: px2rem(8px) 0; margin: px2rem(8px) 0;
margin-left: px2rem(8px); margin-inline-start: px2rem(8px);
padding: 0; padding: 0;
// [print]: Hide buttons // [print]: Hide buttons
@ -99,13 +81,6 @@
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
float: left; float: left;
margin-right: px2rem(8px);
margin-left: initial;
// Flip icon vertically
svg {
transform: scaleX(-1);
}
} }
// Adjust default link color for icons // Adjust default link color for icons
@ -117,6 +92,11 @@
svg { svg {
display: inline; display: inline;
vertical-align: top; vertical-align: top;
// Adjust for right-to-left languages
[dir="rtl"] & {
transform: scaleX(-1);
}
} }
} }
} }

View File

@ -27,9 +27,8 @@
// Dialog // Dialog
.md-dialog { .md-dialog {
position: fixed; position: fixed;
right: px2rem(16px); inset-inline-end: px2rem(16px);
bottom: px2rem(16px); bottom: px2rem(16px);
left: initial;
z-index: 4; z-index: 4;
min-width: px2rem(222px); min-width: px2rem(222px);
padding: px2rem(8px) px2rem(12px); padding: px2rem(8px) px2rem(12px);
@ -48,12 +47,6 @@
display: none; display: none;
} }
// Adjust for right-to-left languages
[dir="rtl"] & {
right: initial;
left: px2rem(16px);
}
// Dialog in open state // Dialog in open state
&[data-md-state="open"] { &[data-md-state="open"] {
transform: translateY(0); transform: translateY(0);

View File

@ -61,6 +61,11 @@
opacity: 0.7; opacity: 0.7;
} }
// Adjust for right-to-left languages
[dir="rtl"] & svg {
transform: scaleX(-1);
}
// Footer link to previous page // Footer link to previous page
&--prev { &--prev {
@ -72,32 +77,16 @@
display: none; display: none;
} }
} }
// Adjust for right-to-left languages
[dir="rtl"] & {
// Flip icon vertically
svg {
transform: scaleX(-1);
}
}
} }
// Footer link to next page // Footer link to next page
&--next { &--next {
margin-left: auto; margin-inline-start: auto;
text-align: right; text-align: right;
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: auto;
margin-left: initial;
text-align: left; text-align: left;
// Flip icon vertically
svg {
transform: scaleX(-1);
}
} }
} }
} }
@ -121,8 +110,7 @@
// Footer link direction (i.e. prev and next) // Footer link direction (i.e. prev and next)
&__direction { &__direction {
position: absolute; position: absolute;
right: 0; inset-inline: 0;
left: 0;
margin-top: px2rem(-20px); margin-top: px2rem(-20px);
padding: 0 px2rem(20px); padding: 0 px2rem(20px);
font-size: px2rem(12.8px); font-size: px2rem(12.8px);

View File

@ -62,7 +62,8 @@
padding: 0 px2rem(12px); padding: 0 px2rem(12px);
font-size: px2rem(16px); font-size: px2rem(16px);
border-bottom: px2rem(2px) solid var(--md-default-fg-color--lighter); border-bottom: px2rem(2px) solid var(--md-default-fg-color--lighter);
border-radius: px2rem(2px) px2rem(2px) 0 0; border-start-start-radius: px2rem(2px);
border-start-end-radius: px2rem(2px);
box-shadow: var(--md-shadow-z1); box-shadow: var(--md-shadow-z1);
transition: transition:
border 250ms, border 250ms,

View File

@ -29,8 +29,7 @@
.md-header { .md-header {
position: sticky; position: sticky;
top: 0; top: 0;
right: 0; inset-inline: 0;
left: 0;
z-index: 4; z-index: 4;
color: var(--md-primary-bg-color); color: var(--md-primary-bg-color);
background-color: var(--md-primary-fg-color); background-color: var(--md-primary-fg-color);
@ -131,12 +130,8 @@
} }
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & svg {
transform: scaleX(-1);
// Flip icon vertically
svg {
transform: scaleX(-1);
}
} }
} }
@ -185,17 +180,11 @@
&__title { &__title {
flex-grow: 1; flex-grow: 1;
height: px2rem(48px); height: px2rem(48px);
margin-right: px2rem(8px); margin-inline-end: px2rem(8px);
margin-left: px2rem(20px); margin-inline-start: px2rem(20px);
font-size: px2rem(18px); font-size: px2rem(18px);
line-height: px2rem(48px); line-height: px2rem(48px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(20px);
margin-left: px2rem(8px);
}
// Header title in active state, i.e. page title is visible // Header title in active state, i.e. page title is visible
&[data-md-state="active"] .md-header__topic { &[data-md-state="active"] .md-header__topic {
z-index: -1; z-index: -1;
@ -260,23 +249,12 @@
display: block; display: block;
width: px2rem(234px); width: px2rem(234px);
max-width: px2rem(234px); max-width: px2rem(234px);
margin-left: px2rem(20px); margin-inline-start: px2rem(20px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(20px);
margin-left: initial;
}
} }
// [screen +]: Adjust spacing of search bar // [screen +]: Adjust spacing of search bar
@include break-from-device(screen) { @include break-from-device(screen) {
margin-left: px2rem(28px); margin-inline-start: px2rem(28px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(28px);
}
} }
} }
} }

View File

@ -83,13 +83,7 @@
// Navigation item on level 2 // Navigation item on level 2
& & { & & {
padding-right: 0; padding-inline-end: 0;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(12px);
padding-left: 0;
}
} }
} }
@ -175,8 +169,7 @@
&--primary & { &--primary & {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; inset-inline: 0;
left: 0;
z-index: 1; z-index: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -209,18 +202,12 @@
.md-nav__icon { .md-nav__icon {
position: absolute; position: absolute;
top: px2rem(8px); top: px2rem(8px);
left: px2rem(8px); inset-inline-start: px2rem(8px);
display: block; display: block;
width: px2rem(24px); width: px2rem(24px);
height: px2rem(24px); height: px2rem(24px);
margin: px2rem(4px); margin: px2rem(4px);
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(8px);
left: initial;
}
// Navigation icon in link to previous level // Navigation icon in link to previous level
&::after { &::after {
display: block; display: block;
@ -260,16 +247,10 @@
.md-logo { .md-logo {
position: absolute; position: absolute;
top: px2rem(4px); top: px2rem(4px);
left: px2rem(4px); inset-inline-start: px2rem(4px);
display: block; display: block;
margin: px2rem(4px); margin: px2rem(4px);
padding: px2rem(8px); padding: px2rem(8px);
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(4px);
left: initial;
}
} }
} }
@ -303,15 +284,9 @@
.md-nav__icon { .md-nav__icon {
width: px2rem(24px); width: px2rem(24px);
height: px2rem(24px); height: px2rem(24px);
margin-right: px2rem(-4px); margin-inline-end: px2rem(-4px);
font-size: px2rem(24px); font-size: px2rem(24px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: 0;
margin-left: px2rem(-4px);
}
// Navigation icon in link to next level // Navigation icon in link to next level
&::after { &::after {
display: block; display: block;
@ -345,46 +320,22 @@
// Navigation link on level 3 // Navigation link on level 3
.md-nav__link { .md-nav__link {
padding-left: px2rem(28px); padding-inline-start: px2rem(28px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(28px);
padding-left: initial;
}
} }
// Navigation link on level 4 // Navigation link on level 4
.md-nav .md-nav__link { .md-nav .md-nav__link {
padding-left: px2rem(40px); padding-inline-start: px2rem(40px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(40px);
padding-left: initial;
}
} }
// Navigation link on level 5 // Navigation link on level 5
.md-nav .md-nav .md-nav__link { .md-nav .md-nav .md-nav__link {
padding-left: px2rem(52px); padding-inline-start: px2rem(52px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(52px);
padding-left: initial;
}
} }
// Navigation link on level 6 // Navigation link on level 6
.md-nav .md-nav .md-nav .md-nav__link { .md-nav .md-nav .md-nav .md-nav__link {
padding-left: px2rem(64px); padding-inline-start: px2rem(64px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(64px);
padding-left: initial;
}
} }
} }
} }
@ -648,7 +599,7 @@
// Adjust spacing for level 1 navigation items // Adjust spacing for level 1 navigation items
> .md-nav__list > .md-nav__item { > .md-nav__list > .md-nav__item {
padding-right: px2rem(12px); padding-inline-end: px2rem(12px);
} }
} }
} }
@ -670,7 +621,7 @@
.md-nav--secondary { .md-nav--secondary {
display: block; display: block;
margin-bottom: 1.25em; margin-bottom: 1.25em;
border-left: px2rem(1px) solid var(--md-primary-fg-color); border-inline-start: px2rem(1px) solid var(--md-primary-fg-color);
// Hide table of contents title // Hide table of contents title
> .md-nav__title { > .md-nav__title {

View File

@ -54,7 +54,7 @@
@include break-to-device(tablet portrait) { @include break-to-device(tablet portrait) {
position: absolute; position: absolute;
top: px2rem(-20px); top: px2rem(-20px);
left: px2rem(-44px); inset-inline-start: px2rem(-44px);
width: px2rem(40px); width: px2rem(40px);
height: px2rem(40px); height: px2rem(40px);
overflow: hidden; overflow: hidden;
@ -66,12 +66,6 @@
opacity 200ms 200ms; opacity 200ms 200ms;
pointer-events: none; pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(-44px);
left: initial;
}
// Show overlay when search is active // Show overlay when search is active
[data-md-toggle="search"]:checked ~ .md-header & { [data-md-toggle="search"]:checked ~ .md-header & {
opacity: 1; opacity: 1;
@ -85,7 +79,7 @@
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; inset-inline-start: 0;
width: 0; width: 0;
height: 0; height: 0;
background-color: hsla(0, 0%, 0%, 0.54); background-color: hsla(0, 0%, 0%, 0.54);
@ -95,12 +89,6 @@
height 0ms 250ms, height 0ms 250ms,
opacity 250ms; opacity 250ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
right: 0;
left: initial;
}
// Show overlay when search is active // Show overlay when search is active
[data-md-toggle="search"]:checked ~ .md-header & { [data-md-toggle="search"]:checked ~ .md-header & {
width: 100%; width: 100%;
@ -146,7 +134,7 @@
@include break-to-device(tablet portrait) { @include break-to-device(tablet portrait) {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; inset-inline-start: 0;
z-index: 2; z-index: 2;
width: 0; width: 0;
height: 0; height: 0;
@ -161,8 +149,6 @@
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
right: 0;
left: initial;
transform: translateX(-5%); transform: translateX(-5%);
} }
@ -247,16 +233,11 @@
z-index: 2; z-index: 2;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 px2rem(44px) 0 px2rem(72px); padding-inline: px2rem(72px) px2rem(44px);
font-size: px2rem(18px); font-size: px2rem(18px);
text-overflow: ellipsis; text-overflow: ellipsis;
background: transparent; background: transparent;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding: 0 px2rem(72px) 0 px2rem(44px);
}
// Search placeholder // Search placeholder
&::placeholder { &::placeholder {
transition: color 250ms; transition: color 250ms;
@ -282,15 +263,10 @@
// [tablet landscape +]: Header-embedded search // [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
padding-left: px2rem(44px); padding-inline-start: px2rem(44px);
color: inherit; color: inherit;
font-size: px2rem(16px); font-size: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(44px);
}
// Search placeholder // Search placeholder
&::placeholder { &::placeholder {
color: var(--md-primary-bg-color--light); color: var(--md-primary-bg-color--light);
@ -333,30 +309,18 @@
&[for="__search"] { &[for="__search"] {
position: absolute; position: absolute;
top: px2rem(6px); top: px2rem(6px);
left: px2rem(10px); inset-inline-start: px2rem(10px);
z-index: 2; z-index: 2;
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & svg {
right: px2rem(10px); transform: scaleX(-1);
left: initial;
// Flip icon vertically
svg {
transform: scaleX(-1);
}
} }
// [tablet portrait -]: Search modal // [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) { @include break-to-device(tablet portrait) {
top: px2rem(12px); top: px2rem(12px);
left: px2rem(16px); inset-inline-start: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(16px);
left: initial;
}
// Hide the magnifying glass // Hide the magnifying glass
svg:first-child { svg:first-child {
@ -380,31 +344,19 @@
&__options { &__options {
position: absolute; position: absolute;
top: px2rem(6px); top: px2rem(6px);
right: px2rem(10px); inset-inline-end: px2rem(10px);
z-index: 2; z-index: 2;
pointer-events: none; pointer-events: none;
// Adjust for right-to-left languages
[dir="rtl"] & {
right: initial;
left: px2rem(10px);
}
// [tablet portrait -]: Search modal // [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) { @include break-to-device(tablet portrait) {
top: px2rem(12px); top: px2rem(12px);
right: px2rem(16px); inset-inline-end: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
right: initial;
left: px2rem(16px);
}
} }
// Search option buttons // Search option buttons
> * { > * {
margin-left: px2rem(4px); margin-inline-start: px2rem(4px);
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
transform: scale(0.75); transform: scale(0.75);
opacity: 0; opacity: 0;
@ -441,27 +393,17 @@
align-items: center; align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 0 px2rem(44px) 0 px2rem(72px); padding-inline: px2rem(72px) px2rem(44px);
color: var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--lighter);
font-size: px2rem(18px); font-size: px2rem(18px);
white-space: nowrap; white-space: nowrap;
opacity: 0; opacity: 0;
transition: opacity 50ms; transition: opacity 50ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding: 0 px2rem(72px) 0 px2rem(44px);
}
// [tablet landscape +]: Header-embedded search // [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
padding-left: px2rem(44px); padding-inline-start: px2rem(44px);
font-size: px2rem(16px); font-size: px2rem(16px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(44px);
}
} }
// Show suggestions when search is active // Show suggestions when search is active
@ -477,7 +419,8 @@
z-index: 1; z-index: 1;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-radius: 0 0 px2rem(2px) px2rem(2px); border-end-start-radius: px2rem(2px);
border-end-end-radius: px2rem(2px);
// [tablet portrait -]: Search modal // [tablet portrait -]: Search modal
@include break-to-device(tablet portrait) { @include break-to-device(tablet portrait) {
@ -577,13 +520,7 @@
// [tablet landscape +]: Adjust spacing // [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
padding-left: px2rem(44px); padding-inline-start: px2rem(44px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(44px);
padding-left: initial;
}
} }
} }
@ -637,13 +574,7 @@
// [tablet landscape +]: Adjust spacing // [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
padding-left: px2rem(44px); padding-inline-start: px2rem(44px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(44px);
padding-left: px2rem(16px);
}
} }
// Search result more link on focus/hover // Search result more link on focus/hover
@ -672,13 +603,7 @@
// [tablet landscape +]: Adjust spacing // [tablet landscape +]: Adjust spacing
@include break-from-device(tablet landscape) { @include break-from-device(tablet landscape) {
padding-left: px2rem(44px); padding-inline-start: px2rem(44px);
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(44px);
padding-left: px2rem(16px);
}
} }
// Search result article document // Search result article document
@ -697,7 +622,7 @@
// Search result icon // Search result icon
&__icon { &__icon {
position: absolute; position: absolute;
left: 0; inset-inline-start: 0;
width: px2rem(24px); width: px2rem(24px);
height: px2rem(24px); height: px2rem(24px);
margin: px2rem(10px); margin: px2rem(10px);
@ -718,15 +643,9 @@
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-size: contain; mask-size: contain;
content: ""; content: "";
}
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
right: 0;
left: initial;
// Flip icon vertically
&::after {
transform: scaleX(-1); transform: scaleX(-1);
} }
} }

View File

@ -94,8 +94,7 @@
&__link { &__link {
display: block; display: block;
width: 100%; width: 100%;
padding-right: px2rem(24px); padding-inline: px2rem(12px) px2rem(24px);
padding-left: px2rem(12px);
outline: none; outline: none;
cursor: pointer; cursor: pointer;
transition: transition:
@ -103,12 +102,6 @@
color 250ms; color 250ms;
scroll-snap-align: start; scroll-snap-align: start;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(12px);
padding-left: px2rem(24px);
}
// Link on focus/hover // Link on focus/hover
&:where(:focus, :hover) { &:where(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);

View File

@ -45,7 +45,7 @@
&--primary { &--primary {
position: fixed; position: fixed;
top: 0; top: 0;
left: px2rem(-242px); inset-inline-start: px2rem(-242px);
z-index: 5; z-index: 5;
display: block; display: block;
width: px2rem(242px); width: px2rem(242px);
@ -56,12 +56,6 @@
transform 250ms cubic-bezier(0.4, 0, 0.2, 1), transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 250ms; box-shadow 250ms;
// Adjust for right-to-left languages
[dir="rtl"] & {
right: px2rem(-242px);
left: initial;
}
// Show sidebar when drawer is active // Show sidebar when drawer is active
[data-md-toggle="drawer"]:checked ~ .md-container & { [data-md-toggle="drawer"]:checked ~ .md-container & {
box-shadow: var(--md-shadow-z3); box-shadow: var(--md-shadow-z3);
@ -76,10 +70,7 @@
// Stretch scroll wrapper for primary sidebar // Stretch scroll wrapper for primary sidebar
.md-sidebar__scrollwrap { .md-sidebar__scrollwrap {
position: absolute; position: absolute;
top: 0; inset: 0;
right: 0;
bottom: 0;
left: 0;
margin: 0; margin: 0;
scroll-snap-type: none; scroll-snap-type: none;
overflow: hidden; overflow: hidden;

View File

@ -92,27 +92,13 @@
// Align with margin only (as opposed to normal button alignment) // Align with margin only (as opposed to normal button alignment)
svg { svg {
margin-top: px2rem(12px); margin-top: px2rem(12px);
margin-left: px2rem(12px); margin-inline-start: px2rem(12px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(12px);
margin-left: initial;
}
} }
// Adjust spacing if icon is present // Adjust spacing if icon is present
+ .md-source__repository { + .md-source__repository {
margin-left: px2rem(-40px); margin-inline-start: px2rem(-40px);
padding-left: px2rem(40px); padding-inline-start: px2rem(40px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(-40px);
margin-left: initial;
padding-right: px2rem(40px);
padding-left: initial;
}
} }
} }
@ -120,7 +106,7 @@
&__repository { &__repository {
display: inline-block; display: inline-block;
max-width: calc(100% - #{px2rem(24px)}); max-width: calc(100% - #{px2rem(24px)});
margin-left: px2rem(12px); margin-inline-start: px2rem(12px);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
vertical-align: middle; vertical-align: middle;
@ -155,29 +141,17 @@
display: inline-block; display: inline-block;
width: px2rem(12px); width: px2rem(12px);
height: px2rem(12px); height: px2rem(12px);
margin-right: px2rem(2px); margin-inline-end: px2rem(2px);
vertical-align: text-top; vertical-align: text-top;
background-color: currentColor; background-color: currentColor;
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-size: contain; mask-size: contain;
content: ""; content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: initial;
margin-left: px2rem(2px);
}
} }
// Adjust spacing for repository fact icon // Adjust spacing for repository fact icon
&:nth-child(1n+2)::before { &:nth-child(1n+2)::before {
margin-left: px2rem(8px); margin-inline-start: px2rem(8px);
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(8px);
margin-left: px2rem(2px);
}
} }
// Repository fact: version // Repository fact: version

View File

@ -49,25 +49,18 @@
// Navigation tabs list // Navigation tabs list
&__list { &__list {
margin: 0; margin: 0;
margin-left: px2rem(4px); margin-inline-start: px2rem(4px);
padding: 0; padding: 0;
white-space: nowrap; white-space: nowrap;
list-style: none; list-style: none;
contain: content; contain: content;
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(4px);
margin-left: initial;
}
} }
// Navigation tabs item // Navigation tabs item
&__item { &__item {
display: inline-block; display: inline-block;
height: px2rem(48px); height: px2rem(48px);
padding-right: px2rem(12px); padding-inline: px2rem(12px);
padding-left: px2rem(12px);
} }
// Navigation tabs link - could be defined as block elements and aligned via // Navigation tabs link - could be defined as block elements and aligned via

View File

@ -29,7 +29,7 @@
position: fixed; position: fixed;
top: px2rem(48px + 16px); top: px2rem(48px + 16px);
z-index: 2; z-index: 2;
margin-left: 50%; margin-inline-start: 50%;
padding: px2rem(8px) px2rem(16px); padding: px2rem(8px) px2rem(16px);
color: var(--md-default-fg-color--light); color: var(--md-default-fg-color--light);
font-size: px2rem(14px); font-size: px2rem(14px);
@ -51,8 +51,6 @@
// Adjust for right-to-left languages // Adjust for right-to-left languages
[dir="rtl"] & { [dir="rtl"] & {
margin-right: 50%;
margin-left: initial;
transform: translate(50%, 0); transform: translate(50%, 0);
} }

View File

@ -56,34 +56,21 @@
// this won't work consistently. Furthermore, we would need to use inline // this won't work consistently. Furthermore, we would need to use inline
// positioning to align the links, which looks jagged. // positioning to align the links, which looks jagged.
top: px2rem(1px); top: px2rem(1px);
margin-right: px2rem(8px); margin-inline: px2rem(28px) px2rem(8px);
margin-left: px2rem(28px);
color: inherit; color: inherit;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(28px);
margin-left: px2rem(8px);
}
// Version selection icon // Version selection icon
&::after { &::after {
display: inline-block; display: inline-block;
width: px2rem(8px); width: px2rem(8px);
height: px2rem(12px); height: px2rem(12px);
margin-left: px2rem(8px); margin-inline-start: px2rem(8px);
background-color: currentColor; background-color: currentColor;
mask-image: var(--md-version-icon); mask-image: var(--md-version-icon);
mask-repeat: no-repeat; mask-repeat: no-repeat;
content: ""; content: "";
// Adjust for right-to-left languages
[dir="rtl"] & {
margin-right: px2rem(8px);
margin-left: initial;
}
} }
} }
@ -140,8 +127,7 @@
&__link { &__link {
display: block; display: block;
width: 100%; width: 100%;
padding-right: px2rem(24px); padding-inline: px2rem(12px) px2rem(24px);
padding-left: px2rem(12px);
white-space: nowrap; white-space: nowrap;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
@ -150,12 +136,6 @@
background-color 250ms; background-color 250ms;
scroll-snap-align: start; scroll-snap-align: start;
// Adjust for right-to-left languages
[dir="rtl"] & {
padding-right: px2rem(12px);
padding-left: px2rem(24px);
}
// Link on focus/hover // Link on focus/hover
&:where(:focus, :hover) { &:where(:focus, :hover) {
color: var(--md-accent-fg-color); color: var(--md-accent-fg-color);

View File

@ -41,6 +41,6 @@
// Twitter icon // Twitter icon
.twitter { .twitter {
margin-left: 0.2em; margin-inline-start: 0.2em;
} }
} }