Skip to content

First test with a no-prose stop class #73

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

Closed
wants to merge 1 commit into from

Conversation

mathieutu
Copy link
Contributor

@mathieutu mathieutu commented Sep 16, 2020

Hi,
This is just to set a place to iterate on a way to stop and reset prose styling as said in https://twitter.com/mathieutu/status/1306156743962099712.

Actually it's not totally working, but I'm trying to understand why, and it's the best result I had.

EDIT :

This selector only applies to one element; you cannot use it to exclude all ancestors. For instance, body :not(table) a will still apply to links inside of a table, since will match with the :not() part of the selector.

So start again from begining.. 😞 (even if actually it did work on some tags (ex: it removed the color of links), so weird. 😅)

Related issue:

@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

Honestly, creating a no-prose will be a hell to maintain. We have to undo all styles set by the .prose class and keep that in sync forever. This also means that every new PR has to make sure that it "resets" to the correct value.

Another approach, which is way better in my opinion is to do something like this:

<div class="prose">
  The contents here is styled with `.prose`
</div>

<div>
  The contents here is **not** styled with `.prose`
</div>

<div class="prose">
  The contents here is styled with `.prose`
</div>

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.

2 participants