Skip to content

Commit 7f38cfe

Browse files
committed
Fixed scrolling of alternate tabs implementation
1 parent 4618d04 commit 7f38cfe

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

material/assets/javascripts/bundle.801e7afd.min.js renamed to material/assets/javascripts/bundle.9e82f1f8.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.801e7afd.min.js.map renamed to material/assets/javascripts/bundle.9e82f1f8.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.2ec5b002.min.css.map

-1
This file was deleted.

material/assets/stylesheets/main.2ec5b002.min.css renamed to material/assets/stylesheets/main.c856cb08.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.c856cb08.min.css.map

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

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.2ec5b002.min.css' | url }}">
42+
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.c856cb08.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.801e7afd.min.js' | url }}"></script>
228+
<script src="{{ 'assets/javascripts/bundle.9e82f1f8.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

+6-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export interface ContentTabs {
5252
export function watchContentTabs(
5353
el: HTMLElement
5454
): Observable<ContentTabs> {
55-
if (!el.classList.contains(".tabbed-alternate"))
55+
if (!el.classList.contains("tabbed-alternate"))
5656
return NEVER
5757
else
5858
return merge(...getElements(":scope > input", el)
@@ -77,7 +77,11 @@ export function mountContentTabs(
7777
): Observable<Component<ContentTabs>> {
7878
const internal$ = new Subject<ContentTabs>()
7979
internal$.subscribe(({ active }) => {
80-
active.scrollIntoView({ behavior: "smooth", block: "nearest" })
80+
active.scrollIntoView({
81+
behavior: "smooth",
82+
block: "nearest",
83+
inline: "start"
84+
})
8185
})
8286

8387
/* Create and return component */

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

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@
176176
// Tab label
177177
> label {
178178
z-index: 1;
179+
flex-shrink: 0;
179180
width: auto;
180181
padding: px2em(12px, 12.8px) 1.25em px2em(10px, 12.8px);
181182
color: var(--md-default-fg-color--light);

0 commit comments

Comments
 (0)