Skip to content

A platform for community discussion. Free, open, simple.

UX: update and consolodate published page styles (#18792)

Krisa356e2fe3077
diff --git a/app/assets/stylesheets/publish.scss b/app/assets/stylesheets/publish.scss
index cdd768b7512..2055ea405b2 100644
--- a/app/assets/stylesheets/publish.scss
+++ b/app/assets/stylesheets/publish.scss
@@ -1,11 +1,18 @@
@import "common";
.published-page-content-wrapper {
+ box-sizing: border-box;
margin: 2em auto;
- max-width: 800px;
+ padding: 0.5em 10px 2em; // 10px matches .wrap
+ max-width: calc(
+ var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
+ var(--topic-avatar-width)
+ );
+ width: 100%;
}
.published-page-header {
+ box-sizing: border-box;
width: 100%;
top: 0;
z-index: z("header");
@@ -14,10 +21,15 @@
position: sticky;
top: 0;
.published-page-header-wrapper {
- width: 925px;
+ box-sizing: border-box;
+ max-width: calc(
+ var(--topic-body-width) + (var(--topic-body-width-padding) * 2) +
+ var(--topic-avatar-width)
+ );
+ width: 100%;
display: flex;
margin: 0em auto;
- padding: 0.5em 0;
+ padding: 0.5em 10px; // 10px matches .wrap padding
align-items: center;
.published-page-logo {
height: 45px;
@@ -26,9 +38,12 @@
}
.published-page-title {
color: var(--header_primary);
- font-size: 2em;
+ font-size: var(--font-up-5);
margin: 0;
- max-height: 1.25em;
+ line-height: var(--line-height-medium);
+ @include breakpoint(mobile-extra-large) {
+ font-size: var(--font-up-3);
+ }
}
}
}
@@ -62,5 +77,8 @@
.published-page-content-body {
font-size: 1.25em;
- padding-bottom: 2em;
+ img {
+ max-width: 100%;
+ height: auto;
+ }
}
diff --git a/app/assets/stylesheets/publish_desktop.scss b/app/assets/stylesheets/publish_desktop.scss
deleted file mode 100644
index d9611b081d5..00000000000
--- a/app/assets/stylesheets/publish_desktop.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "publish";
diff --git a/app/assets/stylesheets/publish_desktop_rtl.scss b/app/assets/stylesheets/publish_desktop_rtl.scss
deleted file mode 100644
index b13ca0ae62d..00000000000
--- a/app/assets/stylesheets/publish_desktop_rtl.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "publish_desktop";
diff --git a/app/assets/stylesheets/publish_mobile.scss b/app/assets/stylesheets/publish_mobile.scss
deleted file mode 100644
index cdd7d9259c8..00000000000
--- a/app/assets/stylesheets/publish_mobile.scss
+++ /dev/null
@@ -1,20 +0,0 @@
-@import "publish";
-
-.published-page-header {
- .published-page-header-wrapper {
- width: auto;
-
- .published-page-title {
- font-size: var(--font-up-3);
- width: 100%;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
-}
-
-.published-page-content-wrapper {
- margin: 2em auto;
- padding: 0 10px;
-}
diff --git a/app/assets/stylesheets/publish_mobile_rtl.scss b/app/assets/stylesheets/publish_mobile_rtl.scss
deleted file mode 100644
index 0b2e7dfe0bb..00000000000
--- a/app/assets/stylesheets/publish_mobile_rtl.scss
+++ /dev/null
@@ -1 +0,0 @@
-@import "publish_mobile";
diff --git a/app/views/common/_discourse_publish_stylesheet.html.erb b/app/views/common/_discourse_publish_stylesheet.html.erb
index ae48d98f98f..9429b0cd8dd 100644
--- a/app/views/common/_discourse_publish_stylesheet.html.erb
+++ b/app/views/common/_discourse_publish_stylesheet.html.erb
@@ -1,11 +1,5 @@
<%= discourse_stylesheet_link_tag 'publish', theme_id: nil %>
-<%- if rtl? %>
- <%= discourse_stylesheet_link_tag(mobile_view? ? :publish_mobile_rtl : :publish_mobile_rtl) %>
-<%- else %>
- <%= discourse_stylesheet_link_tag(mobile_view? ? :publish_mobile : :publish_desktop) %>
-<%- end %>
-
<%- Discourse.find_plugin_css_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, mobile_view: mobile_view?, desktop_view: !mobile_view?, request: request).each do |file| %>
<%= discourse_stylesheet_link_tag(file) %>
<%- end %>