mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 10:24:47 +00:00
c5ab082ed7
Sets the tab size to 4 in the Markdown preview for code blocks in Markdown documents. I consider a tab size of 4 being standard and the default of 8 being unbearable. The few people, if any, using a different tab size than 4 can use the custom markdown preview style feature, if it is going to be fixed anytime (https://github.com/microsoft/vscode/issues/77290). [`tab-size` is still marked *experimental* in the MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size), but it doesn't hurt, if not supported. However, in the used Chromium version it is supported.
227 lines
4.3 KiB
CSS
227 lines
4.3 KiB
CSS
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
html, body {
|
|
font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
|
|
font-size: var(--vscode-markdown-font-size, 14px);
|
|
padding: 0 26px;
|
|
line-height: var(--vscode-markdown-line-height, 22px);
|
|
word-wrap: break-word;
|
|
}
|
|
|
|
#code-csp-warning {
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
color: white;
|
|
margin: 16px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
font-family: sans-serif;
|
|
background-color:#444444;
|
|
cursor: pointer;
|
|
padding: 6px;
|
|
box-shadow: 1px 1px 1px rgba(0,0,0,.25);
|
|
}
|
|
|
|
#code-csp-warning:hover {
|
|
text-decoration: none;
|
|
background-color:#007acc;
|
|
box-shadow: 2px 2px 2px rgba(0,0,0,.25);
|
|
}
|
|
|
|
body.scrollBeyondLastLine {
|
|
margin-bottom: calc(100vh - 22px);
|
|
}
|
|
|
|
body.showEditorSelection .code-line {
|
|
position: relative;
|
|
}
|
|
|
|
body.showEditorSelection .code-active-line:before,
|
|
body.showEditorSelection .code-line:hover:before {
|
|
content: "";
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
left: -12px;
|
|
height: 100%;
|
|
}
|
|
|
|
body.showEditorSelection li.code-active-line:before,
|
|
body.showEditorSelection li.code-line:hover:before {
|
|
left: -30px;
|
|
}
|
|
|
|
.vscode-light.showEditorSelection .code-active-line:before {
|
|
border-left: 3px solid rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.vscode-light.showEditorSelection .code-line:hover:before {
|
|
border-left: 3px solid rgba(0, 0, 0, 0.40);
|
|
}
|
|
|
|
.vscode-light.showEditorSelection .code-line .code-line:hover:before {
|
|
border-left: none;
|
|
}
|
|
|
|
.vscode-dark.showEditorSelection .code-active-line:before {
|
|
border-left: 3px solid rgba(255, 255, 255, 0.4);
|
|
}
|
|
|
|
.vscode-dark.showEditorSelection .code-line:hover:before {
|
|
border-left: 3px solid rgba(255, 255, 255, 0.60);
|
|
}
|
|
|
|
.vscode-dark.showEditorSelection .code-line .code-line:hover:before {
|
|
border-left: none;
|
|
}
|
|
|
|
.vscode-high-contrast.showEditorSelection .code-active-line:before {
|
|
border-left: 3px solid rgba(255, 160, 0, 0.7);
|
|
}
|
|
|
|
.vscode-high-contrast.showEditorSelection .code-line:hover:before {
|
|
border-left: 3px solid rgba(255, 160, 0, 1);
|
|
}
|
|
|
|
.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
|
|
border-left: none;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
max-height: 100%;
|
|
}
|
|
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
a:focus,
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
outline: 1px solid -webkit-focus-ring-color;
|
|
outline-offset: -1px;
|
|
}
|
|
|
|
hr {
|
|
border: 0;
|
|
height: 2px;
|
|
border-bottom: 2px solid;
|
|
}
|
|
|
|
h1 {
|
|
padding-bottom: 0.3em;
|
|
line-height: 1.2;
|
|
border-bottom-width: 1px;
|
|
border-bottom-style: solid;
|
|
}
|
|
|
|
h1, h2, h3 {
|
|
font-weight: normal;
|
|
}
|
|
|
|
h1 code,
|
|
h2 code,
|
|
h3 code,
|
|
h4 code,
|
|
h5 code,
|
|
h6 code {
|
|
line-height: auto;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
table > thead > tr > th {
|
|
text-align: left;
|
|
border-bottom: 1px solid;
|
|
}
|
|
|
|
table > thead > tr > th,
|
|
table > thead > tr > td,
|
|
table > tbody > tr > th,
|
|
table > tbody > tr > td {
|
|
padding: 5px 10px;
|
|
}
|
|
|
|
table > tbody > tr + tr > td {
|
|
border-top: 1px solid;
|
|
}
|
|
|
|
blockquote {
|
|
margin: 0 7px 0 5px;
|
|
padding: 0 16px 0 10px;
|
|
border-left-width: 5px;
|
|
border-left-style: solid;
|
|
}
|
|
|
|
code {
|
|
font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
|
|
font-size: 1em;
|
|
line-height: 1.357em;
|
|
}
|
|
|
|
body.wordWrap pre {
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
pre:not(.hljs),
|
|
pre.hljs code > div {
|
|
padding: 16px;
|
|
border-radius: 3px;
|
|
overflow: auto;
|
|
}
|
|
|
|
/** Theming */
|
|
|
|
pre code {
|
|
color: var(--vscode-editor-foreground);
|
|
tab-size: 4;
|
|
}
|
|
|
|
|
|
.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 table > thead > tr > th {
|
|
border-color: rgba(0, 0, 0, 0.69);
|
|
}
|
|
|
|
.vscode-dark table > thead > tr > th {
|
|
border-color: rgba(255, 255, 255, 0.69);
|
|
}
|
|
|
|
.vscode-light h1,
|
|
.vscode-light hr,
|
|
.vscode-light table > tbody > tr + tr > td {
|
|
border-color: rgba(0, 0, 0, 0.18);
|
|
}
|
|
|
|
.vscode-dark h1,
|
|
.vscode-dark hr,
|
|
.vscode-dark table > tbody > tr + tr > td {
|
|
border-color: rgba(255, 255, 255, 0.18);
|
|
}
|