Skip to content

Commit 969c713

Browse files
committed
Fixed overflow for alternate style when more than 10 tabs are present
1 parent 6fab1e3 commit 969c713

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

material/assets/javascripts/bundle.526051bc.min.js renamed to material/assets/javascripts/bundle.f89c2efe.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/javascripts/bundle.526051bc.min.js.map renamed to material/assets/javascripts/bundle.f89c2efe.min.js.map

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.c856cb08.min.css renamed to material/assets/stylesheets/main.c46c0193.min.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.c46c0193.min.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

material/assets/stylesheets/main.c856cb08.min.css.map

-1
This file was deleted.

material/base.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
{% endif %}
4040
{% endblock %}
4141
{% block styles %}
42-
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.c856cb08.min.css' | url }}">
42+
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.c46c0193.min.css' | url }}">
4343
{% if config.theme.palette %}
4444
{% set palette = config.theme.palette %}
4545
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.3f5d1f46.min.css' | url }}">
@@ -225,7 +225,7 @@ <h1>{{ page.title | d(config.site_name, true)}}</h1>
225225
</script>
226226
{% endblock %}
227227
{% block scripts %}
228-
<script src="{{ 'assets/javascripts/bundle.526051bc.min.js' | url }}"></script>
228+
<script src="{{ 'assets/javascripts/bundle.f89c2efe.min.js' | url }}"></script>
229229
{% for path in config["extra_javascript"] %}
230230
<script src="{{ path | url }}"></script>
231231
{% endfor %}

src/assets/javascripts/components/content/tabs/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function mountContentTabs(
8080
// TODO: Hack, scrollIntoView is too buggy
8181
const container = active.parentElement!
8282
if (
83-
active.offsetLeft + active.offsetWidth > container.offsetWidth ||
83+
active.offsetLeft + active.offsetWidth > container.scrollLeft + container.offsetWidth ||
8484
active.offsetLeft < container.scrollLeft
8585
)
8686
container.scrollTo({

src/assets/stylesheets/main/extensions/pymdownx/_tabbed.scss

+5-4
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
// Tabbed labels
157157
.tabbed-labels {
158158
display: flex;
159-
max-width: 100vw;
159+
max-width: 100%;
160160
overflow: auto;
161161
box-shadow: 0 px2rem(-1px) var(--md-default-fg-color--lightest) inset;
162162
scroll-snap-type: x proximity;
@@ -196,7 +196,7 @@
196196
@media print {
197197

198198
// Ensure correct order of labels
199-
@for $i from 1 through 10 {
199+
@for $i from 1 through 20 {
200200
&:nth-child(#{$i}) {
201201
order: $i;
202202
}
@@ -215,6 +215,7 @@
215215

216216
// Top-level tabbed labels
217217
> .tabbed-alternate .tabbed-labels {
218+
max-width: 100vw;
218219
margin: 0 px2rem(-16px);
219220
padding: 0 px2rem(16px);
220221
scroll-padding: 0 px2rem(16px);
@@ -247,7 +248,7 @@
247248
display: block;
248249

249250
// Ensure correct order of containers
250-
@for $i from 1 through 10 {
251+
@for $i from 1 through 20 {
251252
&:nth-child(#{$i}) {
252253
order: $i;
253254
}
@@ -275,7 +276,7 @@
275276
}
276277

277278
// Tab label states
278-
@for $i from 10 through 1 {
279+
@for $i from 20 through 1 {
279280
input:nth-child(#{$i}) {
280281

281282
// Tab is active

0 commit comments

Comments
 (0)