Commit 6f811da0 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch 'tz-update-startup-css-2020-08-24' into 'master'

Updated generated CSS with CSS 2020-08-24

See merge request gitlab-org/gitlab!40278
parents b06b17c3 7ce56e05
...@@ -7,7 +7,7 @@ scss_files: ...@@ -7,7 +7,7 @@ scss_files:
exclude: exclude:
- 'app/assets/stylesheets/pages/emojis.scss' - 'app/assets/stylesheets/pages/emojis.scss'
- 'app/assets/stylesheets/startup/startup-general.scss' - 'app/assets/stylesheets/startup/startup-*.scss'
linters: linters:
# Reports when you use improper spacing around ! (the "bang") in !default, # Reports when you use improper spacing around ! (the "bang") in !default,
......
This diff is collapsed.
This diff is collapsed.
...@@ -236,12 +236,12 @@ module ApplicationHelper ...@@ -236,12 +236,12 @@ module ApplicationHelper
end end
def use_startup_css? def use_startup_css?
Feature.enabled?(:startup_css) && !Rails.env.test? (Feature.enabled?(:startup_css) || params[:startup_css] == 'true' || cookies['startup_css'] == 'true') && !Rails.env.test?
end end
def stylesheet_link_tag_defer(path) def stylesheet_link_tag_defer(path)
if use_startup_css? if use_startup_css?
stylesheet_link_tag(path, media: "print") stylesheet_link_tag(path, media: "print", crossorigin: ActionController::Base.asset_host ? 'anonymous' : nil)
else else
stylesheet_link_tag(path, media: "all") stylesheet_link_tag(path, media: "all")
end end
......
- return unless use_startup_css? - return unless use_startup_css?
- startup_filename = current_path?("sessions#new") ? 'signin' : user_application_theme == 'gl-dark' ? 'dark' : 'general'
%style{ type: "text/css" } %style{ type: "text/css" }
= Rails.application.assets_manifest.find_sources('startup/startup-general.css').first.to_s.html_safe = Rails.application.assets_manifest.find_sources("startup/startup-#{startup_filename}.css").first.to_s.html_safe
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"prettier-staged-save": "node ./scripts/frontend/prettier.js save", "prettier-staged-save": "node ./scripts/frontend/prettier.js save",
"prettier-all": "node ./scripts/frontend/prettier.js check-all", "prettier-all": "node ./scripts/frontend/prettier.js check-all",
"prettier-all-save": "node ./scripts/frontend/prettier.js save-all", "prettier-all-save": "node ./scripts/frontend/prettier.js save-all",
"stylelint": "yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!app/assets/stylesheets/startup/startup-general.scss' '!**/vendors/**'", "stylelint": "yarn stylelint-file 'app/assets/stylesheets/**/*.*' 'ee/app/assets/stylesheets/**/*.*' '!app/assets/stylesheets/startup/startup-*.scss' '!**/vendors/**'",
"stylelint-file": "BROWSERSLIST_IGNORE_OLD_DATA=true node node_modules/stylelint/bin/stylelint.js", "stylelint-file": "BROWSERSLIST_IGNORE_OLD_DATA=true node node_modules/stylelint/bin/stylelint.js",
"stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js", "stylelint-create-utility-map": "node scripts/frontend/stylelint/stylelint-utility-map.js",
"test": "node scripts/frontend/test", "test": "node scripts/frontend/test",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment