Background colors for text boxes in github markdown (e.g. red warning box) - github

I'm converting some documentation from HTML to github-flavored markdown. I have lots of reddish/pink warning boxes in the old documentation.
e.g.
div.warnbox { background-color:#fcc; border-left: 3px solid #f00; }
~~~~~~
<div class="warnbox">
If you pass null as a parameter the world will end.
</div>
Is there any way to do something similar in (github) markdown? So far I've been using quote boxes which don't come in assertive red:
> If you pass null as a parameter the world will end
I also saw an interesting solution where someone suggested using diff syntax code blocks:
```diff
- If you pass null as a parameter the world will end
```
But that has multiple problems (gray outline, fixed width font, '-' at the beginning of the line, etc)
Is there any way (even if hacky like the diff thing) to do this?

Changing colour is not possible at this time.
If you want to create info or warning boxes, you can do so as of May 2022.
You can use the accessible note or warning blockquote in Markdown
Input:
> **Note**
> This is a note
> **Warning**
> This is a warning
Output Image:
https://github.com/github-community/community/discussions/16925

You can create color text or background in a GitHub markdown file by using diff, to create red and green colors, as in the example:
+ Green Text
- Red Text
Where GitHub markdown file does not support color, even though HTML.

Related

How to get colored background in word wih R Markdown?

My team wants to highlight a certain word by using a yellow background, as a reminder that this value needs to be edited manually.
Desired result:
I try to make this happen (inspired by this answer). I format a line of text in my reference text as Times New roman with font size 12, with bold text and a yellow background. I then save the format as a "character"-type style and I save it under "boldyellow" in order to avoid underscores.
In my r markdown document I write:
<span custom-style=“boldyellow”>SKRIV IN ANTAL</span> av **21** regioner moretext moretext.
With no obvious result:
Am I missing one or more steps I haven't tought of? Is this possible at all using this method?

Changing the colour of curley braces inside VSC

I write content in VSC and I use handlebars to write content.
{{#jan}} Hello my name is Tony {{else}} Hi my name is Bob {{/if}}
Is there any way I can get the content inside the {{}} to highlight something like bright yellow? when I have loads of these in the docs, its hard to spot them when scrolling.
I've tried messing around with the workspace settings.js file but have had no luck. Thanks
The title of your question asks how to change the color of the brackets themselves, while the body asks for how to change the content in the middle.
here's a solution for the title part: the extension bracket pair colorizer will give you full control over curly brace colors. by default, it colors nested braces differently, but as per its documentation, you can configure it however you want. so if you choose only one brace color, they can both be yellow or whatever color you want
https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2

IE Edge form submission Issue with rgb colors

Hello Dears Stack Overflow, Great site, I have been able to solve many questions with your guidance.
Issue:
Working with a php website script I be having issues when atempt to submit a form to database whit a field DESCRIPTION (mediumblob) that usually look as ie.:
<div align="center"><span style="color: rgb(0, 0, 205); font-family: Verdana; font-size: 18pt;">Lamps Osram H7 Halogen.</span></div><div align="center"><span style="color: rgb(0, 0, 205); font-family: Verdana; font-size: 18pt;">12 Volts - 55 Wats.</span></div>
The form have your enctype="multipart/form-data" and the html is edited with InnovaStudio WYSIWYG editor.
When I use Mozilla, Chrome, Ie explorer 11, the form is submitted, and the values stored in database, but when I use IE Edge (windows 10) the proccess abort and display a white screen with the number simbol (#). Removing the color format (ie: color: rgb(0, 0, 205);) the form is submitted, and the values stored in database.
I execute a php mysql error tester script and no query error is present.
Once again I try in IE Edge with another editor that send color as name colors (red, green, yellow, etc.) and the form is submitted, and the values stored in database.
I can only conclude the problem is due to the rgb colors.
Do you have any suggestions or possible solution? Thank you very much.
Thank you for your cooperation.
No error is showed at page code when appear the white screen with #.
I have tried to replace the color names with the rgb codes, but these are sent in hexadecimal format, and the form submitted without errors.
I have used for the test the rich content editor developed by Mozilla.
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Editable_content
I do not know if the format that is sent is inherent to the Agents or comes from the java part of the editors.
I have not been able to find, either in the original editor (InnovaStudio), or the proofs test editor(Mozilla rich content), code for replacement of the color system, only arrays of hex or name colors.
Another curious circumstance with the original editor, is that once the html has been saved in the database without color format, then there are no problems to modify it to text with color in IE Edge and the inserted colors are rgb.
I will continue to do some tests, and if I find any definition of the problem, I will publish it.
Thanks again.

Text/Code highlight with jsDoc

jsDoc seems to support most of the MD syntax, but when it comes to highlighting a single reserved word or text, I cannot find a usable tag for that.
In the MD syntax I can use `word`, which would set a grey background and a different font, so you can see it clearly, same as on StackOverflow - word.
In jsDoc, whether I use `word` or <code>word</code>, the effect is just setting italic style to the word, which cannot be clearly seen as a reserved word.
Is there any syntax in jsDoc to clearly highlight a word or a text string, like `some text` in MD, to look like some text?
Alternatively, is there a way to customize it - provide my own CSS for a standard MD tag?
JSDoc documentation seems to be using <code> tag, and it highlights the text using a grey background like you want by setting it on the code tag properties defined on the usejavadoc.css file:
From http://usejsdoc.org/tags-name.html:
There is a guide on how to edit or create your own JSDoc template, with a section on how to override the default template layout file:
http://usejsdoc.org/about-configuring-default-template.html#overriding-the-default-template-s-layout-file
But for something as simple as this, you don't even have to go that far. Just edit the css fragment, before or after generation, and set the background-color you want for the code tag. You may do it before generation by editing this line and setting the background color you want:
https://github.com/jsdoc3/jsdoc/blob/5a58bdf5a551844f12b46be6436aefd3c41e0393/templates/default/static/styles/jsdoc-default.css#L257
Or, if that doesn't work, overriding the property by adding
code {
background-color: #DEDEDE !important;
}
to the file.
As an alternative you can use a framework like qooxdoo to generate your documentation using JSDoc-like comments. According to their API reference you may use <pre class="javascript"> for inline javascript syntax code highlighting, and it looks pretty nice: http://manual.qooxdoo.org/3.0/pages/development/api_jsdoc_ref.html#html

Automatic line break when inserting user macro

I'm using confluence from atlassian and I need a way to modify the text size, family, and color by using a user macro. I defined my macro as follows:
## #param 0:title=forecolor|type=string|desc=Text foreground color. Enter colors such as: red / blue / green / etc.
## #param 1:title=backcolor|type=string|desc=Text background color. Enter colors such as: red / blue / green / etc.
## #param 2:title=size|type=string|desc=Enter size in px, for example, 20px.
## #param 3:title=family|type=string|desc=Enter the font family (listing can be found here: http://www.w3.org/Style/Examples/007/fonts.en.html) (example: serif).
<span style="color: $param0; background-color: $param1; font-size: $param2; font-family: $param3;">$body</span>
Now the user can choose this macro 'Stylish' as such:
However confluence automatically adds a new line tag with content I want to appear next to it. Assume I had the text:
The brown fox jumped over the cow.
And I wanted to set the background color of the word fox as red and its forecolor to yellow. If I apply this macro to that word I end up with something like this:
So it automatically puts a new line in on the word that has the macro assigned to it. I want to keep it inline the entire sentence and apply the formatting to a single word. Even If I select inline in the options it still puts it in a new line.
The result comes out to this:
Here is a screen shot in edit mode:
I have selected it inline, and published the page still the result shows the brown on one line fox on another line and finally jumped over the cow on yet another line. Atlassian Confluence 5.4.4 This macro should work like the <span> tag so that the item doesn't appear as a block style element.
There is no good way of doing this. There's a JIRA issue you can track: CONF-15860.