mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 21:45:25 +08:00
b1399d6a6f removed the last mobile/desktop-specific CSS from Discourse.
Everything is now handled by media queries in common scss.
This commit drops the mobile/desktop stylesheet infrastructure for core.
It remains in place for themes & plugins.
Much of the diff is updating specs to avoid mobile/desktop as fixtures,
and to remove argument defaults which no longer make sense.
30 lines
1.1 KiB
Text
Vendored
30 lines
1.1 KiB
Text
Vendored
<%= discourse_color_scheme_stylesheets %>
|
|
|
|
<%= discourse_stylesheet_link_tag(:common, supports_rtl: true) %>
|
|
|
|
<%- if staff? %>
|
|
<%= discourse_stylesheet_link_tag(:admin, supports_rtl: true) %>
|
|
<%- end %>
|
|
|
|
<%- if admin? %>
|
|
<%= discourse_stylesheet_link_tag(:wizard, supports_rtl: true) %>
|
|
<%- end %>
|
|
|
|
<%- Discourse.find_plugin_css_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, mobile_view: true, desktop_view: true, include_admin: staff?, request: request, rtl: false).each do |file| %>
|
|
<%=
|
|
media = if file.end_with?("_mobile")
|
|
"(width < 40rem)"
|
|
elsif file.end_with?("_desktop")
|
|
"(width >= 40rem)"
|
|
else
|
|
nil
|
|
end
|
|
discourse_stylesheet_link_tag(file, media: media, supports_rtl: true)
|
|
%>
|
|
<%- end %>
|
|
|
|
<%- if theme_id.present? %>
|
|
<%= discourse_stylesheet_link_tag(:common_theme, supports_rtl: true) %>
|
|
<%= discourse_stylesheet_link_tag(:mobile_theme, media: "(width < 40rem)", supports_rtl: true) %>
|
|
<%= discourse_stylesheet_link_tag(:desktop_theme, media: "(width >= 40rem)", supports_rtl: true) %>
|
|
<%- end %>
|