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 style for pull-quotes #328

Merged
merged 9 commits into from
Mar 13, 2024
Merged

💬 Add style for pull-quotes #328

merged 9 commits into from
Mar 13, 2024

Conversation

agoose77
Copy link
Collaborator

I'm not sure if this is best-practice; I'm implying that a pull-quote really is a container-level feature rather than a blockquote-level feature. That follows from how they're implemented in jupyter-book/mystmd#961

@agoose77 agoose77 requested a review from rowanc1 March 11, 2024 15:56
Copy link
Collaborator

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

Simple so far! This should be put in the figures.css file though I think, as these are additional styles, not overidding tailwind (that is also where other figure css is defined).

styles/index.js Outdated Show resolved Hide resolved
@rowanc1
Copy link
Collaborator

rowanc1 commented Mar 11, 2024

We should revert part of this PR to get the kind back on the figure node. maybe prefixing it with fig-${kind} or something?

#277

And then changing the CSS here:
https://github.com/executablebooks/myst-theme/blob/main/styles/figures.css#L1

Both the code and quote container kinds are a bit degraded, we can't use the class table though, so some sort of prefix would be good.

@agoose77
Copy link
Collaborator Author

So, I'm guessing that #277 was a deliberate "regression" due to the bare kind class being misinterpreted? And, thus, you're suggesting we introduce a custom name like figure-${kind} to disambiguate this.

Copy link
Collaborator

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

A few more things on review!

packages/myst-to-react/src/basic.tsx Outdated Show resolved Hide resolved
styles/figures.css Outdated Show resolved Hide resolved
Copy link
Collaborator

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

Ok - just changesets and this is good from my perspective - can you show a picture of the pullquote and maybe @choldgraf can comment on styles. :)

@agoose77
Copy link
Collaborator Author

We've added two special kinds of quotes in jupyter-book/mystmd#961:

Epigraph:
image

Pull-quote:
image

Currently, only pull-quotes are differently styled here, with a larger typeface. We could do more, such as background "quote" characters, but I don't have strong opinions.

@choldgraf
Copy link
Contributor

choldgraf commented Mar 12, 2024

It's a bit hard to judge design without seeing a live site with pull quotes used in a "real world" scenario, but these seem like a reasonable start. Personally I'd make the pull quote a little bit bigger.

As an example, here are several examples and inspiration for pull quotes.

Can pull quotes be placed a-la columns etc? I often see pull quotes as a sidebar with the text floating around it. For example, here's one from the NYT:

image

I don't think that needs to block this PR but just noting it as a common use-case. You can also see that the pull quote font size is a bit bigger and bolder than the ratio we've got in this PR

styles/figures.css Outdated Show resolved Hide resolved
@rowanc1
Copy link
Collaborator

rowanc1 commented Mar 12, 2024

@choldgraf I have moved this into an issue to track your sources: #329.

Let's increase the size and get it in (after the other PR merges!). We have added the ability to also add classes, which eventually should be able to style these in the near future....!

@choldgraf
Copy link
Contributor

Let's do it :shipit:

@rowanc1 rowanc1 changed the title ENH: add style for pull-quotes 💬 Add style for pull-quotes Mar 13, 2024
@rowanc1 rowanc1 merged commit 5dea885 into main Mar 13, 2024
2 checks passed
@rowanc1 rowanc1 deleted the agoose77/feat-pull-quote branch March 13, 2024 15:32
@agoose77 agoose77 self-assigned this Mar 13, 2024
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.

3 participants