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
853ba3fd
Commit
853ba3fd
authored
Feb 22, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
46c8d9b2
45b3513f
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
41 additions
and
28 deletions
+41
-28
app/assets/stylesheets/application.scss
app/assets/stylesheets/application.scss
+0
-10
app/assets/stylesheets/framework/mixins.scss
app/assets/stylesheets/framework/mixins.scss
+0
-5
app/assets/stylesheets/highlight/common.scss
app/assets/stylesheets/highlight/common.scss
+18
-0
app/assets/stylesheets/highlight/themes/dark.scss
app/assets/stylesheets/highlight/themes/dark.scss
+2
-0
app/assets/stylesheets/highlight/themes/monokai.scss
app/assets/stylesheets/highlight/themes/monokai.scss
+2
-0
app/assets/stylesheets/highlight/themes/none.scss
app/assets/stylesheets/highlight/themes/none.scss
+1
-1
app/assets/stylesheets/highlight/themes/solarized-dark.scss
app/assets/stylesheets/highlight/themes/solarized-dark.scss
+2
-0
app/assets/stylesheets/highlight/themes/solarized-light.scss
app/assets/stylesheets/highlight/themes/solarized-light.scss
+2
-0
app/assets/stylesheets/highlight/themes/white.scss
app/assets/stylesheets/highlight/themes/white.scss
+3
-0
app/assets/stylesheets/highlight/white_base.scss
app/assets/stylesheets/highlight/white_base.scss
+2
-0
app/assets/stylesheets/pages/diff.scss
app/assets/stylesheets/pages/diff.scss
+0
-12
app/views/layouts/_head.html.haml
app/views/layouts/_head.html.haml
+2
-0
changelogs/unreleased/56873-only-load-syntax-highlighting-css-when-selected.yml
...56873-only-load-syntax-highlighting-css-when-selected.yml
+5
-0
config/application.rb
config/application.rb
+2
-0
No files found.
app/assets/stylesheets/application.scss
View file @
853ba3fd
...
...
@@ -39,16 +39,6 @@
*/
@import
"components/**/*"
;
/*
* Code highlight
*/
@import
"highlight/dark"
;
@import
"highlight/monokai"
;
@import
"highlight/solarized_dark"
;
@import
"highlight/solarized_light"
;
@import
"highlight/white"
;
@import
"highlight/none"
;
/*
* Styles for JS behaviors.
*/
...
...
app/assets/stylesheets/framework/mixins.scss
View file @
853ba3fd
...
...
@@ -113,11 +113,6 @@
}
}
@mixin
dark-diff-match-line
{
color
:
$dark-diff-match-bg
;
background
:
$dark-diff-match-color
;
}
@mixin
webkit-prefix
(
$property
,
$value
)
{
#{
'-webkit-'
+
$property
}
:
$
value
;
#{
$property
}
:
$
value
;
...
...
app/assets/stylesheets/highlight/common.scss
0 → 100644
View file @
853ba3fd
@import
"../framework/variables"
;
@mixin
diff-background
(
$background
,
$idiff
,
$border
)
{
background
:
$background
;
&
.line_content
span
.idiff
{
background
:
$idiff
;
}
&
.diff-line-num
{
border-color
:
$border
;
}
}
@mixin
dark-diff-match-line
{
color
:
$dark-diff-match-bg
;
background
:
$dark-diff-match-color
;
}
app/assets/stylesheets/highlight/dark.scss
→
app/assets/stylesheets/highlight/
themes/
dark.scss
View file @
853ba3fd
/* https://github.com/MozMorris/tomorrow-pygments */
@import
"../common"
;
/*
* Dark syntax colors
*/
...
...
app/assets/stylesheets/highlight/monokai.scss
→
app/assets/stylesheets/highlight/
themes/
monokai.scss
View file @
853ba3fd
/* https://github.com/richleland/pygments-css/blob/master/monokai.css */
@import
"../common"
;
/*
* Monokai Colors
*/
...
...
app/assets/stylesheets/highlight/none.scss
→
app/assets/stylesheets/highlight/
themes/
none.scss
View file @
853ba3fd
...
...
@@ -2,7 +2,7 @@
* None Syntax Colors
*/
@import
"../common"
;
@mixin
match-line
{
color
:
$black-transparent
;
...
...
app/assets/stylesheets/highlight/
solarized_
dark.scss
→
app/assets/stylesheets/highlight/
themes/solarized-
dark.scss
View file @
853ba3fd
/* https://gist.github.com/qguv/7936275 */
@import
"../common"
;
/*
* Solarized dark colors
*/
...
...
app/assets/stylesheets/highlight/
solarized_
light.scss
→
app/assets/stylesheets/highlight/
themes/solarized-
light.scss
View file @
853ba3fd
/* https://gist.github.com/qguv/7936275 */
@import
"../common"
;
/*
* Solarized light syntax colors
*/
...
...
app/assets/stylesheets/highlight/white.scss
→
app/assets/stylesheets/highlight/
themes/
white.scss
View file @
853ba3fd
.code.white
{
@import
"white_base"
;
@import
"
../
white_base"
;
}
app/assets/stylesheets/highlight/white_base.scss
View file @
853ba3fd
/* https://github.com/aahan/pygments-github-style */
@import
"./common"
;
/*
* White Syntax Colors
*/
...
...
app/assets/stylesheets/pages/diff.scss
View file @
853ba3fd
...
...
@@ -602,18 +602,6 @@
}
}
@mixin
diff-background
(
$background
,
$idiff
,
$border
)
{
background
:
$background
;
&
.line_content
span
.idiff
{
background
:
$idiff
;
}
&
.diff-line-num
{
border-color
:
$border
;
}
}
.files
{
.diff-file
:last-child
{
margin-bottom
:
0
;
...
...
app/views/layouts/_head.html.haml
View file @
853ba3fd
...
...
@@ -38,6 +38,8 @@
=
stylesheet_link_tag
'performance_bar'
if
performance_bar_enabled?
=
stylesheet_link_tag
'csslab'
if
Feature
.
enabled?
(
:csslab
)
=
stylesheet_link_tag
"highlight/themes/
#{
user_color_scheme
}
"
,
media:
"all"
=
Gon
::
Base
.
render_data
-
if
content_for?
(
:library_javascripts
)
...
...
changelogs/unreleased/56873-only-load-syntax-highlighting-css-when-selected.yml
0 → 100644
View file @
853ba3fd
---
title
:
Only load syntax highlight CSS of selected theme
merge_request
:
25232
author
:
type
:
performance
config/application.rb
View file @
853ba3fd
...
...
@@ -164,6 +164,8 @@ module Gitlab
config
.
assets
.
precompile
<<
"errors.css"
config
.
assets
.
precompile
<<
"csslab.css"
config
.
assets
.
precompile
<<
"highlight/themes/*.css"
# Import gitlab-svgs directly from vendored directory
config
.
assets
.
paths
<<
"
#{
config
.
root
}
/node_modules/@gitlab/svgs/dist"
config
.
assets
.
precompile
<<
"icons.svg"
...
...
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