Commit 8876a83e authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'startup-glitches' into 'master'

Fix Layout Shifts by managing priorities when enabling styles

See merge request gitlab-org/gitlab!64806
parents c5a44926 47e07410
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
- if page_canonical_link - if page_canonical_link
%link{ rel: 'canonical', href: page_canonical_link } %link{ rel: 'canonical', href: page_canonical_link }
= preload_link_tag(path_to_stylesheet('application_utilities'))
= yield :prefetch_asset_tags = yield :prefetch_asset_tags
= favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png' = favicon_link_tag favicon, id: 'favicon', data: { original_href: favicon }, type: 'image/png'
...@@ -39,12 +40,10 @@ ...@@ -39,12 +40,10 @@
= render 'layouts/startup_css', { startup_filename: local_assigns.fetch(:startup_filename, nil) } = render 'layouts/startup_css', { startup_filename: local_assigns.fetch(:startup_filename, nil) }
- if user_application_theme == 'gl-dark' - if user_application_theme == 'gl-dark'
= stylesheet_link_tag_defer "application_dark" = stylesheet_link_tag_defer "application_dark"
= yield :page_specific_styles
= stylesheet_link_tag_defer "application_utilities_dark"
- else - else
= stylesheet_link_tag_defer "application" = stylesheet_link_tag_defer "application"
= yield :page_specific_styles = yield :page_specific_styles
= stylesheet_link_tag_defer "application_utilities" = stylesheet_link_tag_defer 'application_utilities'
= stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations'] = stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations']
= stylesheet_link_tag "test_environment", media: "all" if Rails.env.test? = stylesheet_link_tag "test_environment", media: "all" if Rails.env.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