Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b1a7b9b9
Commit
b1a7b9b9
authored
Apr 27, 2020
by
Himanshu Kapoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix markdown preview styling for dark theme
Fixes in markdown preview styling for Web IDE dark theme
parent
bc55b37b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
app/assets/javascripts/behaviors/markdown/render_mermaid.js
app/assets/javascripts/behaviors/markdown/render_mermaid.js
+12
-1
app/assets/stylesheets/page_bundles/themes/_dark.scss
app/assets/stylesheets/page_bundles/themes/_dark.scss
+26
-0
No files found.
app/assets/javascripts/behaviors/markdown/render_mermaid.js
View file @
b1a7b9b9
...
@@ -24,13 +24,24 @@ let mermaidModule = {};
...
@@ -24,13 +24,24 @@ let mermaidModule = {};
function
importMermaidModule
()
{
function
importMermaidModule
()
{
return
import
(
/* webpackChunkName: 'mermaid' */
'
mermaid
'
)
return
import
(
/* webpackChunkName: 'mermaid' */
'
mermaid
'
)
.
then
(
mermaid
=>
{
.
then
(
mermaid
=>
{
let
theme
=
'
neutral
'
;
if
(
window
.
gon
?.
user_color_scheme
===
'
dark
'
&&
window
.
gon
?.
features
?.
webideDarkTheme
&&
// if on the Web IDE page
document
.
querySelector
(
'
.ide
'
)
)
{
theme
=
'
dark
'
;
}
mermaid
.
initialize
({
mermaid
.
initialize
({
// mermaid core options
// mermaid core options
mermaid
:
{
mermaid
:
{
startOnLoad
:
false
,
startOnLoad
:
false
,
},
},
// mermaidAPI options
// mermaidAPI options
theme
:
'
neutral
'
,
theme
,
flowchart
:
{
flowchart
:
{
useMaxWidth
:
true
,
useMaxWidth
:
true
,
htmlLabels
:
false
,
htmlLabels
:
false
,
...
...
app/assets/stylesheets/page_bundles/themes/_dark.scss
View file @
b1a7b9b9
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
$btn-disabled-border
:
rgba
(
223
,
223
,
223
,
0
.24
);
$btn-disabled-border
:
rgba
(
223
,
223
,
223
,
0
.24
);
$btn-disabled-color
:
rgba
(
145
,
145
,
145
,
0
.48
);
$btn-disabled-color
:
rgba
(
145
,
145
,
145
,
0
.48
);
$diff-insert
:
rgba
(
155
,
185
,
85
,
0
.2
);
$diff-remove
:
rgba
(
255
,
0
,
0
,
0
.2
);
a
{
a
{
color
:
$link-color
;
color
:
$link-color
;
}
}
...
@@ -37,6 +40,8 @@
...
@@ -37,6 +40,8 @@
h4
:not
(
.modal-title
),
h4
:not
(
.modal-title
),
h5
,
h5
,
h6
,
h6
,
code
,
.md
table
:not
(
.code
),
.md
,
.md
,
.md
p
,
.md
p
,
.ide-view
,
.ide-view
,
...
@@ -86,6 +91,7 @@
...
@@ -86,6 +91,7 @@
background-color
:
transparent
;
background-color
:
transparent
;
}
}
code
,
.multi-file-commit-panel
,
.multi-file-commit-panel
,
.multi-file-tabs
,
.multi-file-tabs
,
.multi-file-tabs
li
,
.multi-file-tabs
li
,
...
@@ -102,6 +108,10 @@
...
@@ -102,6 +108,10 @@
background-color
:
$background
;
background-color
:
$background
;
}
}
pre
code
{
background-color
:
inherit
;
}
.ide-sidebar-link
:hover
{
.ide-sidebar-link
:hover
{
background-color
:
$background-hover
;
background-color
:
$background-hover
;
}
}
...
@@ -111,6 +121,7 @@
...
@@ -111,6 +121,7 @@
}
}
&
,
&
,
.md
table
:not
(
.code
)
tr
th
,
.multi-file-commit-panel-inner-content
,
.multi-file-commit-panel-inner-content
,
.multi-file-commit-form
,
.multi-file-commit-form
,
.multi-file-tabs
li
.active
,
.multi-file-tabs
li
.active
,
...
@@ -141,6 +152,12 @@
...
@@ -141,6 +152,12 @@
border-color
:
$border-color
;
border-color
:
$border-color
;
}
}
.md
h1
,
.md
h2
,
.md
blockquote
,
pre
,
.md
table
:not
(
.code
)
tbody
td
,
.md
table
:not
(
.code
)
tr
th
,
.multi-file-commit-form
>
.commit-form-compact
,
.multi-file-commit-form
>
.commit-form-compact
,
.ide-tree-header
,
.ide-tree-header
,
.multi-file-commit-panel-header
,
.multi-file-commit-panel-header
,
...
@@ -267,6 +284,7 @@
...
@@ -267,6 +284,7 @@
}
}
.md-previewer
,
.md-previewer
,
.md
table
:not
(
.code
)
tbody
,
.ide-empty-state
{
.ide-empty-state
{
background-color
:
$border-color
;
background-color
:
$border-color
;
}
}
...
@@ -289,6 +307,14 @@
...
@@ -289,6 +307,14 @@
}
}
}
}
}
}
.idiff.addition
{
background-color
:
$diff-insert
;
}
.idiff.deletion
{
background-color
:
$diff-remove
;
}
}
}
.navbar.theme-dark
{
.navbar.theme-dark
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment