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

🧱 Simplify Blocks (remove grid-system) #548

Merged
merged 1 commit into from
Mar 4, 2025
Merged

🧱 Simplify Blocks (remove grid-system) #548

merged 1 commit into from
Mar 4, 2025

Conversation

rowanc1
Copy link
Member

@rowanc1 rowanc1 commented Mar 4, 2025

Copy link

changeset-bot bot commented Mar 4, 2025

🦋 Changeset detected

Latest commit: 2b19f0a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
myst-to-react Patch
@myst-theme/jupyter Patch
@myst-theme/providers Patch
@myst-theme/frontmatter Patch
@myst-theme/diagrams Patch
@myst-theme/site Patch
@myst-theme/styles Patch
@myst-theme/common Patch
@myst-theme/icons Patch
@myst-theme/search Patch
@myst-theme/search-minisearch Patch
@myst-theme/book Patch
@myst-theme/article Patch
myst-demo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rowanc1 rowanc1 merged commit 6cd2bbe into main Mar 4, 2025
2 checks passed
@rowanc1 rowanc1 deleted the blocks-simple branch March 4, 2025 20:10
Comment on lines +15 to +17
const block =
cn || node.identifier ? (
<div id={node.identifier} className={cn}>
Copy link
Collaborator

@agoose77 agoose77 Mar 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rowanc1 I don't think this change is friendly to future outputs work or #540:

Elements like aside need the CSS grid to position themselves correctly. This is only possible if they are top-level elements within a grid, or their parents use subgrid. Previously, we ensured that the outermost block created a subgrid.

This PR drops the subgrid feature by only wrapping the block children in a node if they have a class or an identifier. That fixes the https://cpraveen.github.io/numa/stiff1 example, but has the following shortcoming: Both code-outputs that generate e.g. an aside and blocks that use #540 will set an identifier and/or class, but want to preserve the grid system.

I think instead we probably need to retain the grid e.g. #547.

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.

Code cells are getting indented on github pages
2 participants