Visual Studio Code has a built-in Markdown previewer. A theme can be selected in the preview window by right-clicking and choosing Preview Theme and selecting from various CSS options such as github-light.css, none.css, etc.
I would like to use some of these CSS files as a starting point for my own Markdown preview CSS. Where are these CSS files located and how may one access them?
On my Windows machine, it looks like the CSS file that controls the styling is in C:\Program Files\Microsoft VS Code\resources\app\extensions\markdown-language-features\media. The file is called markdown.css. Sure enough, when I change some of the values around, I see the preview window (after closing and reopening it, or switching tabs) update with the specified changes.
Within this file are multiple "Theming" classes, which I suspect are what get referenced when you switch themes, rather than having multiple .css files per theme:
/** Theming */
.vscode-light pre {
background-color: rgba(220, 220, 220, 0.4);
}
.vscode-dark pre {
background-color: rgba(10, 10, 10, 0.4);
}
.vscode-high-contrast pre {
background-color: rgb(0, 0, 0);
}
.vscode-high-contrast h1 {
border-color: rgb(0, 0, 0);
}
.vscode-light th {
border-color: rgba(0, 0, 0, 0.69);
}
.vscode-dark th {
border-color: rgba(255, 255, 255, 0.69);
}
.vscode-light h1,
.vscode-light hr,
.vscode-light td {
border-color: rgba(0, 0, 0, 0.18);
}
.vscode-dark h1,
.vscode-dark hr,
.vscode-dark td {
border-color: rgba(255, 255, 255, 0.18);
}
Related
My same css is used normally in a vuecli project, and the error report in a custom webpack project has no effect. What should I do?
It looks like your CSS loader doesn't support the space-separated syntax of rgb() (introduced in CSS Colors Level 4).
As a workaround, switch to the classic comma-separated syntax:
box-shadow: 0 2px 12px 0 rgb(0, 0, 0, 10%);
h1 {
box-shadow: 0 2px 12px 0 rgb(0, 0, 0, 10%);
}
<h1>Hello world</h1>
The default theme for Atom's Git Diff package is,
It shows the changes in dark green, deleted lines in dark red and has a black background.
Is there a way to show the difference as shown in the Github console as show in the image below.
I tried adding the code below to the styles.less file but that does not highlight the modified text and does not modify the colour in the unstaged changes but modifies the colour while working on the file.(please refer to image below the code)
atom-text-editor .gutter .line-number {
&[class*="git"] {
padding-left: 0 !important;
border-left: none !important;
color: #ffffff;
opacity: 1;
}
&.git-line-added {
background-color: rgba(168, 255, 96, 0.6);
}
&.git-line-modified {
background-color: rgba(233, 192, 98, 0.6);
}
&.git-line-removed {
background-color: rgba(204, 102, 102, 0.6);
}}
I am wondering if it is possible to add the opacity element to a sass variable? I am working on a project where I need to create different shades of a color and use them in custom typography file. My problem is when I create a color variable in rdga and implement it into my work the variable changes the code to a CSS opacity element which is written under a color element then this gets ran through the browser and throws and error. Is there a certain way to implement opacity in a variable so you don't get this problem?
Any help would be great, thanks
here are my variables:
$white-text-dh: rgba(255, 255, 255, 0.5);
$white-text-d: rgba(255, 255, 255, 0.12);
here is the typography ex:
.c-title{
font-size:20px;
color: $white-text-d;
font-family: Roboto-Light;
}
here is the html
<span class="c-title">hello</span>
this is what reads in the developer tools with an error going through the color. the color element can not read opacity
.c-title {
font-size: 20px;
color: #ffffff opacity 0.7%;
font-family: Roboto-Light;
}
I tested this and it works for me:
SCSS
$white: #fff;
$white-text-dh: rgba($white, .5);
.c-title {
color: $white-text-dh;
}
HTML
<h1 class="c-title">Test</h1>
I have a table view that looks like this
Is there any way that I can remove the borders around the headers and make them look plain?
My current style sheet for the table is:
background-color: qlineargradient(spread:pad, x1:0.102273, y1:0.068, x2:0.392318, y2:0.614, stop:0 rgba(200, 200, 200, 255), stop:1 rgba(255, 255, 255, 255));
Yes, headers are "stylable". Just notice that headers are inside the QTableView but are different widgets (They are QHeaderView). What you need to change is the style for the sections of the QHeaderView so you just have to select it correctly in your style sheet.
Following a very basic example so you can have a starting point.
This is what I would set as style sheet of the QTableWidget in order to achieve what you want:
QTableView {
background-color: qlineargradient(spread:pad, x1:0.102273, y1:0.068, x2:0.392318, y2:0.614, stop:0 rgba(200, 200, 200, 255), stop:1 rgba(255, 255, 255, 255));
}
QHeaderView::section {
border: 0px;
}
More info on styling QHeaderViews can be found here.
I hope this helps.
Let a color variable used in sheet.less.
color is in HEX format #f57e20.
I want to use that color but add an alpha channel to it.
I want to end up with rgba(245, 126, 32, 0.5)
Does Bootstrap or less have anything to do this?
There are a some built in functions in less.js and mixins from Bootstrap that you could use:
This is a less.js function:
// using a variable
#color: #f57e20;
.test {
background: fade(#color, 50%); // return #color with 50% transparency
}
// or without the color variable
.test2 {
background: fade(#f57e20, 50%); // return #color with 50% transparency
}
These both result in:
.test {
background: rgba(245, 126, 32, 0.5);
}
.test2 {
background: rgba(245, 126, 32, 0.5);
}
Or use a Bootstrap mixin:
.test3 {
#translucent > .background(#f57e20, 0.5); // use HSLA mixin
}
Which results in:
.test3 {
background-color: rgba(244, 123, 31, 0.5);
}
I'll include the (fixed) code for the translucent mixins here for archiving purposes, since (last I checked) it is no longer included as of Bootstrap 3.0.0:
// Add an alphatransparency value to any background or border color (via Elyse Holladay)
#translucent {
.background(#color: #white, #alpha: 1) {
background-color: fade(#color, #alpha);
}
.border(#color: #white, #alpha: 1) {
border-color: fade(#color, #alpha);
.background-clip(padding-box);
}
}
You may want to try:
background: rgba(red(#color), green(#color), blue(#color), #alpha);
I had to do something similar when writing a quick mixin which used box-shadow.