diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/fonts.scss index 2f7228766b925b7359878983bd58d2b37e65d4de..6886e751b723b37bc15043179fa1ef846774d69f 100644 --- a/app/assets/stylesheets/fonts.scss +++ b/app/assets/stylesheets/fonts.scss @@ -1,5 +1,3 @@ -$font-display: optional !default; - /* ------------------------------------------------------- Inter variable font. @@ -9,7 +7,7 @@ Usage: @font-face { font-family: 'GitLab Sans'; font-weight: 100 900; - font-display: $font-display; + font-display: swap; font-style: normal; /* stylelint-disable-next-line property-no-unknown */ font-named-instance: 'Regular'; @@ -19,7 +17,7 @@ Usage: @font-face { font-family: 'GitLab Sans'; font-weight: 100 900; - font-display: $font-display; + font-display: swap; font-style: italic; /* stylelint-disable-next-line property-no-unknown */ font-named-instance: 'Regular'; @@ -35,7 +33,7 @@ Usage: @font-face { font-family: 'GitLab Mono'; font-weight: 100 900; - font-display: $font-display; + font-display: swap; font-style: normal; src: font-url('gitlab-mono/GitLabMono.woff2') format('woff2'); } @@ -43,7 +41,7 @@ Usage: @font-face { font-family: 'GitLab Mono'; font-weight: 100 900; - font-display: $font-display; + font-display: swap; font-style: italic; src: font-url('gitlab-mono/GitLabMono-Italic.woff2') format('woff2'); } diff --git a/app/assets/stylesheets/fonts_optional.scss b/app/assets/stylesheets/fonts_optional.scss deleted file mode 100644 index 2b1a3796bbc5a8241a88e16600dc0c1f55a1dbfe..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/fonts_optional.scss +++ /dev/null @@ -1 +0,0 @@ -@import 'fonts'; diff --git a/app/assets/stylesheets/fonts_swap.scss b/app/assets/stylesheets/fonts_swap.scss deleted file mode 100644 index b259b8ad10303eb067fd855a50742ae6a4d33e55..0000000000000000000000000000000000000000 --- a/app/assets/stylesheets/fonts_swap.scss +++ /dev/null @@ -1,3 +0,0 @@ -$font-display: swap; - -@import 'fonts'; diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 267c32e53bd5c513f13c8da95b76b15a1bed8b70..bb492913346dc7336960ab402e0a2bff58567bb9 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -38,10 +38,7 @@ = 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? - - if ::Feature.enabled?(:font_display_swap, current_user) - = stylesheet_link_tag_defer "fonts_swap" - - else - = stylesheet_link_tag_defer "fonts_optional" + = stylesheet_link_tag_defer "fonts" = stylesheet_link_tag_defer "highlight/themes/#{user_color_scheme}" diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml index b6b1fe716dbb8882c3bacb42df9756d0c370c7a2..bf0421e96248747ee801c9ea49ee9e1666ece55a 100644 --- a/app/views/layouts/_loading_hints.html.haml +++ b/app/views/layouts/_loading_hints.html.haml @@ -20,7 +20,4 @@ %link{ rel: 'preload', href: font_path('gitlab-sans/GitLabSans-Italic.woff2'), as: 'font', crossorigin: css_crossorigin } %link{ rel: 'preload', href: font_path('gitlab-mono/GitLabMono.woff2'), as: 'font', crossorigin: css_crossorigin } %link{ rel: 'preload', href: font_path('gitlab-mono/GitLabMono-Italic.woff2'), as: 'font', crossorigin: css_crossorigin } - - if ::Feature.enabled?(:font_display_swap, current_user) - = preload_link_tag(path_to_stylesheet('fonts_swap'), crossorigin: css_crossorigin) - - else - = preload_link_tag(path_to_stylesheet('fonts_optional'), crossorigin: css_crossorigin) + = preload_link_tag(path_to_stylesheet('fonts'), crossorigin: css_crossorigin) diff --git a/app/views/layouts/component_preview.html.haml b/app/views/layouts/component_preview.html.haml index 4ef7ba0486877d0419d690765badeec49e73961e..82ad5e3e3bbd34b0050d6ec808b81fdfd924ab11 100644 --- a/app/views/layouts/component_preview.html.haml +++ b/app/views/layouts/component_preview.html.haml @@ -1,4 +1,5 @@ %head + = stylesheet_link_tag "fonts" - if params[:lookbook][:display][:theme] == "light" = stylesheet_link_tag "application" = stylesheet_link_tag "application_utilities" @@ -6,11 +7,6 @@ = stylesheet_link_tag "application_dark" = stylesheet_link_tag "application_utilities_dark" - - if ::Feature.enabled?(:font_display_swap, current_user) - = stylesheet_link_tag_defer "fonts_swap" - - else - = stylesheet_link_tag_defer "fonts_optional" - %body .gl-mt-6{ class: (params[:lookbook][:display][:layout] == "fluid" ? "container-fluid" : "container") } - if params[:lookbook][:display][:bg_dark] diff --git a/config/application.rb b/config/application.rb index ad62648868fc8ac77fd2204864285d1d58e5cab5..29f368801531859436089fc01b9119de19caa21e 100644 --- a/config/application.rb +++ b/config/application.rb @@ -368,8 +368,7 @@ class Application < Rails::Application config.assets.precompile << "disable_animations.css" config.assets.precompile << "test_environment.css" config.assets.precompile << "snippets.css" - config.assets.precompile << "fonts_optional.css" - config.assets.precompile << "fonts_swap.css" + config.assets.precompile << "fonts.css" config.assets.precompile << "locale/**/app.js" config.assets.precompile << "emoji_sprites.css" config.assets.precompile << "errors.css" diff --git a/config/feature_flags/development/font_display_swap.yml b/config/feature_flags/development/font_display_swap.yml deleted file mode 100644 index cabe3ca614acfa5c5f61c4cba1843eab73b8a673..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/font_display_swap.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: font_display_swap -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132798 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/426437 -milestone: '16.5' -type: development -group: group::foundations -default_enabled: false