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

🪈 propagate class value through to react on container type directives #414

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

stevejpurves
Copy link
Contributor

@stevejpurves stevejpurves commented Jul 1, 2024

Motivation for this PR is to enable more control over final rendering of some container directives by allowing authors to use the class option to add classes to the final container component that is rendered on page.

When teamed with user defined stylesheets this will be very powerful in the core themes and is immediately useful when using current/known tailwind classes, and in custom themes.

tested with:

# testing class flows

this is the main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content

:::{aside}
:class: test-aside
this is an aside this is an aside this is an aside this is an aside this is an aside this is an aside this is an aside
:::

this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content

:::{code} javascript
:class: test-code
const a = 1234
:::

this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content

:::{iframe} https://mystmd.org/sandbox
:class: test-iframe

:::

this is more main content this is more main content this is more main content this is more main content this is more main content this is more main content

:::{image} banner.png
:class: test-image
:::

:::{figure} banner.png
:class: test-image-figure
:::

this is more main content this is more main content this is more main content this is more main content

:::{figure} ./videos/links.mp4
:class: test-video
An embedded video with a caption!
:::

@stevejpurves stevejpurves merged commit 3775181 into main Jul 2, 2024
2 checks passed
@stevejpurves stevejpurves deleted the fix/propagate-class branch July 2, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant