-
Notifications
You must be signed in to change notification settings - Fork 22.7k
[Markdown] Decide what to do about class="button" and class="callout" #3927
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
Comments
I'd personally be happy to do without the button class. As you say, in most cases we can get rid of these or make them into links. In the callout boxes, we can use links instead of a button too. I do see the need for the ability to have some kind of inline callout, rather than just an overall banner attached to the top of the page. Although I do wonder whether we couldn't just use the same kind of approach for these as for the note and warning boxes...whatever we end up choosing. We could even just use notes for these....? The main issue there would be one of semantic difference, and I'm not convinced that really matters. |
Yeah, that seems like a good idea, especially since these are really all the same kind of thing. A problem with using the note/warning thing, if we go with the blockquote option from #3483 (comment), is that this option uses the magic word "Note:" to know that this isn't just a blockquote, but is a note callout. But in that case Yari also renders the "Note:" text. But in this case we probably don't want to render "Note:", we just want the callout styling. So: how can Yari understand that this is to be rendered as a callout, but without including the magic word? Or maybe it is OK to include "Note:" for cases like this? |
Why not another prefix for a box that doesn't render the text, or which allows you to specify the text to be rendered?. After all, we get to define the rules on things that are non-standard. |
Yeah, we could just include something for a general callout like
To produce a callout box with a specific heading, or
To produce a callout with no heading...? |
#4352, which updates the Markdown spec for callouts, is closed, and I've also updated #3350 (comment), which describes how to convert HTML callouts into the Markdown format. I've also replaced So I'm closing this issue. |
The Guide to classes and styles used in MDN content lists
button
as a class you can apply, butcallout
isn't documented. Nevertheless these often go together so let's look at them together.button
makes a link look like a buttoncallout
makes a fancy blue boxSee the "Looking to become a front-end web developer?" bit at the start of https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout for a callout containing a button.
So it turns out that across all of files/en-us, all instances of
callout
contain abutton
, and specifically are this "Looking to become a front-end web developer?". That includes the following pages:All Learn, except for the main pages in HTML, CSS, JS.
There are only a handful of other instances of
button
:What should we do with them?
The "Looking to become a front-end web developer?" seems like a really good case for a KS macro. Then we can generate whatever markup we like. The only alternative might be to have something more native-Yari, like the soapbox thing: so Yari could decide which pages should get this banner and the content doesn't have to know about it. But that seems like a lot more work.
The remaining
button
instances can be disposed of fairly easily:-> this is actually documentation for
button
, so when that goes, this can.-> these should all be links
-> this is in a
display: none
element and should I think be removed entirely-> this should be a link
The text was updated successfully, but these errors were encountered: