mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-02 03:25:56 +01:00
Fix css conflicts on diff syntaxhighlighting by using a css module
This commit is contained in:
278
scm-ui/ui-components/src/syntax-highlighting.module.css
Normal file
278
scm-ui/ui-components/src/syntax-highlighting.module.css
Normal file
@@ -0,0 +1,278 @@
|
||||
/**
|
||||
* MIT License
|
||||
*
|
||||
* Copyright (c) 2020-present Cloudogu GmbH and Contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* Generated with http://k88hudson.github.io/syntax-highlighting-theme-generator/www */
|
||||
|
||||
/* http://k88hudson.github.io/react-markdocs */
|
||||
|
||||
/**
|
||||
|
||||
* @author k88hudson
|
||||
|
||||
*
|
||||
|
||||
* Based on prism.js default theme for JavaScript, CSS and HTML
|
||||
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
|
||||
* @author Lea Verou
|
||||
|
||||
*/
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* General
|
||||
|
||||
*/
|
||||
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
|
||||
color: #363636;
|
||||
|
||||
font-size: 13px;
|
||||
|
||||
text-shadow: none;
|
||||
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
|
||||
direction: ltr;
|
||||
|
||||
text-align: left;
|
||||
|
||||
white-space: pre;
|
||||
|
||||
word-spacing: normal;
|
||||
|
||||
word-break: normal;
|
||||
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
|
||||
-o-tab-size: 4;
|
||||
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
|
||||
-moz-hyphens: none;
|
||||
|
||||
-ms-hyphens: none;
|
||||
|
||||
hyphens: none;
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection,
|
||||
code[class*="language-"]::selection,
|
||||
pre[class*="language-"]::mozselection,
|
||||
code[class*="language-"]::mozselection {
|
||||
|
||||
text-shadow: none;
|
||||
|
||||
background: #7fe3cd;
|
||||
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"] {
|
||||
|
||||
text-shadow: none;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"] {
|
||||
|
||||
padding: 1em;
|
||||
|
||||
margin: .5em 0;
|
||||
|
||||
overflow: auto;
|
||||
|
||||
background: #ffffff;
|
||||
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"] {
|
||||
|
||||
padding: .1em .3em;
|
||||
|
||||
border-radius: .3em;
|
||||
|
||||
color: #ff3860;
|
||||
|
||||
background: #fbe7eb;
|
||||
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* Tokens
|
||||
|
||||
*/
|
||||
|
||||
.namespace {
|
||||
|
||||
opacity: .7;
|
||||
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
|
||||
color: #9a9a9a;
|
||||
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
|
||||
color: #9a9a9a;
|
||||
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
|
||||
color: #2c99c7;
|
||||
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
|
||||
color: #005f9a;
|
||||
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
|
||||
color: #686868;
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
|
||||
color: #00a984;
|
||||
|
||||
}
|
||||
|
||||
.token.function {
|
||||
|
||||
color: #ff3860;
|
||||
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
|
||||
color: #a74eb2;
|
||||
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
}
|
||||
|
||||
.token.italic {
|
||||
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
|
||||
cursor: help;
|
||||
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
||||
* Line highlighting
|
||||
|
||||
*/
|
||||
|
||||
pre[data-line] {
|
||||
|
||||
position: relative;
|
||||
|
||||
}
|
||||
|
||||
pre[class*="language-"] > code[class*="language-"] {
|
||||
|
||||
position: relative;
|
||||
|
||||
z-index: 1;
|
||||
|
||||
}
|
||||
|
||||
.line-highlight {
|
||||
|
||||
position: absolute;
|
||||
|
||||
left: 0;
|
||||
|
||||
right: 0;
|
||||
|
||||
padding: inherit 0;
|
||||
|
||||
margin-top: 1em;
|
||||
|
||||
background: #f5f5f5;
|
||||
|
||||
box-shadow: inset 5px 0 0 #99d8f3;
|
||||
|
||||
z-index: 0;
|
||||
|
||||
pointer-events: none;
|
||||
|
||||
line-height: inherit;
|
||||
|
||||
white-space: pre;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user