Disable or custime formats preview - tinymce-4

On TinyMCE the formats previews consider the CSS class definition. But it's annoying in some cases, for instance, when the font-color is white. So I like to replace it to a custom color only on preview (or just disable it function), but keeping white color on real text.
How it works now:
How I like it to works:

Related

Changing invisible (white font) output in RStudio theme `Cobalt`

I'm using R Studio's Cobalt theme, and I have found one case where in-line output in Rmd files is invisible (i.e. font is white on a white background). I would like to edit that font colour to anything visible.
Reproducible example below:
First set Editor Theme to Cobalt:
Then, a simple example of using str_view() from Hadley's R4DS, in an Rmd file:
x <- c("apple", "banana", "pear")
stringr::str_view(x, "an")
The output will render to visible HTML no problem, and the Viewer window also shows visible output:
But when if you run it as an in-line chunk (i.e. how a lot of my debugging takes place), we get some of the output as a white font on white background:
How can I edit that font colour for that particular output, so that it is visible?
I have already tried editing Cobalt here:
https://tmtheme-editor.herokuapp.com/#!/editor/theme/Cobalt
Following the advice from here:
https://towardsdatascience.com/customize-your-rstudio-theme-914cca8b04b1
Maybe it's late but i've a solution with same problem.You need to change foreground color of your preferred theme(or change html background)
Here is you can edit your preferred theme : https://tmtheme-editor.herokuapp.com
As you wrote upward,in most of dark themes foregrounds are whitish . Where you can edit in general tab .You should choose a bit darker foreground (for ex:#BEC0C2).
or
i couldn't find how to change html background in Cobalt theme but some other (ex: Material) theme allow us to change colors of popup Css
Sorry for my photo edits :D
Hopefully it will work ...
For anyone looking at this question, I've tried a lot of things, and honestly the easiest answer was to move the output of chunks out of the inline document, and move it to the console. Everything works after that:

QComboBox: change one option of stylesheet

I have some particular QComboBox like this (osx style):
that I want to highlight programmatically. I used
combo->setStyleSheet("background-color: yellow");
and the background get changed, but then the whole style of my widget becomes ugly like this:
as you can see, the background is ok, but dropdown button got changed with '90 motif style (old good days...)
Is it possible to just change the background?
Some of the stylesheet rules will trigger a fallback to the Windows style, see my answer here.
One option to style the background is by using QProxyStyle.
Changing the palette might also work.

Button background appears 3% darker than it should be

I'm adding CSS to a Bootstrap-based web app, to match a PDF from a designer. There's a button image, whose background color Seashore reports as rgb(0,186,158) aka hsl(171,100,36%). So I set the background colour of the button to match the image:
background-image: url('images/elements/small-search-button-up.png');
background-color: hsl(171,100%,36%);
Only...it doesn't.
Subtracting 3% from the luminosity fixes it:
I'd love to know why. I can't see any obvious causes in all of the other CSS styles applied. This happens in both Chrome and Firefox, on OS X Snow Leopard.
I'm seeing something similar with certain fonts (comparing the web rendered output with a provided PDF), but that cause could be different.
EDIT
Here's the original image. Hopefully SO doesn't process it.
EDIT2
Why use PNG? That's how the designer provided the images. I wasn't aware that there was a trade-off with color space information. Also, I would have thought that PNGs are better for glyphs needing flat backgrounds and crisp edges (compared to JPEGs), no?
It's most likely the color of the PNG image that is not displayed consistently.
A PNG image doesn't have color space information, instead it has a gamma value, and there is a problem to interpret that value to determine a color space. You will probably see that there is a color difference between different browsers, so if you adjust the color for how one browser displays the PNG, it won't match in other browsers.
Use a different file format if you need the color match other elements, or make the background of the PNG transparent instead of green.
Rendering text is a different matter. There will always be slight differences in how browsers renders different fonts, depending on the rendering method used, which fonts are installed, and system/user settings. You simply can't expect exactly the same result in different browsers.

CSS: Browser shows a different color code than the one set on CSS stylesheet

I have a div with the property:
background-color: #327EB2;
When I open the page on a browser I notice that a different color is shown. If I capture the screen and open the captured image on Photoshop, I can see that the color code captured is actually #437BB6. I have nothing set with that color in my CSS stylesheet.
I've tested on different monitors, different color resolutions, different browsers and versions from FF 4+ to IE8+, Opera, Chrome, Safari, etc...
Actually I don't think that's a problem of the monitor, resolution or browser version, because the problem is that the code of the shown color is actually a totally different one!
Also, Photoshop warns me about #327EB2 which is not a "Web Safe color", but I don't think this is the problem because I often use non-websafe colors in my sheets and I've never had an issue like that.
** Fiddle: http://jsfiddle.net/286tE/
*UPDATE
The problem is that the div has a background image and a background-color. The background color has to match the last pixel's color of the background image (as usual), which is #327EB2.
Anyway, I can see a different color from the last pixel of the image to the background-color:
http://test.testblueday.eu/test/cbsissue.png
You can see the page here, the problem is shown after the "Top Marchi" list on the left side:
http://test.testblueday.eu/test/cbstest.html
I've left the plain CSS and JS (not compressed) to let you see all the properties.
** UPDATE 2
I use Mac, but we can see the problem also on Windows.
You problem has nothing to do with the CSS, the problem is in the image!
This is because the examples supplied by you show the correct #327EB2 at the extra background (the one "coloured" via CSS), and that is enough to know that the CSS part is ok.
Beware of colour corrections/management done in the file exported via Photoshop.
If you can't colour manage/revert to the desired colour, another solution is doing the opposite, change the CSS colour to match the last row of the image.
As far as I can see, everything works correctly. Your image at the bottom has color with code '#1080b3' - I just downloaded that picture (gradient_box_emboss.jpg) and took a color with colorpicker in GIMP. When I modify css like this:
.embosser {
background: #1080B3 url('/images/gradient_box_emboss.jpg') right top no-repeat;
color: white;
padding: 5px 6px;
}
Difference is missing. When I printscreen your site and paste it into GIMP, color picker shows color of that "wrong" background is #327eb2. When I open your image you have in your question, color of background is #307db7. It is in jpg and I suppose some color information were lost while compressing raw data to .jpg. Possibly, something similar happens when you are trying to get color in photoshop.
Possibly problem rise when you convert images from one format to another. Simplest fix is above - change color of background to one you have on your image.

CSS: Get "disabled" input background color?

Is there a special CSS system color equivalent to the system's disabled text input background color? I know there's one for the disabled text color (GrayText), but I can't find one for the background color.
To make it more clear, I'm looking for the background color that gets set when you do something like:
<input type="text" disabled />
I don't want to restyle disabled inputs; I want to use the existing system style elsewhere.
Edit:
To be even more clear, I'm looking for the system color keyword, not the actual color. For example, to use the system's defined disabled text color, you would do this:
<span style="color: GrayText;">This text looks like disabled text in your operating system</span>
I just can't find the one for the background color.
I encountered this issue while trying to style a javascript replacement for a select. While there has been no progress in the CSS spec, there is a jQuery alternative.
$("input:disabled").css("background-color")
This returns a RGB color from an already disabled input, so unfortunately it's not as flexible as a CSS color, but it will work across browsers and reacts to custom colors applied to disabled elements through CSS.
This isn't the purpose of the keyword - the use of colour [I believe] is technically up to the browser vendor - if they observe the OS preferences then thats up to them.
There are a small number of color names originally in the W3C spec. However these were extended to include the list of X11 color names that were supported by most browser vendors.
Together those lists are all the valid names acceptable in a browser.
According to the latest CSS spec, there is no system color keyword for "disabled" background color.

Resources