1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-09-24 19:38:27 +02:00

Fixed spacing of search on tablet and screen

This commit is contained in:
squidfunk 2020-02-10 14:05:39 +01:00
parent 41dc846753
commit 42540dae9b
10 changed files with 43 additions and 89 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1680,8 +1680,8 @@ hr {
.md-typeset h1[id]::before {
display: block;
margin-top: -8px;
padding-top: 8px;
margin-top: -0.4rem;
padding-top: 0.4rem;
content: ""; }
.md-typeset h1[id]:target::before {
@ -1702,8 +1702,8 @@ hr {
.md-typeset h2[id]::before {
display: block;
margin-top: -8px;
padding-top: 8px;
margin-top: -0.4rem;
padding-top: 0.4rem;
content: ""; }
.md-typeset h2[id]:target::before {
@ -1724,8 +1724,8 @@ hr {
.md-typeset h3[id]::before {
display: block;
margin-top: -8px;
padding-top: 8px;
margin-top: -0.4rem;
padding-top: 0.4rem;
content: ""; }
.md-typeset h3[id]:target::before {
@ -1746,8 +1746,8 @@ hr {
.md-typeset h4[id]::before {
display: block;
margin-top: -9px;
padding-top: 9px;
margin-top: -0.45rem;
padding-top: 0.45rem;
content: ""; }
.md-typeset h4[id]:target::before {
@ -1768,8 +1768,8 @@ hr {
.md-typeset h5[id]::before {
display: block;
margin-top: -11px;
padding-top: 11px;
margin-top: -0.55rem;
padding-top: 0.55rem;
content: ""; }
.md-typeset h5[id]:target::before {
@ -1790,8 +1790,8 @@ hr {
.md-typeset h6[id]::before {
display: block;
margin-top: -11px;
padding-top: 11px;
margin-top: -0.55rem;
padding-top: 0.55rem;
content: ""; }
.md-typeset h6[id]:target::before {
@ -2347,12 +2347,13 @@ hr {
display: block;
width: 11.7rem;
max-width: 11.7rem;
padding-right: 0.6rem; }
margin-left: 1rem; }
[dir="rtl"] .md-header-nav__source {
padding-right: initial;
padding-left: 0.6rem; }
margin-right: 1rem;
margin-left: initial; }
.md-search {
padding: 0.2rem; }
margin-left: 0.2rem;
padding: 0.2rem 0; }
.md-search__overlay {
position: fixed;
top: 0;
@ -2374,15 +2375,12 @@ hr {
opacity: 1; }
.md-search__inner {
position: relative;
width: 11.5rem;
margin-right: 0.8rem;
width: 11.7rem;
padding: 0.1rem 0;
float: right;
-webkit-transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1);
transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1); }
[dir="rtl"] .md-search__inner {
margin-right: initial;
margin-left: 0.8rem;
float: left; }
.md-search__form {
border-radius: 0.1rem; }
@ -2475,6 +2473,10 @@ hr {
margin-left: 1.2rem; }
.md-header-nav__button.md-icon--menu {
display: none; }
.md-header-nav__source {
margin-left: 1.4rem; }
[dir="rtl"] .md-header-nav__source {
margin-right: 1.4rem; }
.md-nav {
-webkit-transition: max-height 0.25s cubic-bezier(0.86, 0, 0.07, 1);
transition: max-height 0.25s cubic-bezier(0.86, 0, 0.07, 1); }
@ -2502,10 +2504,6 @@ hr {
.md-nav__item--nested .md-nav__toggle:checked ~ .md-nav__link::after {
-webkit-transform: rotateX(180deg);
transform: rotateX(180deg); }
.md-search__inner {
margin-right: 1.2rem; }
[dir="rtl"] .md-search__inner {
margin-left: 1.2rem; }
[data-md-toggle="search"]:checked ~ .md-header .md-search__inner {
width: 34.4rem; }
.md-search__scrollwrap {

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

@ -1,25 +1,3 @@
{#-
This file was automatically generated - do not edit
-#}
{% macro t(key) %}{{ {
"language": "et",
"clipboard.copy": "Kopeeri lõikelauale",
"clipboard.copied": "Kopeeritud",
"edit.link.title": "Muuda seda lehte",
"footer.previous": "Eelmine",
"footer.next": "Järgmine",
"meta.comments": "Kommentaarid",
"meta.source": "Lähtekood",
"search.language": "",
"search.pipeline.stopwords": false,
"search.pipeline.trimmer": false,
"search.placeholder": "Otsi",
"search.result.placeholder": "Otsimiseks kirjuta siia",
"search.result.none": "Otsingule ei leitud ühtegi vastet",
"search.result.one": "Leiti üks tulemus",
"search.result.other": "Leiti # tulemust",
"skip.link.title": "Keri sisuni",
"source.link.title": "Ava repositooriumis",
"source.revision.date": "Viimane uuendus",
"toc.title": "Sisukord"
}[key] }}{% endmacro %}

View File

@ -1,23 +1,3 @@
{#-
This file was automatically generated - do not edit
-#}
{% macro t(key) %}{{ {
"language": "th",
"clipboard.copy": "คัดลอก",
"clipboard.copied": "คัดลอกแล้ว",
"edit.link.title": "แก้ไขหน้านี้",
"footer.previous": "ก่อนหน้า",
"footer.next": "ต่อไป",
"meta.comments": "ความคิดเห็น",
"meta.source": "แหล่งที่มา",
"search.language": "th",
"search.placeholder": "ค้นหา",
"search.result.placeholder": "พิมพ์เพื่อเริ่มค้นหา",
"search.result.none": "ไม่พบเอกสารที่ตรงกัน",
"search.result.one": "พบเอกสารที่ตรงกัน",
"search.result.other": "พบ # เอกสารที่ตรงกัน",
"search.tokenizer": "[\s\-]+",
"skip.link.title": "ข้ามไปที่เนื้อหา",
"source.link.title": "ไปที่ Repository",
"toc.title": "สารบัญ"
}[key] }}{% endmacro %}

View File

@ -202,12 +202,22 @@
display: block;
width: px2rem(234px);
max-width: px2rem(234px);
padding-right: px2rem(12px);
margin-left: px2rem(20px);
// Adjust for RTL languages
[dir="rtl"] & {
padding-right: initial;
padding-left: px2rem(12px);
margin-right: px2rem(20px);
margin-left: initial;
}
}
// [screen +]: Increase spacing of search bar
@include break-from-device(screen) {
margin-left: px2rem(28px);
// Adjust for RTL languages
[dir="rtl"] & {
margin-right: px2rem(28px);
}
}
}

View File

@ -42,7 +42,8 @@ $md-toggle__search--checked:
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
padding: px2rem(4px);
margin-left: px2rem(4px);
padding: px2rem(4px) 0;
}
// Search modal overlay
@ -181,30 +182,17 @@ $md-toggle__search--checked:
// [tablet landscape +]: Header-embedded search
@include break-from-device(tablet landscape) {
position: relative;
width: px2rem(230px);
margin-right: px2rem(16px);
width: px2rem(234px);
padding: px2rem(2px) 0;
float: right;
transition: width 0.25s cubic-bezier(0.1, 0.7, 0.1, 1);
// Adjust for RTL languages
[dir="rtl"] & {
margin-right: initial;
margin-left: px2rem(16px);
float: left;
}
}
// [screen +]: Increase spacing of search bar
@include break-from-device(screen) {
margin-right: px2rem(24px);
// Adjust for RTL languages
[dir="rtl"] & {
margin-left: px2rem(24px);
}
}
// Set maximum width
#{$md-toggle__search--checked} & {