diff options
author | Clement Ho <clemmakesapps@gmail.com> | 2018-12-08 01:16:46 +0000 |
---|---|---|
committer | Annabel Dunstone Gray <annabel.m.gray@gmail.com> | 2018-12-08 01:16:46 +0000 |
commit | a73f2ec6b58da2708d786dd4326ee5de7bedd402 (patch) | |
tree | 5331eb448caad99d55f2689450b9088130d80475 /app | |
parent | 4fb5e47928fb80d6a8d529e0044af226ba9d1eae (diff) | |
download | gitlab-ce-a73f2ec6b58da2708d786dd4326ee5de7bedd402.tar.gz |
Integrate csslab
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/bootstrap_migration.scss | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/csslab.scss | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/files.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/markdown_area.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/typography.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/wiki.scss | 2 | ||||
-rw-r--r-- | app/views/layouts/_head.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/blob/_blob.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/blob/viewers/_markup.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/snippets/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/wikis/show.html.haml | 2 |
12 files changed, 16 insertions, 12 deletions
diff --git a/app/assets/stylesheets/bootstrap_migration.scss b/app/assets/stylesheets/bootstrap_migration.scss index 62024b8c555..f0671e36130 100644 --- a/app/assets/stylesheets/bootstrap_migration.scss +++ b/app/assets/stylesheets/bootstrap_migration.scss @@ -18,8 +18,10 @@ $input-border: $border-color; $padding-base-vertical: $gl-vert-padding; $padding-base-horizontal: $gl-padding; -html { - // Override default font size used in bs4 +body, +.form-control, +.search form { + // Override default font size used in non-csslab UI font-size: 14px; } diff --git a/app/assets/stylesheets/csslab.scss b/app/assets/stylesheets/csslab.scss new file mode 100644 index 00000000000..acaa41e2677 --- /dev/null +++ b/app/assets/stylesheets/csslab.scss @@ -0,0 +1 @@ +@import "../../../node_modules/@gitlab/csslab/dist/css/csslab-slim"; diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index 037a5adfb7e..3ac7b6b704b 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -24,7 +24,7 @@ } } - table { + &:not(.use-csslab) table { @extend .table; } diff --git a/app/assets/stylesheets/framework/markdown_area.scss b/app/assets/stylesheets/framework/markdown_area.scss index 0f6fb16774c..2b110e23fb8 100644 --- a/app/assets/stylesheets/framework/markdown_area.scss +++ b/app/assets/stylesheets/framework/markdown_area.scss @@ -131,7 +131,7 @@ width: 100%; } -.md { +.md:not(.use-csslab) { &.md-preview-holder { // Reset ul style types since we're nested inside a ul already @include bulleted-list; diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index b3b99df5790..0c81dc2e156 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -368,11 +368,11 @@ code { * Apply Markdown typography * */ -.wiki { +.wiki:not(.use-csslab) { @include md-typography; } -.md { +.md:not(.use-csslab) { @include md-typography; } diff --git a/app/assets/stylesheets/pages/wiki.scss b/app/assets/stylesheets/pages/wiki.scss index 800f5c68e39..82e887aa62a 100644 --- a/app/assets/stylesheets/pages/wiki.scss +++ b/app/assets/stylesheets/pages/wiki.scss @@ -180,7 +180,7 @@ ul.wiki-pages-list.content-list { } } -.wiki { +.wiki:not(.use-csslab) { table { @include markdown-table; } diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index ac5916d129c..08a6359f777 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -36,6 +36,7 @@ = stylesheet_link_tag "print", media: "print" = stylesheet_link_tag "test", media: "all" if Rails.env.test? = stylesheet_link_tag 'performance_bar' if performance_bar_enabled? + = stylesheet_link_tag 'csslab' if Feature.enabled?(:csslab) = Gon::Base.render_data diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index cf273aab108..95c5eb32c7f 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -9,6 +9,6 @@ = render "projects/blob/auxiliary_viewer", blob: blob #blob-content-holder.blob-content-holder - %article.file-holder + %article.file-holder{ class: ('use-csslab' if Feature.enabled?(:csslab)) } = render 'projects/blob/header', blob: blob = render 'projects/blob/content', blob: blob diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index eb65cd90ea8..ff460a3831c 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -1,7 +1,7 @@ .diff-file.file-holder .diff-content - if markup?(@blob.name) - .file-content.wiki + .file-content.wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) } = markup(@blob.name, @content, legacy_render_context(params)) - else .file-content.code.js-syntax-highlight diff --git a/app/views/projects/blob/viewers/_markup.html.haml b/app/views/projects/blob/viewers/_markup.html.haml index bd12cadf240..6edbfd91b21 100644 --- a/app/views/projects/blob/viewers/_markup.html.haml +++ b/app/views/projects/blob/viewers/_markup.html.haml @@ -2,5 +2,5 @@ - context = legacy_render_context(params) - unless context[:markdown_engine] == :redcarpet - context[:rendered] = blob.rendered_markup if blob.respond_to?(:rendered_markup) -.file-content.wiki +.file-content.wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) } = markup(blob.name, blob.data, context) diff --git a/app/views/projects/snippets/show.html.haml b/app/views/projects/snippets/show.html.haml index f495b4eaf30..da48cb207a4 100644 --- a/app/views/projects/snippets/show.html.haml +++ b/app/views/projects/snippets/show.html.haml @@ -6,7 +6,7 @@ = render 'shared/snippets/header' .project-snippets - %article.file-holder.snippet-file-content + %article.file-holder.snippet-file-content{ class: ('use-csslab' if Feature.enabled?(:csslab)) } = render 'shared/snippets/blob' .row-content-block.top-block.content-component-block diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml index cc38ec12fd8..4d5fd55364c 100644 --- a/app/views/projects/wikis/show.html.haml +++ b/app/views/projects/wikis/show.html.haml @@ -26,7 +26,7 @@ = (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe .prepend-top-default.append-bottom-default - .wiki + .wiki.md{ class: ('use-csslab' if Feature.enabled?(:csslab)) } = render_wiki_content(@page, legacy_render_context(params)) = render 'sidebar' |