Skip to content
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

Add support pymdownx.tabbed via pymdown-extensions 7.0b1 #1459

Merged

Conversation

@facelessuser
Copy link
Contributor

facelessuser commented Feb 14, 2020

Adds support for the new general purpose tab extension called Tabbed. This requires pymdown-extensions 7.0b1 which adds this support.

Style needs to built, but I was doing this on Windows and it created a mess of line ending things. I can maybe rebuild the styles on mac.

@facelessuser facelessuser force-pushed the facelessuser:pymdownx-tabbed branch from 67e3f68 to afbabcf Feb 14, 2020
@facelessuser

This comment has been minimized.

Copy link
Contributor Author

facelessuser commented Feb 14, 2020

Rebased and rebuilt theme. Should be good to go.

Copy link
Owner

squidfunk left a comment

Awesome PR! I guess releasing it together with the Material RC will be a very good idea. Are you confident that 7.0 reaches a stable state within the next weeks? Would be awesome to pin PymdownX to >=7.0 For Material 5.

pre,
table.highlighttable,
table.codehilitetable {
&:last-child:first-child {

This comment has been minimized.

Copy link
@squidfunk

squidfunk Feb 14, 2020

Owner

I think we can use :only-child here, as supports seems to be good.

Also, can’t we drop div.higlight and div.codehilite selectors due to Markdown 3.2?

This comment has been minimized.

Copy link
@facelessuser

facelessuser Feb 14, 2020

Author Contributor

🤦‍♂ yup. Don't know why I fixated on doing it like this.

This comment has been minimized.

Copy link
@squidfunk

squidfunk Feb 14, 2020

Owner

... a conversation of two people, both of which have implemented a selector engine 😂

This comment has been minimized.

Copy link
@facelessuser

facelessuser Feb 14, 2020

Author Contributor

I know, that is the most embarrassing part...I implemented :only-child...

As far as div.highlight and div.codehilite is concerned, this is one case where we cannot drop it. For styling code blocks, all we care about is the <pre><code> part, but in this case, we want to know if the code block is an only child under the tab, and Pygments still wraps the <pre><code> in a <div>. It's just <div><pre><code> now instead of <div><pre>. And since we need to know that the only child <div> is a code <div>, we need to check the class because we can't just go div:has(pre).

This comment has been minimized.

Copy link
@squidfunk

squidfunk Feb 14, 2020

Owner

You’re right! That’s also why the child combinator is absolutely necessary here.

This comment has been minimized.

Copy link
@squidfunk

squidfunk Feb 14, 2020

Owner

... but we could drop the tag parts (table, div) of the selectors. Probably even more future-proof.

This comment has been minimized.

Copy link
@facelessuser

facelessuser Feb 14, 2020

Author Contributor

Agreed, table and div are unnecessary.

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

Furthermore, this should be frictionless to upgrade to unless people changed the superfences styles with custom CSS, or am I missing something?

@facelessuser

This comment has been minimized.

Copy link
Contributor Author

facelessuser commented Feb 14, 2020

The only thing in 7.0 is Tabbed. But if it seems solid, then we are good. As far as Material is concerned, it should go seemless to release them together. Only if someone has some custom CSS will they be impacted. And since I went ahead and released a beta, you could release tomorrow and Material would just pull the beta. Since it is prerelease, only things explicitly requesting it will get it.

Anyone on an old material when I push the official 7 may get impacted, which is why it is a major release even if it only includes 1 thing. Because I'm going to break old SuperFences styles as we work towards retiring the old code tab mechanics.

As always, I'm open to alternatives, but that is my current plan.

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

Ah right, I missed the syntax changes. It’s 7 in the morning over here! 😴

We should add them to the migration guide then. My plan is to collect feedback with the RC and release a step-by-step guide as there will be an increasing amount of necessary changes with an increased customization level.

@facelessuser

This comment has been minimized.

Copy link
Contributor Author

facelessuser commented Feb 14, 2020

No worries, it's late here. I'm probably done until the morning. I went ahead and pushed the :only-child change.

One small off topic note: with Material 5, maybe it will be fixed in the RC, but by default I get the announcement bar test in my theme when I try to use Material 5. I have to provide my own main.html silence it.

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

Yep, that needs to go somewhere else. It’s just handy for development but I’ll remove it before the RC!

@squidfunk squidfunk merged commit a348663 into squidfunk:refactor/rxjs-typescript Feb 14, 2020
1 check passed
1 check passed
build
Details
@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

I'll take care of the selector optimizations (removing div and table).

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

Fixed in 0d9fbcc

@squidfunk

This comment has been minimized.

Copy link
Owner

squidfunk commented Feb 14, 2020

@facelessuser the default announcement bar is gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.