New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabbed code blocks under admonitions and other elements #796

facelessuser opened this Issue Jun 12, 2018 · 3 comments


None yet
2 participants

facelessuser commented Jun 12, 2018


New tabbed code looks weird on mobile when under an admonition or details element. I've noticed that that you have this style in the superfences.scss:

    // [mobile +]: Collapse tab labels
    @include break-from-device(tablet) {
      border: 0.1rem solid $md-color-black--lightest;

I understand there is the same kind of logic for this as code blocks so that on mobile, it spreads to the width of the page, but in admonitions and details, there is an exception that prevents code blocks from doing this in them, but there doesn't seem to be the same exception for tabbed code blocks:

2018-06-12 12_41_20-pymdown extensions documentation

Expected behavior

Tabbed code blocks should not be transformed to extend to full width when under elements like admonitions etc. There may be more scenarios, but I'm not sure yet.

Actual behavior

On mobile devices, it attempts to extend tabbed code blocks to full width stripping the border and making them look odd.

Steps to reproduce the bug

  1. View tabbed code under an admonition on a mobile device.

Package versions

  • Python: NA
  • MkDocs: NA
  • Material: 2.8.0

Project configuration


System information

  • OS: NA
  • Browser: NA

This comment has been minimized.


squidfunk commented Jun 12, 2018

I thought I catched all cases :D Thanks for reporting! It should be exactly like you wrote - only stretch to full width on the root level. I will provide a fix.

@squidfunk squidfunk added the bug label Jun 12, 2018

@squidfunk squidfunk self-assigned this Jun 12, 2018


This comment has been minimized.


squidfunk commented Jun 13, 2018

Fixed in 87f9a3a


This comment has been minimized.


squidfunk commented Jun 13, 2018

Released as part of 2.9.0

@squidfunk squidfunk closed this Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment