Compare commits

..

1 Commits

Author SHA1 Message Date
Jordan Vidrine d887ad9475 UX: Adjust bulk select action placement 2025-04-24 12:16:01 -05:00
43 changed files with 2244 additions and 1961 deletions
-2
View File
@@ -1,2 +0,0 @@
< 3.5.0.beta5-dev: 31249c4f27d93e83c6b83d42d93974522a9a612e
+44 -60
View File
@@ -1,9 +1,8 @@
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
activesupport (8.0.2) activesupport (7.2.1.1)
base64 base64
benchmark (>= 0.3)
bigdecimal bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1) concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5) connection_pool (>= 2.2.5)
@@ -13,83 +12,68 @@ GEM
minitest (>= 5.1) minitest (>= 5.1)
securerandom (>= 0.3) securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5) tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1) ast (2.4.2)
ast (2.4.3) base64 (0.2.0)
base64 (0.3.0) bigdecimal (3.1.8)
benchmark (0.4.1) concurrent-ruby (1.3.4)
bigdecimal (3.2.2) connection_pool (2.4.1)
concurrent-ruby (1.3.5) drb (2.2.1)
connection_pool (2.5.3) i18n (1.14.6)
drb (2.2.3)
i18n (1.14.7)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
json (2.12.2) json (2.7.2)
language_server-protocol (3.17.0.5) language_server-protocol (3.17.0.3)
lint_roller (1.1.0) logger (1.6.1)
logger (1.7.0) minitest (5.25.1)
minitest (5.25.5) parallel (1.26.3)
parallel (1.27.0) parser (3.3.5.0)
parser (3.3.8.0)
ast (~> 2.4.1) ast (~> 2.4.1)
racc racc
prettier_print (1.2.1) prettier_print (1.2.1)
prism (1.4.0)
racc (1.8.1) racc (1.8.1)
rack (3.1.15) rack (3.1.10)
rainbow (3.1.1) rainbow (3.1.1)
regexp_parser (2.10.0) regexp_parser (2.9.2)
rubocop (1.76.0) rubocop (1.67.0)
json (~> 2.3) json (~> 2.3)
language_server-protocol (~> 3.17.0.2) language_server-protocol (>= 3.17.0)
lint_roller (~> 1.1.0)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.3.0.2) parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0) regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.45.0, < 2.0) rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0) unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.45.0) rubocop-ast (1.32.3)
parser (>= 3.3.7.2) parser (>= 3.3.1.0)
prism (~> 1.4) rubocop-capybara (2.21.0)
rubocop-capybara (2.22.1) rubocop (~> 1.41)
lint_roller (~> 1.1) rubocop-discourse (3.8.2)
rubocop (~> 1.72, >= 1.72.1)
rubocop-discourse (3.12.1)
activesupport (>= 6.1) activesupport (>= 6.1)
lint_roller (>= 1.1.0) rubocop (>= 1.59.0)
rubocop (>= 1.73.2) rubocop-capybara (>= 2.0.0)
rubocop-capybara (>= 2.22.0) rubocop-factory_bot (>= 2.0.0)
rubocop-factory_bot (>= 2.27.0) rubocop-rails (>= 2.25.0)
rubocop-rails (>= 2.30.3)
rubocop-rspec (>= 3.0.1) rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.31.0) rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.27.1) rubocop-factory_bot (2.26.1)
lint_roller (~> 1.1) rubocop (~> 1.61)
rubocop (~> 1.72, >= 1.72.1) rubocop-rails (2.26.2)
rubocop-rails (2.32.0)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
lint_roller (~> 1.1)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.75.0, < 2.0) rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.6.0) rubocop-rspec (3.1.0)
lint_roller (~> 1.1) rubocop (~> 1.61)
rubocop (~> 1.72, >= 1.72.1) rubocop-rspec_rails (2.30.0)
rubocop-rspec_rails (2.31.0) rubocop (~> 1.61)
lint_roller (~> 1.1) rubocop-rspec (~> 3, >= 3.0.1)
rubocop (~> 1.72, >= 1.72.1)
rubocop-rspec (~> 3.5)
ruby-progressbar (1.13.0) ruby-progressbar (1.13.0)
securerandom (0.4.1) securerandom (0.3.1)
syntax_tree (6.2.0) syntax_tree (6.2.0)
prettier_print (>= 1.2.0) prettier_print (>= 1.2.0)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
unicode-display_width (3.1.4) unicode-display_width (2.6.0)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
PLATFORMS PLATFORMS
ruby ruby
@@ -99,4 +83,4 @@ DEPENDENCIES
syntax_tree syntax_tree
BUNDLED WITH BUNDLED WITH
2.6.9 2.5.21
+1 -2
View File
@@ -130,6 +130,5 @@
"header_primary": "ffffff", "header_primary": "ffffff",
"hover": "584B3E" "hover": "584B3E"
} }
}, }
"screenshots": ["screenshots/light.png", "screenshots/dark.png"]
} }
+5 -3
View File
@@ -1,7 +1,6 @@
html { html {
--accent-color: #{$tertiary} !important; --accent-color: #{$tertiary} !important;
--accent-text-color: #fff; --accent-text-color: #ffffff;
// Background Colors // Background Colors
--background-color: light-dark( --background-color: light-dark(
oklch(from #{$tertiary} 96% calc(c * 0.125) h), oklch(from #{$tertiary} 96% calc(c * 0.125) h),
@@ -11,7 +10,6 @@ html {
oklch(from #{$secondary} calc(2 * l) c h), oklch(from #{$secondary} calc(2 * l) c h),
oklch(from #{$secondary} l c h) oklch(from #{$secondary} l c h)
) !important; ) !important;
// HeaderColors // HeaderColors
--header_primary-low-mid: light-dark( --header_primary-low-mid: light-dark(
oklch(from #{$tertiary} 73.5% calc(c * 0.5) h), oklch(from #{$tertiary} 73.5% calc(c * 0.5) h),
@@ -42,14 +40,17 @@ html {
oklch(from #{$tertiary} 92% calc(c * 0.5) h), oklch(from #{$tertiary} 92% calc(c * 0.5) h),
oklch(from #{$tertiary} calc(l * 0.7) calc(c * 0.25) h) oklch(from #{$tertiary} calc(l * 0.7) calc(c * 0.25) h)
) !important; ) !important;
--d-nav-color--active: light-dark( --d-nav-color--active: light-dark(
oklch(from #{$tertiary} l c h), oklch(from #{$tertiary} l c h),
oklch(from #{$tertiary} calc(l * 1.2) c h) oklch(from #{$tertiary} calc(l * 1.2) c h)
) !important; ) !important;
--d-nav-color--hover: light-dark( --d-nav-color--hover: light-dark(
oklch(from #{$tertiary} l c h), oklch(from #{$tertiary} l c h),
oklch(from #{$tertiary} calc(l * 1.2) c h) oklch(from #{$tertiary} calc(l * 1.2) c h)
) !important; ) !important;
--link-color: light-dark( --link-color: light-dark(
oklch(from #{$tertiary} l c h), oklch(from #{$tertiary} l c h),
oklch(from #{$tertiary} calc(l * 0.95) c h) oklch(from #{$tertiary} calc(l * 0.95) c h)
@@ -77,6 +78,7 @@ html {
oklch(from #{$tertiary} calc(l * 1.5) calc(c * 0.35) h), oklch(from #{$tertiary} calc(l * 1.5) calc(c * 0.35) h),
oklch(from #{$tertiary} calc(l * 0.75) calc(c * 0.5) h) oklch(from #{$tertiary} calc(l * 0.75) calc(c * 0.5) h)
) !important; ) !important;
--d-sidebar-highlight-hover-icon: var(--d-sidebar-link-color) !important; --d-sidebar-highlight-hover-icon: var(--d-sidebar-link-color) !important;
--d-sidebar-highlight-hover-background: var(--d-selected) !important; --d-sidebar-highlight-hover-background: var(--d-selected) !important;
--d-sidebar-link-icon-color: var(--d-sidebar-link-color) !important; --d-sidebar-link-icon-color: var(--d-sidebar-link-color) !important;
+1 -2
View File
@@ -1,7 +1,6 @@
<script> <script>
if(!CSS.supports("(color: hsl(from white h s l))")){ if(!CSS.supports("(color: hsl(from white h s l))")){
window.unsupportedBrowser = true; window.unsupportedBrowser = true;
window.I18n.translations[I18n.locale].js.browser_update = window.I18n.translations[I18n.locale].js.browser_update = 'The Horizon theme does not support your browser. Please update your browser, or <a href="?safe_mode=no_themes">switch to safe mode</a>.';
'The Horizon theme does not support your browser. Please update your browser, or <a href="?safe_mode=no_themes">switch to safe mode</a>.';
} }
</script> </script>
@@ -1,10 +0,0 @@
import { apiInitializer } from "discourse/lib/api";
export default apiInitializer("0.8", (api) => {
api.registerValueTransformer(
"hamburger-dropdown-click-outside-exceptions",
({ value }) => {
return [...value, ".topic-drafts-menu-content"];
}
);
});
@@ -1,7 +1,9 @@
import Component from "@glimmer/component"; import Component from "@glimmer/component";
import avatar from "discourse/helpers/avatar";
import concatClass from "discourse/helpers/concat-class"; import concatClass from "discourse/helpers/concat-class";
import icon from "discourse/helpers/d-icon"; import icon from "discourse/helpers/d-icon";
import formatDate from "discourse/helpers/format-date"; import formatDate from "discourse/helpers/format-date";
import { i18n } from "discourse-i18n";
export default class TopicActivityColumn extends Component { export default class TopicActivityColumn extends Component {
get topicUser() { get topicUser() {
@@ -25,34 +27,37 @@ export default class TopicActivityColumn extends Component {
}; };
} else if (this.args.topic.posts_count === 1) { } else if (this.args.topic.posts_count === 1) {
return { return {
user: this.args.topic.firstPosterUser, user: this.args.topic.creator,
username: this.args.topic.last_poster_username, username: this.args.topic.creator.username,
class: "--created", activityText: "user_posted",
class: "--posted",
}; };
} else {
return;
} }
} }
<template> <template>
<span class={{concatClass "topic-activity" this.topicUser.class}}> <span class={{concatClass "topic-activity" this.topicUser.class}}>
<div class="topic-activity__type"> <div class="topic-activity__user">
{{#if this.topicUser.user}} {{#if this.topicUser.user}}
{{icon "reply"}} {{avatar this.topicUser.user imageSize="small"}}
{{else}} {{else}}
{{icon "pencil"}} {{icon "pencil"}}
{{/if}} {{/if}}
</div> </div>
{{#if this.topicUser.username}} {{#if this.topicUser.username}}
<span <span
class="topic-activity__username" class="topic-activity__username"
>{{this.topicUser.username}}</span> >{{this.topicUser.username}}</span>
<span class="dot-separator"></span>
{{/if}} {{/if}}
<div class="topic-activity__reason">
{{i18n (themePrefix this.topicUser.activityText)}}
</div>
<div class="topic-activity__time"> <div class="topic-activity__time">
{{formatDate @topic.bumpedAt leaveAgo="true" format="tiny"}} {{formatDate
@topic.bumpedAt
leaveAgo="true"
format="medium-with-ago-and-on"
}}
</div> </div>
</span> </span>
</template> </template>
@@ -1,19 +0,0 @@
import Component from "@glimmer/component";
import avatar from "discourse/helpers/avatar";
export default class TopicCreatorColumn extends Component {
get topicCreator() {
return {
user: this.args.topic.creator,
username: this.args.topic.creator.username,
class: "--topic-creator",
};
}
<template>
<div class={{this.topicUser.class}}>
{{avatar this.topicCreator.user}}
<span class="topic-creator__username">{{this.topicUser.username}}</span>
</div>
</template>
}
@@ -1,5 +1,5 @@
import { gt } from "truth-helpers";
import icon from "discourse/helpers/d-icon"; import icon from "discourse/helpers/d-icon";
import gt from "truth-helpers/helpers/gt";
const TopicRepliesColumn = <template> const TopicRepliesColumn = <template>
{{#if (gt @topic.replyCount 1)}} {{#if (gt @topic.replyCount 1)}}
@@ -10,7 +10,6 @@ const DO_NOT_RENDER_LIST = ["login"];
export default class ExperimentalScreen extends Component { export default class ExperimentalScreen extends Component {
@service router; @service router;
@tracked left = 0; @tracked left = 0;
@tracked right = 0; @tracked right = 0;
resizeObserver; resizeObserver;
@@ -3,18 +3,16 @@ import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object"; import { action } from "@ember/object";
import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import didUpdate from "@ember/render-modifiers/modifiers/did-update"; import didUpdate from "@ember/render-modifiers/modifiers/did-update";
import willDestroy from "@ember/render-modifiers/modifiers/will-destroy";
import { service } from "@ember/service"; import { service } from "@ember/service";
import { gt, not } from "truth-helpers"; import { gt } from "truth-helpers";
import CreateTopicButton from "discourse/components/create-topic-button"; import CreateTopicButton from "discourse/components/create-topic-button";
import not from "truth-helpers/helpers/not";
export default class SidebarNewTopicButton extends Component { export default class SidebarNewTopicButton extends Component {
@service composer; @service composer;
@service currentUser; @service currentUser;
@service siteSettings; @service siteSettings;
@service router; @service router;
@service header;
@service appEvents;
@tracked category; @tracked category;
@tracked tag; @tracked tag;
@@ -76,30 +74,12 @@ export default class SidebarNewTopicButton extends Component {
this.tag = this.router.currentRoute.attributes?.tag || null; this.tag = this.router.currentRoute.attributes?.tag || null;
} }
@action
watchForComposer() {
// this covers opening drafts from the hamburger menu
this.appEvents.on("composer:will-open", this, this.closeHamburger);
}
@action
stopWatchingForComposer() {
this.appEvents.off("composer:will-open", this, this.closeHamburger);
}
@action
closeHamburger() {
this.header.hamburgerVisible = false;
}
<template> <template>
{{#if this.shouldRender}} {{#if this.shouldRender}}
<div <div
class="sidebar-new-topic-button__wrapper" class="sidebar-new-topic-button__wrapper"
{{didInsert this.getCategoryandTag}} {{didInsert this.getCategoryandTag}}
{{didUpdate this.getCategoryandTag this.router.currentRoute}} {{didUpdate this.getCategoryandTag this.router.currentRoute}}
{{didInsert this.watchForComposer}}
{{willDestroy this.stopWatchingForComposer}}
> >
<CreateTopicButton <CreateTopicButton
@canCreateTopic={{this.canCreateTopic}} @canCreateTopic={{this.canCreateTopic}}
@@ -31,14 +31,13 @@ export default class UserColorPaletteSelector extends Component {
@service site; @service site;
@service session; @service session;
@service interfaceColor; @service interfaceColor;
@tracked anonColorPaletteId = this.#loadAnonColorPalette(); @tracked anonColorPaletteId = this.#loadAnonColorPalette();
@tracked userColorPaletteId = this.session.userColorSchemeId; @tracked userColorPaletteId = this.session.userColorSchemeId;
@tracked cssLoaded = true; @tracked cssLoaded = true;
get userColorPalettes() { get userColorPalettes() {
const availablePalettes = listColorSchemes(this.site) const availablePalettes = listColorSchemes(this.site)
?.map((userPalette) => { .map((userPalette) => {
return { return {
...userPalette, ...userPalette,
accent: `#${ accent: `#${
@@ -56,7 +55,7 @@ export default class UserColorPaletteSelector extends Component {
// Match the light scheme with the corresponding dark id based in the name // Match the light scheme with the corresponding dark id based in the name
return ( return (
availablePalettes availablePalettes
?.map((palette) => { .map((palette) => {
if (palette.is_dark) { if (palette.is_dark) {
return palette; return palette;
} }
@@ -1,7 +1,6 @@
import { withPluginApi } from "discourse/lib/plugin-api"; import { withPluginApi } from "discourse/lib/plugin-api";
import TopicActivityColumn from "../components/card/topic-activity-column"; import TopicActivityColumn from "../components/card/topic-activity-column";
import TopicCategoryColumn from "../components/card/topic-category-column"; import TopicCategoryColumn from "../components/card/topic-category-column";
import TopicCreatorColumn from "../components/card/topic-creator-column";
import TopicLikesColumn from "../components/card/topic-likes-column"; import TopicLikesColumn from "../components/card/topic-likes-column";
import TopicRepliesColumn from "../components/card/topic-replies-column"; import TopicRepliesColumn from "../components/card/topic-replies-column";
import TopicStatusColumn from "../components/card/topic-status-column"; import TopicStatusColumn from "../components/card/topic-status-column";
@@ -31,12 +30,6 @@ const TopicLikesReplies = <template>
</td> </td>
</template>; </template>;
const TopicCreator = <template>
<td class="topic-creator-data">
<TopicCreatorColumn @topic={{@topic}} />
</td>
</template>;
export default { export default {
name: "topic-list-customizations", name: "topic-list-customizations",
@@ -59,10 +52,6 @@ export default {
item: TopicLikesReplies, item: TopicLikesReplies,
after: "topic-author-avatar", after: "topic-author-avatar",
}); });
columns.add("topic-creator", {
item: TopicCreator,
after: "topic-author-avatar",
});
columns.delete("views"); columns.delete("views");
columns.delete("replies"); columns.delete("replies");
if (!router.currentRouteName.includes("userPrivateMessages")) { if (!router.currentRouteName.includes("userPrivateMessages")) {
@@ -94,34 +83,6 @@ export default {
api.registerValueTransformer("topic-list-item-mobile-layout", () => { api.registerValueTransformer("topic-list-item-mobile-layout", () => {
return false; return false;
}); });
api.registerBehaviorTransformer(
"topic-list-item-click",
({ context: { event }, next }) => {
if (event.target.closest("a, button, input")) {
return next();
}
event.preventDefault();
event.stopPropagation();
const topicLink = event.target
.closest("tr")
.querySelector("a.raw-topic-link");
// Redespatch the click on the topic link, so that all key-handing is sorted
topicLink.dispatchEvent(
new MouseEvent("click", {
ctrlKey: event.ctrlKey,
metaKey: event.metaKey,
shiftKey: event.shiftKey,
button: event.button,
bubbles: true,
cancelable: true,
})
);
}
);
}); });
}, },
}; };
+1
View File
@@ -6,3 +6,4 @@ en:
user_replied: "replied" user_replied: "replied"
user_posted: "posted" user_posted: "posted"
user_updated: "updated" user_updated: "updated"
+5 -6
View File
@@ -1,14 +1,13 @@
{ {
"private": true, "private": true,
"devDependencies": { "devDependencies": {
"@discourse/lint-configs": "2.25.0", "@discourse/lint-configs": "2.4.0",
"ember-template-lint": "7.8.1", "ember-template-lint": "6.1.0",
"eslint": "9.28.0", "eslint": "9.19.0",
"prettier": "3.5.3", "prettier": "2.8.8"
"stylelint": "16.20.0"
}, },
"engines": { "engines": {
"node": ">= 22", "node": ">= 18",
"npm": "please-use-pnpm", "npm": "please-use-pnpm",
"yarn": "please-use-pnpm", "yarn": "please-use-pnpm",
"pnpm": "9.x" "pnpm": "9.x"
+1766 -1085
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

View File
+21 -62
View File
@@ -1,6 +1,4 @@
@use "lib/viewport"; @media screen and (min-width: 1300px) {
@media screen and (width >= 1300px) {
#main-outlet { #main-outlet {
border-top-right-radius: var(--d-border-radius-large); border-top-right-radius: var(--d-border-radius-large);
border-top-left-radius: var(--d-border-radius-large); border-top-left-radius: var(--d-border-radius-large);
@@ -21,46 +19,40 @@
.has-full-page-chat .chat-replying-indicator-container { .has-full-page-chat .chat-replying-indicator-container {
margin-bottom: var(--main-grid-gap); margin-bottom: var(--main-grid-gap);
@include breakpoint(medium) {
@include viewport.until(lg) {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.has-full-page-chat .chat-selection-management { .has-full-page-chat .chat-selection-management {
margin-bottom: var(--main-grid-gap); margin-bottom: var(--main-grid-gap);
@include breakpoint(medium) {
@include viewport.until(lg) {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.experimental-screen { .experimental-screen {
@include breakpoint(medium) {
display: none;
}
max-width: unset !important; max-width: unset !important;
width: 100%; width: 100%;
display: block; display: block;
margin: 0; margin: 0;
padding: 0; padding: 0;
position: relative; position: relative;
container: content-width / inline-size;
@include viewport.until(lg) { @media screen and (max-width: 488px) {
display: none; display: none;
} }
@include breakpoint(tablet) {
@media screen and (width <= 488px) {
display: none; display: none;
} }
@include viewport.until(md) {
display: none;
}
li { li {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
&__top-left, &__top-left,
&__top-right, &__top-right,
&__bottom-left, &__bottom-left,
@@ -76,39 +68,38 @@
transparent var(--d-border-radius-large), transparent var(--d-border-radius-large),
black var(--d-border-radius-large) black var(--d-border-radius-large)
); );
-webkit-mask: radial-gradient(
circle at var(--d-border-radius-large) var(--d-border-radius-large),
transparent var(--d-border-radius-large),
transparent var(--d-border-radius-large),
black var(--d-border-radius-large)
);
} }
&__top-left { &__top-left {
top: var(--header-offset); top: var(--header-offset);
left: var(--left-distance); left: var(--left-distance);
} }
&__top-right { &__top-right {
top: var(--header-offset); top: var(--header-offset);
transform: rotate(90deg); transform: rotate(90deg);
left: calc(var(--right-distance) - var(--d-border-radius-large)); left: calc(var(--right-distance) - var(--d-border-radius-large));
} }
&__bottom-left { &__bottom-left {
transform: rotate(-90deg); transform: rotate(-90deg);
bottom: var(--main-grid-gap); bottom: var(--main-grid-gap);
left: var(--left-distance); left: var(--left-distance);
@media screen and (max-width: 768px) {
@media screen and (width <= 768px) {
bottom: calc(var(--d-border-radius-large) * 2); bottom: calc(var(--d-border-radius-large) * 2);
} }
} }
&__bottom-right { &__bottom-right {
transform: rotate(180deg); transform: rotate(180deg);
bottom: var(--main-grid-gap); bottom: var(--main-grid-gap);
left: calc(var(--right-distance) - var(--d-border-radius-large)); left: calc(var(--right-distance) - var(--d-border-radius-large));
@media screen and (max-width: 768px) {
@media screen and (width <= 768px) {
bottom: calc(var(--d-border-radius-large) * 2); bottom: calc(var(--d-border-radius-large) * 2);
} }
} }
&__bottom-bar { &__bottom-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
@@ -117,48 +108,16 @@
bottom: 0; bottom: 0;
left: var(--left-distance); left: var(--left-distance);
height: var(--main-grid-gap); height: var(--main-grid-gap);
@media screen and (max-width: 768px) {
@media screen and (width <= 768px) {
height: calc(var(--d-border-radius-large) * 2); height: calc(var(--d-border-radius-large) * 2);
} }
@container content-width (width > 1px) { @container content-width (width > 1px) {
width: 100cqw; width: 100cqw;
} }
} }
} }
.rtl .experimental-screen { @media screen and (min-width: 768px) {
&__top-left {
right: var(--left-distance);
left: unset;
}
&__top-right {
transform: rotate(-90deg) !important;
right: calc(var(--right-distance) - var(--d-border-radius-large));
left: unset;
}
&__bottom-left {
transform: rotate(90deg);
right: var(--left-distance);
left: unset;
}
&__bottom-right {
transform: rotate(180deg);
left: unset;
right: calc(var(--right-distance) - var(--d-border-radius-large));
}
&__bottom-bar {
right: var(--left-distance);
left: unset;
}
}
@media screen and (width >= 768px) {
.with-topic-progress { .with-topic-progress {
bottom: calc( bottom: calc(
env(safe-area-inset-bottom) + var(--composer-height, 0px) + env(safe-area-inset-bottom) + var(--composer-height, 0px) +
@@ -167,7 +126,7 @@
} }
} }
@media screen and (width <= 768px) { @media screen and (max-width: 768px) {
.with-topic-progress { .with-topic-progress {
bottom: calc( bottom: calc(
env(safe-area-inset-bottom) + var(--composer-height, 0px) + env(safe-area-inset-bottom) + var(--composer-height, 0px) +
@@ -176,7 +135,7 @@
} }
} }
@media screen and (width <= 400px) { @media screen and (max-width: 400px) {
.with-topic-progress { .with-topic-progress {
bottom: calc(env(safe-area-inset-bottom) + var(--composer-height, 0px)); bottom: calc(env(safe-area-inset-bottom) + var(--composer-height, 0px));
} }
+5 -19
View File
@@ -8,13 +8,11 @@
.sidebar-new-topic-button__wrapper .topic-drafts-menu-trigger.btn.no-text { .sidebar-new-topic-button__wrapper .topic-drafts-menu-trigger.btn.no-text {
background: var(--accent-color); background: var(--accent-color);
&:hover, &:hover,
&:focus-visible { &:focus-visible {
background: oklch(from var(--accent-color) 40% c h) !important; background: oklch(from var(--accent-color) 40% c h) !important;
box-shadow: none; box-shadow: none;
} }
.d-icon { .d-icon {
color: var(--accent-text-color); color: var(--accent-text-color);
} }
@@ -28,37 +26,31 @@
.discourse-no-touch .btn-default, .discourse-no-touch .btn-default,
.discourse-no-touch .select-kit .select-kit-header.btn-default { .discourse-no-touch .select-kit .select-kit-header.btn-default {
background: var(--primary-100); background: var(--primary-100);
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
} }
&:hover { &:hover {
border-color: transparent; border-color: transparent;
box-shadow: 0 0 8px 1px var(--button-box-shadow); box-shadow: 0px 0px 8px 1px var(--button-box-shadow);
background: var(--d-content-background); background: var(--d-content-background);
color: var(--accent-color); color: var(--accent-color);
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
} }
} }
&:focus-visible { &:focus-visible {
background: var(--d-content-background); background: var(--d-content-background);
color: var(--accent-color); color: var(--accent-color);
box-shadow: 0 0 0 3px var(--button-box-shadow); box-shadow: 0px 0px 0px 3px var(--button-box-shadow);
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
} }
} }
&:active:not(:hover, :focus) { &:active:not(:hover, :focus) {
color: var(--primary); color: var(--primary);
background: var(--tertiary-300); background: var(--tertiary-300);
background-image: none; background-image: none;
.d-icon { .d-icon {
color: var(--tertiary-high); color: var(--tertiary-high);
} }
@@ -66,41 +58,35 @@
} }
.btn-primary, .btn-primary,
#create-topic.btn, #create-topic.btn {
.discourse-no-touch .btn-default.ai-new-question-button {
background-color: var(--accent-color); background-color: var(--accent-color);
color: var(--accent-text-color); color: var(--accent-text-color);
.d-icon { .d-icon {
color: var(--accent-text-color); color: var(--accent-text-color);
} }
&:hover { &:hover {
.discourse-no-touch & { .discourse-no-touch & {
background: light-dark( background: light-dark(
oklch(from var(--accent-color) 40% c h), oklch(from var(--accent-color) 40% c h),
oklch(from var(--accent-color) 50% c h) oklch(from var(--accent-color) 50% c h)
); );
box-shadow: 0 0 6px 1px var(--button-box-shadow); box-shadow: 0px 0px 6px 1px var(--button-box-shadow);
color: var(--accent-text-color); color: var(--accent-text-color);
.d-icon { .d-icon {
color: var(--accent-text-color); color: var(--accent-text-color);
} }
} }
} }
&:focus-visible { &:focus-visible {
.discourse-no-touch & { .discourse-no-touch & {
background: light-dark( background: light-dark(
oklch(from var(--accent-color) 40% c h), oklch(from var(--accent-color) 40% c h),
oklch(from var(--accent-color) 50% c h) oklch(from var(--accent-color) 50% c h)
); );
box-shadow: 0 0 0 4px var(--button-box-shadow); box-shadow: 0px 0px 0px 4px var(--button-box-shadow);
color: var(--accent-text-color); color: var(--accent-text-color);
} }
} }
&:active { &:active {
background: light-dark( background: light-dark(
oklch(from var(--accent-color) 40% c h), oklch(from var(--accent-color) 40% c h),
+2 -34
View File
@@ -1,13 +1,9 @@
@use "lib/viewport";
.full-page-chat.full-page-chat-sidebar-enabled { .full-page-chat.full-page-chat-sidebar-enabled {
border: none; border: none;
} }
.c-navbar-container { .c-navbar-container {
.full-page-chat & {
padding: 0 1.5em; padding: 0 1.5em;
}
background-color: var(--d-content-background); background-color: var(--d-content-background);
} }
@@ -17,43 +13,21 @@ body.has-full-page-chat {
.chat-drawer-container { .chat-drawer-container {
.is-expanded & { .is-expanded & {
box-shadow: 0 0 0 2px var(--tertiary-medium); box-shadow: 0px 0px 0px 2px var(--tertiary-medium);
} }
.chat-drawer.is-expanded & { .chat-drawer.is-expanded & {
border: none; border: none;
} }
.c-navbar__title {
padding-left: 0.33em; // visual alignment for chat index, which does not havea a backarrow
}
} }
.chat-drawer-outlet-container { .chat-drawer-outlet-container {
z-index: z("composer", "content"); z-index: z("composer", "content");
.peek-mode-active & {
padding-bottom: 0;
left: unset;
right: var(--main-grid-gap);
&:has(.is-expanded) {
z-index: calc(z("composer", "dropdown") + 1);
}
}
}
.chat-drawer {
.peek-mode-active & {
max-width: 90vw;
}
} }
.chat-drawer .channels-list-container .chat-channel-row { .chat-drawer .channels-list-container .chat-channel-row {
margin-bottom: var(--spacing-block-xs); margin-bottom: var(--spacing-block-xs);
font-size: var(--font-up-1); font-size: var(--font-up-1);
border-bottom: none; border-bottom: none;
&:hover { &:hover {
background-color: var(--d-sidebar-active-background); background-color: var(--d-sidebar-active-background);
} }
@@ -78,11 +52,5 @@ body.has-full-page-chat {
} }
.chat-drawer-active.chat-drawer-expanded .chat-composer-dropdown__menu-content { .chat-drawer-active.chat-drawer-expanded .chat-composer-dropdown__menu-content {
z-index: z("modal", "dialog"); z-index: z("composer", "content") + 1;
}
.chat-replying-indicator-container {
@include viewport.from(sm) {
margin-left: calc(0.65em + 0.2rem);
}
} }
-4
View File
@@ -4,21 +4,17 @@
width: 100%; width: 100%;
justify-content: flex-start; justify-content: flex-start;
} }
&__item .btn-icon-text.btn-flat:hover { &__item .btn-icon-text.btn-flat:hover {
background-color: var(--d-selected); background-color: var(--d-selected);
box-shadow: none; box-shadow: none;
color: var(--primary); color: var(--primary);
} }
&__item .btn-icon-text.btn-flat:hover svg { &__item .btn-icon-text.btn-flat:hover svg {
color: var(--icon-color); color: var(--icon-color);
} }
&__item .btn-icon-text.btn-flat svg { &__item .btn-icon-text.btn-flat svg {
color: var(--icon-color); color: var(--icon-color);
} }
&__item-choice.active.btn-icon-text.btn-flat { &__item-choice.active.btn-icon-text.btn-flat {
background-color: var(--d-selected); background-color: var(--d-selected);
} }
+1 -1
View File
@@ -6,7 +6,7 @@
--d-sidebar-header-icon-color: var(--d-sidebar-link-color); --d-sidebar-header-icon-color: var(--d-sidebar-link-color);
--d-sidebar-active-suffix-color: var(--d-sidebar-suffix-color); --d-sidebar-active-suffix-color: var(--d-sidebar-suffix-color);
--d-sidebar-background: var(--background-color); --d-sidebar-background: var(--background-color);
--d-sidebar-footer-fade: rgb(var(--tertiary-50-rgb), 1); --d-sidebar-footer-fade: rgba(var(--tertiary-50-rgb), 1);
--d-sidebar-prefix-background: var(--d-selected); --d-sidebar-prefix-background: var(--d-selected);
--d-sidebar-active-prefix-background: light-dark( --d-sidebar-active-prefix-background: light-dark(
oklch(from var(--d-selected) calc(l * 0.85) c h), oklch(from var(--d-selected) calc(l * 0.85) c h),
+1 -2
View File
@@ -2,7 +2,7 @@
display: none; display: none;
} }
@media screen and (width >= 1300px) { @media screen and (min-width: 1300px) {
html:not(.fullscreen-composer) { html:not(.fullscreen-composer) {
.peek-mode-toggle svg { .peek-mode-toggle svg {
transform: scaleX(-1); transform: scaleX(-1);
@@ -18,7 +18,6 @@
transition: none; transition: none;
box-shadow: none; box-shadow: none;
border-radius: var(--d-border-radius-large); border-radius: var(--d-border-radius-large);
.grippie { .grippie {
display: none; display: none;
} }
+2 -33
View File
@@ -1,11 +1,8 @@
@use "lib/viewport";
#reply-control #reply-control
.select-kit.dropdown-select-box.composer-actions .select-kit.dropdown-select-box.composer-actions
.select-kit-header { .select-kit-header {
border: 1px solid var(--tertiary-700); border: 1px solid var(--tertiary-700);
background: var(--secondary); background: var(--secondary);
&:hover { &:hover {
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
@@ -14,15 +11,14 @@
} }
#reply-control.hide-preview:not(.draft) { #reply-control.hide-preview:not(.draft) {
@include viewport.from(sm) { @include breakpoint("mobile-extra-large", $rule: min-width) {
background: var(--d-content-background); background: var(--d-content-background);
border-top-right-radius: var(--d-border-radius); border-top-right-radius: var(--d-border-radius);
border-top-left-radius: var(--d-border-radius); border-top-left-radius: var(--d-border-radius);
.grippie { .grippie {
background: var(--tertiary-low); background: var(--tertiary-low);
border-top-right-radius: var(--d-border-radius);
border-top-left-radius: var(--d-border-radius);
} }
.user-selector, .user-selector,
@@ -47,7 +43,6 @@
.reply-area { .reply-area {
padding-inline: 0; padding-inline: 0;
} }
.reply-to, .reply-to,
.submit-panel { .submit-panel {
padding-inline: var(--spacing-inline-sm); padding-inline: var(--spacing-inline-sm);
@@ -64,7 +59,6 @@
} }
} }
} }
.d-editor-button-bar { .d-editor-button-bar {
.btn:hover, .btn:hover,
.toolbar-popup-menu-options.is-expanded { .toolbar-popup-menu-options.is-expanded {
@@ -81,7 +75,6 @@
.d-icon { .d-icon {
color: var(--primary-high); color: var(--primary-high);
} }
&:hover { &:hover {
.d-icon { .d-icon {
color: var(--primary); color: var(--primary);
@@ -95,27 +88,3 @@
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
} }
} }
.discourse-no-touch .translation-selector-dropdown {
.select-kit-header.btn-default {
background: var(--background-color);
}
}
#reply-control.composer-action-add_translation {
.d-editor-preview .d-editor-translation-preview-wrapper {
border-color: var(--d-sidebar-border-color);
}
.d-editor-preview .d-editor-translation-preview-wrapper__header {
top: 6.5rem;
padding: 0.25rem 0.75rem;
background: var(--background-color);
color: var(--accent-color);
border-radius: var(--d-border-radius-large);
}
.topic-title-translator input {
width: 47.25vw;
}
}
+11 -32
View File
@@ -1,5 +1,3 @@
@use "lib/viewport";
// Full width layout. Ported from the Discourse Full Width theme component here // Full width layout. Ported from the Discourse Full Width theme component here
// https://meta.discourse.org/t/discourse-full-width-component/292496, which we // https://meta.discourse.org/t/discourse-full-width-component/292496, which we
// intend to move into core over time. // intend to move into core over time.
@@ -15,31 +13,12 @@ $sidebar-width: 17em;
} }
.d-header #site-logo { .d-header #site-logo {
// constraining the logo to fit its grid container
// this prevents the logo from shifting header content // this prevents the logo from shifting header content
// when the sidebar is opened // when the sidebar is opened
max-height: 100%; max-height: 100%;
max-width: 100%; max-width: 100%;
object-fit: contain; // contains logo without squishing/stretching object-fit: contain; // contains logo without squishing/stretching
// allows some flexibility for wide logos
body:not(.has-sidebar-page) & {
max-width: unset;
@include viewport.until(sm) {
max-width: 25vw;
}
}
}
.d-header #site-text-logo {
font-size: clamp(var(--font-0), 2.5vw, var(--font-up-2));
.has-sidebar-page & {
white-space: wrap;
line-height: var(--line-height-medium);
@include line-clamp(2);
}
} }
#main-outlet-wrapper { #main-outlet-wrapper {
@@ -105,7 +84,7 @@ $sidebar-width: 17em;
grid-area: extra-info; grid-area: extra-info;
white-space: nowrap; white-space: nowrap;
@include viewport.until(md) { @include breakpoint("tablet") {
display: none; display: none;
} }
} }
@@ -129,7 +108,7 @@ $sidebar-width: 17em;
// at narrower widths, when 1fr = 0 // at narrower widths, when 1fr = 0
// we can center without matching the sidebar's width // we can center without matching the sidebar's width
// which allows the title to take up the remaining width // which allows the title to take up the remaining width
@media screen and (width <= 1400px) { @media screen and (max-width: 1400px) {
grid-template-columns: grid-template-columns:
calc(var(--d-sidebar-width) - 11px) calc(var(--d-sidebar-width) - 11px)
1fr 1fr
@@ -138,7 +117,7 @@ $sidebar-width: 17em;
auto; auto;
} }
@media screen and (width <= 1000px) { @media screen and (max-width: 1000px) {
gap: 0.5em; gap: 0.5em;
} }
@@ -159,7 +138,7 @@ $sidebar-width: 17em;
.d-header-mode { .d-header-mode {
.bootstrap-mode { .bootstrap-mode {
display: none; margin: 0;
} }
} }
@@ -171,7 +150,7 @@ $sidebar-width: 17em;
overflow: visible; overflow: visible;
.title { .title {
flex: 1 1 auto; flex: 1 0 auto;
} }
} }
@@ -191,11 +170,11 @@ $sidebar-width: 17em;
.header-search--enabled .floating-search-input-wrapper { .header-search--enabled .floating-search-input-wrapper {
grid-area: extra-info; grid-area: extra-info;
@include viewport.until(md) { @include breakpoint(tablet) {
grid-area: rspace; grid-area: rspace;
} }
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
display: none; display: none;
} }
} }
@@ -210,7 +189,7 @@ body.has-sidebar-page {
padding: 0; padding: 0;
} }
@media screen and (width >= calc($reply-area-max-width + ($sidebar-width * 2))) { @media screen and (min-width: calc($reply-area-max-width + ($sidebar-width * 2))) {
#reply-control.show-preview { #reply-control.show-preview {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -221,7 +200,7 @@ body.has-sidebar-page {
} }
} }
@media screen and (width <= calc($reply-area-max-width + ($sidebar-width * 2))) and (width >= calc($reply-area-max-width + calc($sidebar-width / 2))) { @media screen and (max-width: calc($reply-area-max-width + ($sidebar-width * 2))) and (min-width: calc($reply-area-max-width + calc($sidebar-width / 2))) {
#reply-control.show-preview:not(.fullscreen) { #reply-control.show-preview:not(.fullscreen) {
margin-left: $sidebar-width; margin-left: $sidebar-width;
width: auto; width: auto;
@@ -267,7 +246,7 @@ body.sidebar-animate {
} }
// provides some extra space for login buttons // provides some extra space for login buttons
@media screen and (width >= 1400px) { @media screen and (min-width: 1400px) {
.anon { .anon {
.d-header .panel { .d-header .panel {
grid-column-start: -4; grid-column-start: -4;
+13 -13
View File
@@ -1,10 +1,10 @@
// Fixing bulk select (only needed for desktop) // Fixing bulk select (only needed for desktop)
.bulk-select-enabled {
.topic-list-header {
position: relative;
top: 0;
}
.bulk-select-enabled {
.topic-list-header .topic-list-data.default {
position: sticky;
top: 10em;
}
.topic-author-avatar-data { .topic-author-avatar-data {
display: none; display: none;
} }
@@ -13,9 +13,8 @@
grid-area: bulk-select; grid-area: bulk-select;
margin-left: -0.5em; margin-left: -0.5em;
@media screen and (width <= 576px) { @media screen and (max-width: 576px) {
margin-top: 0; margin-top: 0;
label { label {
padding-block: 0.345em; padding-block: 0.345em;
} }
@@ -40,6 +39,8 @@
} }
&.default { &.default {
position: absolute;
right: 0;
.bulk-select, .bulk-select,
span:not(.bulk-select-topics, .d-button-label) { span:not(.bulk-select-topics, .d-button-label) {
display: none; display: none;
@@ -47,19 +48,18 @@
} }
} }
// bulk select
.bulk-select-topics { .bulk-select-topics {
position: absolute; position: absolute;
right: 0; right: 0;
bottom: 0;
background: var(--secondary); background: var(--secondary);
border-radius: 0 0 0 var(--d-border-radius); border-radius: 0 0 0 var(--d-border-radius);
display: flex; padding: 1em;
gap: 0.5rem; @media screen and (max-width: 1048px) {
margin: 0.5rem; right: 0;
}
button { button {
white-space: nowrap; white-space: nowrap;
margin: 0;
} }
} }
} }
+5 -6
View File
@@ -1,10 +1,7 @@
@use "lib/viewport";
.d-header { .d-header {
box-shadow: none; box-shadow: none;
background: var(--background-color); background: var(--background-color);
@include breakpoint(extra-large, $rule: min-width) {
@include viewport.from(xl) {
padding-bottom: var(--main-grid-gap); padding-bottom: var(--main-grid-gap);
} }
} }
@@ -51,10 +48,8 @@
.discourse-no-touch .interface-color-selector-content { .discourse-no-touch .interface-color-selector-content {
border: none; border: none;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
.btn { .btn {
border: none; border: none;
&:hover { &:hover {
box-shadow: none; box-shadow: none;
} }
@@ -64,6 +59,10 @@
.drop-down-mode .d-header-icons .active .icon, .drop-down-mode .d-header-icons .active .icon,
.drop-down-mode .d-header-icons .header-color-scheme-toggle .-expanded { .drop-down-mode .d-header-icons .header-color-scheme-toggle .-expanded {
border-color: transparent; border-color: transparent;
}
.drop-down-mode .d-header-icons .active .icon,
.drop-down-mode .d-header-icons .header-color-scheme-toggle .-expanded {
background-color: transparent; background-color: transparent;
} }
-1
View File
@@ -6,7 +6,6 @@ body.static-login {
"sidebar below-content"; "sidebar below-content";
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
} }
.login-welcome { .login-welcome {
border-radius: none; border-radius: none;
border: none; border: none;
+14 -28
View File
@@ -1,5 +1,3 @@
@use "lib/viewport";
:root { :root {
--main-grid-gap: 0.5em; --main-grid-gap: 0.5em;
} }
@@ -7,19 +5,17 @@
html:not(:has(.has-full-page-chat)) { html:not(:has(.has-full-page-chat)) {
background-color: var(--background-color); background-color: var(--background-color);
@include viewport.until(sm) { @include breakpoint("mobile-extra-large") {
background-color: var(--d-content-background); background-color: var(--d-content-background);
} }
} }
body { body {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
@include breakpoint("mobile-extra-large") {
@include viewport.until(sm) {
background-color: var(--d-content-background); background-color: var(--d-content-background);
} }
} }
#main-outlet-wrapper { #main-outlet-wrapper {
gap: var(--main-grid-gap); gap: var(--main-grid-gap);
} }
@@ -33,61 +29,52 @@ body.has-full-page-chat:not(.has-sidebar-page) {
.d-header { .d-header {
background-color: var(--background-color); background-color: var(--background-color);
} }
#main-outlet-wrapper { #main-outlet-wrapper {
gap: var(--main-grid-gap); gap: var(--main-grid-gap);
@include breakpoint(medium) {
@include viewport.until(lg) {
gap: 0; gap: 0;
} }
} }
} }
body.has-sidebar-page #main-outlet-wrapper { body.has-sidebar-page #main-outlet-wrapper {
grid-template-columns: var(--d-sidebar-width) minmax(0, 1fr) 0; grid-template-columns: var(--d-sidebar-width) minmax(0, 1fr) 0px;
#main-outlet { #main-outlet {
max-width: unset; max-width: unset;
} }
} }
body:not(.has-sidebar-page) #main-outlet-wrapper { body:not(.has-sidebar-page) #main-outlet-wrapper {
@include viewport.from(lg) { @include breakpoint(medium, $rule: min-width) {
grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-columns: 0px minmax(0, 1fr) 0px;
} }
} }
body:not(.has-full-page-chat, .wizard) { body:not(.has-full-page-chat) {
@include viewport.from(xl) { @include breakpoint(extra-large, $rule: min-width) {
background-color: var(--background-color); background-color: var(--background-color);
} }
#main-outlet-wrapper { #main-outlet-wrapper {
@include viewport.until(lg) { @include breakpoint(medium) {
--main-grid-gap: 0; --main-grid-gap: 0;
} }
@media screen and (min-width: 768px) {
@media screen and (width >= 768px) {
gap: var(--main-grid-gap); gap: var(--main-grid-gap);
} }
#main-outlet { #main-outlet {
width: 100%; width: 100%;
max-width: unset; max-width: unset;
padding-bottom: var(--spacing-block-l); padding-bottom: var(--spacing-block-l);
border-radius: var(--d-border-radius-large); border-radius: var(--d-border-radius-large);
background-color: var(--d-content-background); background-color: var(--d-content-background);
@include breakpoint(medium) {
@include viewport.until(lg) { border-radius: 0px;
border-radius: 0;
} }
html.composer-open & { html.composer-open & {
padding-bottom: var(--composer-height); padding-bottom: var(--composer-height);
} }
> *:not(.experimental-screen, .activate-account) { > *:not(.experimental-screen, .activate-account) {
@include viewport.from(lg) { @include breakpoint(medium, $rule: min-width) {
box-sizing: border-box; box-sizing: border-box;
max-width: 1000px; max-width: 1000px;
margin-inline: auto; margin-inline: auto;
@@ -100,7 +87,7 @@ body:not(.has-full-page-chat, .wizard) {
#list-area { #list-area {
.show-more.has-topics { .show-more.has-topics {
@include viewport.from(lg) { @include breakpoint(medium, $rule: min-width) {
width: auto; width: auto;
right: 50%; right: 50%;
transform: translateX(50%); transform: translateX(50%);
@@ -112,7 +99,6 @@ body:not(.has-full-page-chat, .wizard) {
} }
} }
} }
.topic-list-body { .topic-list-body {
padding-top: var(--spacing-block-m); padding-top: var(--spacing-block-m);
} }
+2 -36
View File
@@ -1,5 +1,3 @@
@use "lib/viewport";
.user-main .about.collapsed-info .details { .user-main .about.collapsed-info .details {
background: var(--d-content-background); background: var(--d-content-background);
} }
@@ -71,7 +69,7 @@ input[type="color"]:focus,
background-color: var(--background-color); background-color: var(--background-color);
} }
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
// pinned topic excerpts are hidden on small screens too // pinned topic excerpts are hidden on small screens too
.fk-d-menu__trigger.topic-list-layout-trigger { .fk-d-menu__trigger.topic-list-layout-trigger {
display: none; display: none;
@@ -87,7 +85,7 @@ input[type="color"]:focus,
.user-main .about .details { .user-main .about .details {
padding: 1em 1em 0; padding: 1em 1em 0;
border-bottom: 0; border-bottom: 0px;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
background-color: var(--primary-50); background-color: var(--primary-50);
} }
@@ -107,35 +105,3 @@ input[type="color"]:focus,
.period-chooser-header { .period-chooser-header {
border-radius: 0; border-radius: 0;
} }
// compatibility with the top contributors sidebar theme component
// https://meta.discourse.org/t/top-contributors-sidebar/215110
.list-container
#list-area
> .contents
> .topic-list:has(.discourse-top-contributors) {
grid-template-areas: "head head" "body sidebar";
grid-template-rows: auto 1fr;
@include viewport.until(lg) {
grid-template-areas: "head head" "body body";
}
tbody {
display: flex;
}
.discourse-top-contributors {
width: auto;
box-sizing: border-box;
@include viewport.until(lg) {
display: none;
}
.top-contributors-heading {
font-size: var(--font-up-2);
padding-bottom: 0.5em;
}
}
}
+18 -47
View File
@@ -1,93 +1,77 @@
@use "lib/viewport"; //temp sepeate file to avoid merge hell… to be distributed later
@include breakpoint(medium) {
// temp separate file to avoid merge hell… to be distributed later
@include viewport.until(lg) {
html, html,
.d-header { .d-header {
background-color: var(--d-content-background); background-color: var(--d-content-background);
} }
} }
#main-outlet-wrapper { #main-outlet-wrapper {
*[class*="navigation-"] & { *[class*="navigation-"] & {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding: 0; padding: 0;
} }
} }
} }
#main-outlet { #main-outlet {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-top: var(--spacing-block-sm); padding-top: var(--spacing-block-sm);
} }
.list-controls { .list-controls {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-inline: var( padding-inline: var(
--spacing-inline-m --spacing-inline-m
) !important; //override will be fixed when the whole chat page shenanigans is resolved ) !important; //override will be fixed when the whole chat page shenanigans is resolved
padding-block: var(--spacing-block-s); padding-block: var(--spacing-block-s);
border-bottom: 1px solid var(--primary-200); border-bottom: 1px solid var(--primary-200);
} }
.navigation-container { .navigation-container {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
gap: var(--spacing-inline-s); gap: var(--spacing-inline-s);
//dont know why we even hide this crucial navigation on mobile
.category-breadcrumb.hidden, .category-breadcrumb.hidden,
.category-breadcrumb { .category-breadcrumb {
display: flex !important; display: flex !important;
column-gap: var(--spacing-inline-m); column-gap: var(--spacing-inline-s);
row-gap: var(--spacing-block-xs); row-gap: var(--spacing-block-xs);
flex-basis: 100%; flex-basis: 100%;
li { li {
margin-right: 0; margin-right: 0;
margin-left: calc( margin-left: calc(
(var(--spacing-block-s) - 2px) * -1 (var(--spacing-block-s) - 2px) * -1
); // 2px is width of the outline ); // 2px is width of the outline
} }
.select-kit-header-wrapper {
gap: 0.25em;
}
.select-kit-header { .select-kit-header {
background: var(--d-content-background); background: var(--d-content-background);
border: 0;
} }
} }
.btn-default { .btn-default {
border: 0; border: 0;
margin-right: 0; margin-right: 0;
.d-icon { .d-icon {
font-size: var(--font-up-1); font-size: var(--font-up-1);
} }
} }
.fk-d-button-tooltip { .fk-d-button-tooltip {
margin-right: 0; margin-right: 0;
margin-left: var( margin-left: var(
--spacing-inline-xs --spacing-inline-xs
); // pure visual correction for horizontal alignment ); //pure visual correction for horitzontal alignment
&:has(#create-topic) { &:has(#create-topic) {
order: 1; order: 1;
} }
} }
} }
#navigation-bar, #navigation-bar,
.navigation-controls, .navigation-controls,
.category-breadcrumb { .category-breadcrumb {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.navigation-controls { .navigation-controls {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
gap: var(--spacing-inline-s); gap: var(--spacing-inline-s);
} }
} }
@@ -95,12 +79,12 @@
} }
.list-container { .list-container {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-inline: 0 !important; padding-inline: 0 !important;
} }
.topic-list-body { .topic-list-body {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
border-top: 0; border-top: 0;
padding-top: 0; padding-top: 0;
} }
@@ -108,17 +92,15 @@
} }
#topic-title { #topic-title {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-inline: var(--spacing-inline-s) !important; padding-inline: var(--spacing-inline-s) !important;
.title-wrapper { .title-wrapper {
gap: var(--spacing-block-s); gap: var(--spacing-block-s);
} }
.topic-category { .topic-category {
order: -1; order: -1;
} }
//make mixin of this //make mixin of this
.badge-category__wrapper { .badge-category__wrapper {
font-size: var(--font-down-2-rem); font-size: var(--font-down-2-rem);
@@ -141,15 +123,12 @@
oklch(from var(--category-badge-color) 100% calc(c * 0.9) h) oklch(from var(--category-badge-color) 100% calc(c * 0.9) h)
); );
} }
.discourse-tags { .discourse-tags {
gap: var(--spacing-inline-xs); gap: var(--spacing-inline-xs);
&__tag-separator { &__tag-separator {
display: none; display: none;
} }
} }
.discourse-tag { .discourse-tag {
font-size: var(--font-down-2-rem); font-size: var(--font-down-2-rem);
padding: var(--spacing-inline-xs) var(--spacing-inline-s); padding: var(--spacing-inline-xs) var(--spacing-inline-s);
@@ -160,9 +139,8 @@
} }
} }
} }
.container.posts { .container.posts {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-inline: var(--spacing-inline-xs) !important; padding-inline: var(--spacing-inline-xs) !important;
.main-avatar .avatar { .main-avatar .avatar {
@@ -176,22 +154,18 @@
font-size: var(--font-0-rem); font-size: var(--font-0-rem);
} }
} }
.contents { .contents {
padding-top: var(--spacing-block-m); padding-top: var(--spacing-block-m);
} }
} }
.small-action { .small-action {
&-desc { &-desc {
padding: var(--spacing-block-xs) 0; padding: var(--spacing-block-xs) 0;
} }
//for core eventually, better way imo //for core eventually, better way imo
.topic-avatar { .topic-avatar {
padding-top: 0; padding-top: 0;
align-items: center; align-items: center;
.d-icon { .d-icon {
font-size: var(--font-up-1); font-size: var(--font-up-1);
} }
@@ -201,32 +175,29 @@
} }
#topic-footer-buttons { #topic-footer-buttons {
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
padding-inline: var(--spacing-inline-xs) !important; padding-inline: var(--spacing-inline-xs) !important;
} }
} }
} }
//should be changed in core, should not be a primary btn //should be changed in core, should not be a primary btn
// changing this into straight buttons to match the progress one, which doesn't work well with rounded corners //changing this into straight buttons to match the progress one, which doesnt work well with rounded corners
#topic-progress-wrapper { #topic-progress-wrapper {
.progress-back-container { .progress-back-container {
margin-right: 0; margin-right: 0;
margin-bottom: var(--spacing-block-xs); margin-bottom: var(--spacing-block-xs);
.btn-primary.progress-back { .btn-primary.progress-back {
border-radius: 0; border-radius: 0;
background: var(--secondary); background: var(--secondary);
border: 1px solid var(--tertiary-low); border: 1px solid var(--tertiary-low);
color: var(--accent-color); color: var(--accent-color);
padding: var(--spacing-inline-s) var(--spacing-inline-m); padding: var(--spacing-inline-s) var(--spacing-inline-m);
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
} }
} }
} }
.topic-admin-menu-trigger { .topic-admin-menu-trigger {
border-radius: 0; border-radius: 0;
background: var(--secondary); background: var(--secondary);
+4 -33
View File
@@ -1,64 +1,36 @@
@use "lib/viewport";
.list-controls { .list-controls {
position: sticky; position: sticky;
top: var(--header-offset); top: var(--header-offset);
background: var(--d-content-background); background: var(--d-content-background);
z-index: z("base"); z-index: z("base");
padding: 1.5rem 0 0 0; padding: 1.5rem 0 1rem 0;
max-width: unset; max-width: unset;
@include viewport.until(sm) {
padding-bottom: 1em;
}
.navigation-container { .navigation-container {
position: relative;
gap: 1rem; gap: 1rem;
@include viewport.from(sm) {
&:after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: -1rem;
height: 1rem;
background: linear-gradient(
to bottom,
var(--d-content-background),
transparent
);
}
}
.category-breadcrumb { .category-breadcrumb {
order: 1; order: 1;
} }
} }
.combo-box .combo-box-header { .combo-box .combo-box-header {
// needs more specificity than just in the button file // needs more specificy than just in the button file
background-color: var(--secondary); background-color: var(--secondary);
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius-large);
border: 1px solid var(--primary-300); border: 1px solid var(--primary-300);
&:hover { &:hover {
border: 1px solid var(--accent-color); border: 1px solid var(--accent-color);
} }
&:focus-visible { &:focus-visible {
.discourse-no-touch & { .discourse-no-touch & {
background: var(--secondary); background: var(--secondary);
color: var(--accent-color); color: var(--accent-color);
box-shadow: 0 0 0 3px var(--button-box-shadow); box-shadow: 0px 0px 0px 3px var(--button-box-shadow);
.d-icon { .d-icon {
color: var(--accent-color); color: var(--accent-color);
} }
} }
} }
} }
.select-kit.combo-box.category-drop.has-selection .select-kit.combo-box.category-drop.has-selection
.category-drop-header:hover { .category-drop-header:hover {
border-color: transparent; border-color: transparent;
@@ -75,7 +47,6 @@
.discourse-no-touch & { .discourse-no-touch & {
background: transparent; background: transparent;
color: var(--d-nav-color--hover); color: var(--d-nav-color--hover);
&::after { &::after {
content: ""; content: "";
position: absolute; position: absolute;
-7
View File
@@ -5,12 +5,6 @@
} }
} }
.has-ai-conversations-sidebar {
.sidebar-new-topic-button__wrapper {
display: none;
}
}
.sidebar-new-topic-button { .sidebar-new-topic-button {
flex: 1 1 auto; flex: 1 1 auto;
@@ -51,7 +45,6 @@
border-radius: 0 var(--d-button-border-radius) border-radius: 0 var(--d-button-border-radius)
var(--d-button-border-radius) 0; var(--d-button-border-radius) 0;
padding-right: 0.65em; padding-right: 0.65em;
.d-icon { .d-icon {
color: var(--secondary); color: var(--secondary);
} }
+7 -27
View File
@@ -1,24 +1,18 @@
@use "lib/viewport";
.sidebar-wrapper, .sidebar-wrapper,
.sidebar-hamburger-dropdown { .sidebar-hamburger-dropdown {
@include viewport.until(lg) { @include breakpoint(medium) {
background: var(--secondary); background: var(--secondary);
.sidebar-footer-wrapper { .sidebar-footer-wrapper {
background: var(--secondary); background: var(--secondary);
.sidebar-footer-container::before { .sidebar-footer-container::before {
display: none; display: none;
} }
} }
} }
.has-full-page-chat &, .has-full-page-chat &,
.has-full-page-chat & .sidebar-footer-wrapper { .has-full-page-chat & .sidebar-footer-wrapper {
background: transparent; background: transparent;
} }
.sidebar-container { .sidebar-container {
border-right: none; border-right: none;
} }
@@ -26,38 +20,31 @@
.sidebar-sections { .sidebar-sections {
padding: 0; padding: 0;
} }
.sidebar-section-link { .sidebar-section-link {
transition: none; transition: none;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
} }
.dropdown-menu__item .sidebar-section-link { .dropdown-menu__item .sidebar-section-link {
border-radius: 0; border-radius: 0px;
} }
} }
.sidebar-section-wrapper { .sidebar-section-wrapper {
@include viewport.from(xl) { @include breakpoint(extra-large, $rule: min-width) {
padding-block: 0.45em; padding-block: 0.45em;
} }
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
.hamburger-panel .revamped & { .hamburger-panel .revamped & {
margin-bottom: var(--spacing-block-m); margin-bottom: var(--spacing-block-m);
} }
} }
.sidebar-section-header { .sidebar-section-header {
font-size: var(--font-down-2); font-size: var(--font-down-2);
} }
.sidebar-section-content { .sidebar-section-content {
margin: 0; margin: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@include breakpoint(extra-large, $rule: min-width) {
@include viewport.from(xl) {
gap: var(--spacing-block-xs); gap: var(--spacing-block-xs);
} }
} }
@@ -65,7 +52,6 @@
.sidebar-wrapper .sidebar-sections { .sidebar-wrapper .sidebar-sections {
--scrollbarThumbBg: var(--d-selected); --scrollbarThumbBg: var(--d-selected);
padding: 0 1rem;
} }
.sidebar-section-link-wrapper .sidebar-section-link:focus, .sidebar-section-link-wrapper .sidebar-section-link:focus,
@@ -77,17 +63,11 @@
.sidebar-new-topic-button__wrapper { .sidebar-new-topic-button__wrapper {
margin: 0 var(--spacing-inline-m) var(--spacing-block-l); margin: 0 var(--spacing-inline-m) var(--spacing-block-l);
.sidebar-new-topic-button .d-icon { .sidebar-new-topic-button .d-icon {
display: none; display: none;
} }
} }
// put the draft menu above the slide-out hamburger on small desktop screens .sidebar-wrapper .sidebar-sections {
@include viewport.until(md) { padding: 0 1rem;
html:not(.mobile-view) {
.topic-drafts-menu-content {
z-index: z("modal", "overlay");
}
}
} }
+256 -254
View File
@@ -1,12 +1,9 @@
@use "lib/viewport";
.topic-list .topic-list-item-separator { .topic-list .topic-list-item-separator {
display: none; display: none;
} }
.topic-list > .topic-list-body > .topic-list-item.last-visit { .topic-list > .topic-list-body > .topic-list-item.last-visit {
border-bottom: 1px solid var(--primary-300); border-bottom: 1px solid var(--primary-300);
&:hover { &:hover {
border-color: var(--accent-color); border-color: var(--accent-color);
} }
@@ -16,107 +13,95 @@
border: none; border: none;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 1.25em; gap: 1em;
@include breakpoint(medium) {
@include viewport.until(lg) {
gap: 0.5em; gap: 0.5em;
padding: 0 0.5em; padding: 0 0.5em;
} }
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
gap: 0; gap: 0;
padding: 0; padding: 0;
} }
} }
.topic-list-body .topic-list-item { .topic-list-body .topic-list-item {
position: relative;
background: var(--d-content-background);
box-shadow: 0 0 12px 1px var(--topic-card-shadow);
text-overflow: ellipsis; text-overflow: ellipsis;
padding: 0.75em 1rem; padding: 0.75em 1rem;
border: 1px solid var(--primary-300); border: 1px solid var(--primary-300);
display: grid; display: grid;
grid-template-columns: min-content min-content auto min-content; grid-template-columns: 20px min-content min-content auto min-content;
grid-template-rows: auto minmax(20px, auto);
grid-template-areas: grid-template-areas:
"creator title title status" ". . . . status"
"creator category activity likes-replies"; "activity . . likes-replies category";
grid-column-gap: 0.75rem; grid-column-gap: 12px;
grid-row-gap: 0.5rem; grid-row-gap: 8px;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
cursor: pointer; td.main-link .link-top-line {
grid-row: 1/2;
.bulk-select-enabled & { grid-column: 1/-1;
grid-template-columns: min-content min-content min-content auto min-content; font-weight: 500;
grid-template-areas:
"bulk-select creator title title status"
"bulk-select creator category activity likes-replies";
} }
&.--has-status-card td.main-link .link-top-line {
@include viewport.until(sm) { grid-column: 1/-2;
}
@include breakpoint(extra-large) {
grid-template-areas: grid-template-areas:
"category category category status" ". . . . status"
"creator title title title" "activity . . likes-replies category";
"activity activity activity likes-replies"; }
row-gap: 0.75em; @include breakpoint(mobile-extra-large) {
td.main-link .link-top-line,
&.--has-status-card td.main-link .link-top-line {
grid-row: 2/3;
grid-column: 1/-1;
}
grid-template-columns: 20px repeat(5, 1fr);
grid-template-rows: auto auto auto;
grid-template-areas:
"category category category category category status"
". . . . . ."
"activity . . . . likes-replies";
border: none; border: none;
border-bottom: 1px solid var(--primary-200); border-bottom: 1px solid var(--primary-200);
box-shadow: none; box-shadow: none;
border-radius: 0; border-radius: 0;
} }
&:hover {
.discourse-no-touch & {
border-color: var(--accent-color);
background: var(--d-content-background);
}
}
&.selected {
box-shadow:
0 0 0 2px var(--accent-color),
0 0 12px 1px var(--topic-card-shadow);
}
&.excerpt-expanded { &.excerpt-expanded {
@include viewport.until(sm) { grid-template-columns: 20px auto auto min-content min-content;
grid-template-rows: auto auto auto;
grid-template-areas:
". . . . status"
"activity . . . ."
"excerpt excerpt excerpt likes-replies category";
@include breakpoint(extra-large) {
grid-template-areas:
". . . . status"
"activity . . . ."
"excerpt excerpt excerpt likes-replies category";
}
@include breakpoint(mobile-extra-large) {
grid-template-rows: auto auto auto;
grid-template-areas:
"category category category category status"
". . . . ."
"activity . . . likes-replies";
.topic-excerpt, .topic-excerpt,
.link-bottom-line { .link-bottom-line {
display: none; display: none;
} }
} }
.topic-likes-replies-data {
@include viewport.from(sm) { align-self: flex-end;
grid-template-areas:
"creator title title status"
"creator category activity likes-replies "
"creator excerpt excerpt excerpt";
.bulk-select-enabled & {
grid-template-areas:
"bulk-select creator title title status"
"bulk-select creator category activity likes-replies "
" bulk-select creator excerpt excerpt excerpt";
} }
.topic-category-data {
align-items: flex-end;
} }
.badge-category__wrapper {
// when there is enough space, excerpt can be next to likes-replies height: min-content;
@include viewport.from(lg) {
grid-template-areas:
"creator title title status"
"creator category activity ."
"creator excerpt excerpt likes-replies";
} }
} .link-bottom-line {
.link-top-line {
grid-area: title;
font-weight: 500;
display: flex; display: flex;
align-items: center;
.title {
padding: 0;
} }
} }
@@ -125,8 +110,7 @@
td.posters, td.posters,
td.posts, td.posts,
td.views, td.views,
td.activity, td.activity {
td.topic-category-status-data {
display: contents; display: contents;
} }
@@ -134,150 +118,113 @@
padding: 0; padding: 0;
} }
// display:nones // topic activity, avatar, text
td.main-link a.topic-status,
.link-bottom-line,
.badge-notification.new-topic::before {
display: none;
}
.topic-category-data {
grid-area: category;
display: flex;
}
.badge-category__wrapper {
border-radius: var(--d-border-radius);
padding: 0.25em 0.5rem;
background-color: light-dark(
oklch(from var(--category-badge-color) 97% calc(c * 0.3) h),
oklch(from var(--category-badge-color) 45% calc(c * 0.5) h)
);
@include viewport.until(md) {
padding: 0.25em 0.5rem;
font-size: var(--font-down-2);
}
.badge-category__name {
color: light-dark(
oklch(from var(--category-badge-color) 20% calc(c * 1) h),
oklch(from var(--category-badge-color) 100% calc(c * 0.9) h)
);
}
}
// OP avatar
.topic-creator-data {
grid-area: creator;
.avatar {
height: 50px;
width: 50px;
border-radius: var(--d-border-radius);
@include viewport.until(sm) {
height: 30px;
width: 30px;
border-radius: 0.25rem;
}
}
}
.dot-separator {
width: 0.25em;
height: 0.25em;
background-color: var(--primary-500);
border-radius: 100%;
margin-inline: 0.25em;
}
// topic activity, icon, text
.topic-activity-data { .topic-activity-data {
@include ellipsis;
grid-area: activity; grid-area: activity;
} }
.topic-activity { .topic-activity {
display: flex; display: grid;
grid-template-columns: 20px auto auto auto;
font-size: var(--font-down-1); font-size: var(--font-down-1);
height: 100%; height: 100%;
align-items: center; align-items: center;
gap: 0.25em; gap: 0.25em;
} }
.topic-activity__type { .topic-activity__user .avatar {
border-radius: 0.25rem; width: 20px;
height: 20px;
border-radius: 4px;
}
.topic-activity__user {
height: 20px;
width: 20px;
border-radius: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: var(--primary-low);
} }
.topic-activity__username { .topic-activity__username {
@include ellipsis;
margin-left: 0.25em; margin-left: 0.25em;
text-wrap: nowrap;
} }
// timestamp @include breakpoint(mobile-extra-large) {
td.activity .post-activity { .topic-activity__username {
grid-area: activity; display: none;
font-size: var(--font-down-1); }
color: var(--primary-500); .topic-activity__reason {
margin-left: auto; margin-left: 0.25em;
padding: 0; }
}
.topic-activity.--updated .topic-activity__reason {
margin-left: 0.25em;
} }
// status // status
.topic-status-data { .topic-status-data {
grid-area: status; grid-area: status;
} }
.topic-status-data {
grid-area: status;
position: relative;
}
.topic-status-card { .topic-status-card {
height: min-content; height: min-content;
margin-left: auto; margin-left: auto;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: 0.25em; gap: 4px;
align-items: center; align-items: center;
padding: 0.2em 0.5rem; padding: 0 6px;
font-size: var(--font-down-3); font-size: var(--font-down-2);
font-weight: 600; font-weight: 600;
border-radius: var(--d-border-radius); border-radius: var(--d-border-radius);
border: 1px solid var(--status-color); border: 1px solid var(--status-color);
color: var(--status-color); color: var(--status-color);
width: min-content; width: min-content;
@include breakpoint("large", min-width) {
&.--pinned {
--status-color: var(--primary-500);
}
&.--hot {
--status-color: #e45735;
}
@include viewport.from(lg) {
position: absolute; position: absolute;
right: 1rem; right: 0px;
top: 0; top: -20px;
transform: translateY(-45%);
background-color: var(--d-content-background); background-color: var(--d-content-background);
height: 20px;
font-size: var(--font-down-3);
} }
svg { svg {
font-size: var(--font-down-1); font-size: var(--font-down-1);
color: var(--status-color); color: var(--status-color);
} }
} }
.topic-status-card.--pinned {
--status-color: var(--primary-500);
}
.topic-status-card.--hot {
--status-color: #e45735;
}
.link-top-line .event-date { .link-top-line .event-date {
margin-left: 0.5em; margin-left: 0.5em;
font-size: var(--font-down-3); font-size: var(--font-down-3);
} }
td.main-link a.topic-status {
display: none;
}
.topic-list-data { .topic-list-data {
padding: 0; padding: 0;
} }
td.main-link .link-top-line a.raw-topic-link {
padding: 0;
}
.topic-post-badges .badge-notification.unread-posts, .topic-post-badges .badge-notification.unread-posts,
.topic-post-badges .badge-notification.new-topic { .topic-post-badges .badge-notification.new-topic {
background-color: var(--tertiary); background-color: var(--tertiary);
@@ -290,13 +237,27 @@
min-width: unset; min-width: unset;
} }
// metadata - excerpt // timestamp
.topic-excerpt { td.activity .post-activity {
grid-area: excerpt; grid-area: activity;
margin: 0; font-size: var(--font-down-1);
color: var(--primary-500);
margin-left: auto;
padding: 0; padding: 0;
}
.link-bottom-line {
display: none;
}
// metadata
// metadata - excerpt
.topic-excerpt,
td.main-link .link-bottom-line {
grid-row: 3 / -1;
grid-column: 1 / -3;
margin: 0;
font-size: var(--font-down-2); font-size: var(--font-down-2);
width: 100%;
.excerpt__contents { .excerpt__contents {
color: var(--primary-high); color: var(--primary-high);
@@ -308,6 +269,38 @@
} }
} }
td.topic-category-status-data {
display: contents;
}
td.topic-category-data {
grid-area: category;
display: flex;
justify-content: flex-end;
@include breakpoint(mobile-extra-large) {
justify-content: flex-start;
}
}
td.topic-category-data .badge-category__wrapper,
td.main-link .link-bottom-line .badge-category__wrapper {
border-radius: var(--d-border-radius);
padding: 3px 6px;
background-color: light-dark(
oklch(from var(--category-badge-color) 97% calc(c * 0.3) h),
oklch(from var(--category-badge-color) 45% calc(c * 0.5) h)
);
@include breakpoint(tablet) {
padding: 2px 6px;
font-size: var(--font-down-2);
}
.badge-category__name {
color: light-dark(
oklch(from var(--category-badge-color) 20% calc(c * 1) h),
oklch(from var(--category-badge-color) 100% calc(c * 0.9) h)
);
}
}
td.main-link .discourse-tags { td.main-link .discourse-tags {
display: none; display: none;
} }
@@ -328,7 +321,6 @@
height: min-content; height: min-content;
align-self: center; align-self: center;
} }
.topic-likes-replies-data .topic-likes, .topic-likes-replies-data .topic-likes,
.topic-likes-replies-data .topic-replies { .topic-likes-replies-data .topic-replies {
display: flex; display: flex;
@@ -336,65 +328,53 @@
gap: 0.5em; gap: 0.5em;
align-items: center; align-items: center;
color: var(--primary-500); color: var(--primary-500);
font-size: var(--font-down-1-rem);
svg { svg {
color: var(--primary-600); color: var(--primary-600);
} }
} }
.bulk-select {
grid-area: bulk-select;
padding: 0;
margin: 0;
align-self: center;
justify-self: center;
@include viewport.until(sm) {
align-self: flex-start;
} }
label { .topic-list-item {
margin: 0; background: var(--d-content-background);
box-shadow: 0px 0px 12px 1px var(--topic-card-shadow);
&:hover {
.discourse-no-touch & {
border-color: var(--accent-color);
background: var(--d-content-background);
} }
&th {
display: none;
} }
&.selected {
box-shadow: 0px 0px 0px 2px var(--accent-color),
0px 0px 12px 1px var(--topic-card-shadow);
} }
} }
// Bookmarks // Bookmarks
.topic-list-item.bookmark-list-item { .topic-list-item.bookmark-list-item {
.link-bottom-line { .link-bottom-line {
font-size: unset; font-size: unset;
} }
//regular card without excerpt class //regular card without excerpt class
grid-template-columns: 20px min-content min-content auto min-content min-content min-content; grid-template-columns: 20px min-content min-content auto min-content min-content min-content;
grid-template-areas: grid-template-areas:
". . . . . . dropdown" ". . . . . . dropdown"
"avatar update metadata metadata metadata . category"; "avatar update metadata metadata metadata . category";
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
grid-template-columns: min-content min-content auto min-content min-content min-content min-content; grid-template-columns: min-content min-content auto min-content min-content min-content min-content;
grid-template-areas: grid-template-areas:
" . . . . . . dropdown" " . . . . . . dropdown"
"update metadata metadata metadata metadata category category"; "update metadata metadata metadata metadata category category";
.avatar { .avatar {
display: none; display: none;
} }
} }
&.has-metadata { &.has-metadata {
grid-template-columns: 20px min-content min-content auto min-content min-content min-content; grid-template-columns: 20px min-content min-content auto min-content min-content min-content;
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
grid-template-areas: grid-template-areas:
". . . . . . . dropdown" ". . . . . . . dropdown"
"update update metadata metadata metadata metadata category category"; "update update metadata metadata metadata metadata category category";
.avatar { .avatar {
display: none; display: none;
} }
@@ -410,16 +390,21 @@
"excerpt excerpt excerpt ." "excerpt excerpt excerpt ."
"excerpt excerpt excerpt category"; "excerpt excerpt excerpt category";
@include viewport.from(xl) { .badge-category__wrapper {
align-self: flex-end;
height: min-content;
max-width: 100%;
}
@include breakpoint(extra-large, $rule: min-width) {
grid-template-columns: 20px min-content auto min-content; grid-template-columns: 20px min-content auto min-content;
} }
@include viewport.until(sm) { @include breakpoint(mobile-extra-large) {
grid-template-columns: auto min-content; grid-template-columns: auto min-content;
grid-template-areas: grid-template-areas:
". dropdown" ". dropdown"
"category category"; "category category";
.post-excerpt, .post-excerpt,
.avatar { .avatar {
display: none; display: none;
@@ -433,8 +418,7 @@
"avatar update metadata metadata" "avatar update metadata metadata"
"excerpt excerpt excerpt . " "excerpt excerpt excerpt . "
"excerpt excerpt excerpt category"; "excerpt excerpt excerpt category";
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
grid-template-columns: auto min-content; grid-template-columns: auto min-content;
grid-template-areas: grid-template-areas:
" . dropdown" " . dropdown"
@@ -445,21 +429,13 @@
} }
} }
} }
.badge-category__wrapper {
align-self: flex-end;
height: min-content;
max-width: 100%;
}
} }
td.author-avatar { td.author-avatar {
grid-area: avatar; grid-area: avatar;
} }
td.main-link .link-bottom-line { td.main-link .link-bottom-line {
display: contents; display: contents;
.badge-category__wrapper { .badge-category__wrapper {
grid-area: category; grid-area: category;
display: flex; display: flex;
@@ -468,10 +444,8 @@
justify-self: flex-end; justify-self: flex-end;
} }
} }
td.main-link .link-top-line { td.main-link .link-top-line {
display: contents; display: contents;
.bookmark-metadata { .bookmark-metadata {
grid-area: metadata; grid-area: metadata;
margin: 0; margin: 0;
@@ -479,12 +453,10 @@
align-items: center; align-items: center;
gap: var(--spacing-inline-xs); gap: var(--spacing-inline-xs);
} }
.bookmark-metadata-item { .bookmark-metadata-item {
margin: 0; margin: 0;
vertical-align: middle; vertical-align: middle;
} }
.bookmark-status-with-link { .bookmark-status-with-link {
grid-column: 1/-2; grid-column: 1/-2;
grid-row: 1/2; grid-row: 1/2;
@@ -495,10 +467,8 @@
grid-area: excerpt; grid-area: excerpt;
margin: 0; margin: 0;
} }
.topic-list-data:last-of-type { .topic-list-data:last-of-type {
display: contents; display: contents;
.bookmark-actions-dropdown { .bookmark-actions-dropdown {
grid-area: dropdown; grid-area: dropdown;
align-self: flex-start; align-self: flex-start;
@@ -510,7 +480,6 @@
align-items: center; align-items: center;
background: transparent; background: transparent;
} }
.select-kit-header-wrapper { .select-kit-header-wrapper {
height: 1em; height: 1em;
width: 1em; width: 1em;
@@ -521,7 +490,6 @@
.post-metadata.topic-list-data.updated-at { .post-metadata.topic-list-data.updated-at {
grid-area: update; grid-area: update;
} }
td.activity .post-activity { td.activity .post-activity {
display: none; display: none;
} }
@@ -531,11 +499,7 @@
.topic-list-item.assigned-list-item { .topic-list-item.assigned-list-item {
.topic-status-card { .topic-status-card {
display: none; display: none;
position: relative;
top: unset;
right: unset;
} }
td.main-link .link-top-line { td.main-link .link-top-line {
grid-column: 1/-3; grid-column: 1/-3;
} }
@@ -543,18 +507,15 @@
grid-template-areas: grid-template-areas:
". . . . . status dropdown" ". . . . . status dropdown"
"activity . . . . likes-replies category"; "activity . . . . likes-replies category";
@include breakpoint(mobile-extra-large) {
@include viewport.until(sm) {
grid-template-columns: 20px min-content min-content auto min-content min-content min-content 36px; grid-template-columns: 20px min-content min-content auto min-content min-content min-content 36px;
grid-template-areas: grid-template-areas:
"category category . . . . status dropdown" "category category . . . . status dropdown"
". . . . . . . . " ". . . . . . . . "
"activity . . . . . . likes-replies"; "activity . . . . . . likes-replies";
} }
.assign-topic-buttons { .assign-topic-buttons {
display: contents; display: contents;
.assign-actions-dropdown { .assign-actions-dropdown {
grid-area: dropdown; grid-area: dropdown;
justify-content: flex-end; justify-content: flex-end;
@@ -566,29 +527,31 @@
align-items: center; align-items: center;
background: transparent; background: transparent;
} }
.select-kit-header-wrapper { .select-kit-header-wrapper {
height: 1em; height: 1em;
width: 1em; width: 1em;
} }
} }
} }
td.topic-category-status-data { td.topic-category-status-data {
display: contents; display: contents;
} }
.topic-status-card {
position: relative;
top: unset;
right: unset;
}
} }
// User Messages // User Messages
body.user-messages-page { body.user-messages-page {
.topic-list-body { .topic-list-body {
gap: 0; gap: 0;
} }
.topic-list .topic-list-data.posters a:not(.latest) { .topic-list .topic-list-data.posters a:not(.latest) {
display: block; display: block;
} }
.topic-list-item { .topic-list-item {
border-radius: 0; border-radius: 0;
box-shadow: none; box-shadow: none;
@@ -600,43 +563,30 @@ body.user-messages-page {
grid-template-areas: "title activity" "posters ."; grid-template-areas: "title activity" "posters .";
grid-template-columns: auto auto; grid-template-columns: auto auto;
grid-template-rows: auto auto; grid-template-rows: auto auto;
td.topic-category-data,
td.topic-likes-replies-data,
td.topic-status-data {
display: none;
}
&.visited .main-link .link-top-line {
font-weight: normal;
grid-area: title;
}
&:hover { &:hover {
.discourse-no-touch & {
background-color: var(--primary-low); background-color: var(--primary-low);
border-color: var(--primary-200); border-color: var(--primary-200);
} }
}
td.topic-category-data,
td.topic-likes-replies-data,
td.topic-status-data,
td.topic-creator-data {
display: none;
}
.main-link .link-top-line {
grid-area: title;
}
&.visited .main-link .link-top-line {
font-weight: normal;
}
td.topic-activity-data { td.topic-activity-data {
grid-area: activity; grid-area: activity;
} }
td.topic-list-data.posters { td.topic-list-data.posters {
grid-area: posters; grid-area: posters;
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
a { a {
margin-right: 4px; margin-right: 4px;
} }
.avatar { .avatar {
width: 20px; width: 20px;
height: 20px; height: 20px;
@@ -647,8 +597,60 @@ body.user-messages-page {
} }
} }
.event-date-container { // Bulk select
display: inline-flex;
position: relative; .bulk-select-enabled .topic-list-body .topic-list-item {
top: -0.25em; // optical alignment grid-template-areas:
"bulk-select . . . status"
"bulk-select activity activity . category";
td.topic-likes-replies-data {
display: none;
}
td.main-link .link-top-line,
&.--has-status-card td.main-link .link-top-line {
grid-column: 2/-1;
font-weight: 500;
}
.topic-excerpt {
grid-area: excerpt;
margin: 0;
}
&.excerpt-expanded {
grid-template-areas:
"bulk-select . . . status" "bulk-select activity . . ."
"bulk-select excerpt excerpt excerpt category";
@include breakpoint(mobile-extra-large) {
grid-template-areas:
"bulk-select category . . . status"
"bulk-select . . . . ."
"bulk-select activity activity . . .";
}
}
.bulk-select {
grid-area: bulk-select;
padding: 0;
margin: 0;
align-self: center;
justify-self: center;
label {
margin: 0;
}
}
@include breakpoint(large) {
grid-template-areas:
"bulk-select . . . status"
"bulk-select activity activity . category";
}
@include breakpoint(mobile-extra-large) {
td.main-link .link-top-line,
&.--has-status-card td.main-link .link-top-line {
grid-column: 2/-1;
grid-row: 2;
font-weight: 500;
}
grid-template-areas:
"bulk-select category . . . status"
"bulk-select . . . . ."
"bulk-select activity activity . . .";
}
} }
+12 -10
View File
@@ -1,5 +1,3 @@
@use "lib/viewport";
.post-stream { .post-stream {
.contents { .contents {
font-size: var(--font-up-1); font-size: var(--font-up-1);
@@ -8,14 +6,21 @@
} }
} }
.container.posts .topic-navigation:not(.with-topic-progress) {
// super fragile because new sticky topic title doesnt have a calculated value (= 53px with this font and size but…)
top: calc(
var(--header-offset, 60px) + 53px + calc(var(--spacing-block-l) * 2)
);
z-index: 300;
}
.timeline-container .topic-timeline { .timeline-container .topic-timeline {
min-width: unset; // why we have this? min-width: unset; // why we have this?
.timeline-scrollarea { .timeline-scrollarea {
border-left: 1px solid var(--accent-color); border-left: 1px solid var(--accent-color);
.timeline-scroller { .timeline-scroller {
@include viewport.from(lg) { @include breakpoint("medium", $rule: min-width) {
margin-left: -4.5px; margin-left: -4.5px;
background: var(--d-content-background); background: var(--d-content-background);
height: 40px !important; // height is coming from element style have no other choice height: 40px !important; // height is coming from element style have no other choice
@@ -26,11 +31,9 @@
line-height: 1; line-height: 1;
} }
} }
.timeline-handle { .timeline-handle {
background-color: var(--accent-color); background-color: var(--accent-color);
@include breakpoint("medium", $rule: min-width) {
@include viewport.from(lg) {
width: 8px; width: 8px;
border-radius: 10px; border-radius: 10px;
height: calc(100% - 6px); height: calc(100% - 6px);
@@ -41,7 +44,7 @@
//should probably get rid of this extra specificity class in core? //should probably get rid of this extra specificity class in core?
.timeline-container.timeline-fullscreen { .timeline-container.timeline-fullscreen {
@include viewport.until(lg) { @include breakpoint("medium", $rule: max-width) {
.topic-timeline .topic-timeline
.timeline-scrollarea .timeline-scrollarea
.timeline-scroller .timeline-scroller
@@ -53,8 +56,7 @@
.container.posts { .container.posts {
grid-template-columns: auto 8em; grid-template-columns: auto 8em;
@media screen and (max-width: 924px) {
@media screen and (width <= 924px) {
grid-template-columns: auto auto; grid-template-columns: auto auto;
} }
+1 -1
View File
@@ -3,7 +3,7 @@
--d-border-radius-large: 20px; --d-border-radius-large: 20px;
--d-border-radius: 8px; --d-border-radius: 8px;
--d-input-border-radius: 6px; --d-input-border-radius: 6px;
// --d-sidebar-row-height: 2.8em;
//the idea is: block spacing can grow with font-size, but inline spacing should not to maintain horizontal (text) alignment //the idea is: block spacing can grow with font-size, but inline spacing should not to maintain horizontal (text) alignment
--spacing-block-xs: 0.25em; --spacing-block-xs: 0.25em;
--spacing-block-s: 0.5em; --spacing-block-s: 0.5em;
+11 -27
View File
@@ -1,5 +1,3 @@
@use "lib/viewport";
.welcome-banner { .welcome-banner {
&__wrap { &__wrap {
display: grid; display: grid;
@@ -11,11 +9,11 @@
padding: 1.5em 0 2.5em; padding: 1.5em 0 2.5em;
margin-bottom: 0; margin-bottom: 0;
@media screen and (width <= 768px) { @media screen and (max-width: 768px) {
padding: 1em; padding: 1em;
} }
@include viewport.until(sm) { @include breakpoint("mobile-extra-large") {
display: block; display: block;
padding: 0.5em; padding: 0.5em;
margin-top: 0; margin-top: 0;
@@ -26,27 +24,22 @@
grid-row: 1/-1; grid-row: 1/-1;
width: 100%; width: 100%;
align-self: center; align-self: center;
@media screen and (max-width: 1028px) {
@media screen and (width <= 1028px) {
grid-row: 2/-1; grid-row: 2/-1;
grid-column: 1/-1; grid-column: 1/-1;
} }
@media screen and (max-width: 768px) {
@media screen and (width <= 768px) {
grid-column: 2/-1; grid-column: 2/-1;
grid-row: 1/-1; grid-row: 1/-1;
} }
@media screen and (max-width: 600px) {
@media screen and (width <= 600px) {
grid-row: 2/-1; grid-row: 2/-1;
grid-column: 1/-1; grid-column: 1/-1;
} }
@include breakpoint("mobile-extra-large") {
@include viewport.until(sm) {
display: none; display: none;
} }
} }
p { p {
display: none; display: none;
} }
@@ -56,29 +49,24 @@
.search-menu-container .search-input { .search-menu-container .search-input {
background: var(--d-content-background); background: var(--d-content-background);
border: 1px solid var(--search-color); border: 1px solid var(--search-color);
box-shadow: 0 4px 10px rgb(52, 6, 121, 15%); box-shadow: 0 4px 10px rgba(52, 6, 121, 15%);
} }
.search-menu .search-input:focus-within, .search-menu .search-input:focus-within,
.search-menu-container .search-input:focus-within { .search-menu-container .search-input:focus-within {
border: 1px solid var(--search-color); border: 1px solid var(--search-color);
outline: 2px solid var(--search-color); outline: 2px solid var(--search-color);
} }
.search-menu .d-icon, .search-menu .d-icon,
.search-menu .searching .d-icon, .search-menu .searching .d-icon,
.search-menu .searching .show-advanced-search .d-icon { .search-menu .searching .show-advanced-search .d-icon {
color: var(--search-color); color: var(--search-color);
} }
.panel-body { .panel-body {
z-index: z("dropdown"); z-index: z("dropdown");
} }
.results { .results {
background: var(--d-content-background); background: var(--d-content-background);
} }
&__title { &__title {
grid-column: 1/2; grid-column: 1/2;
grid-row: 1/-1; grid-row: 1/-1;
@@ -87,30 +75,26 @@
margin: 0; margin: 0;
font-weight: 400; font-weight: 400;
color: var(--search-color); color: var(--search-color);
@media screen and (max-width: 1028px) {
@media screen and (width <= 1028px) {
font-size: var(--font-up-4); font-size: var(--font-up-4);
grid-column: 1/-1; grid-column: 1/-1;
grid-row: 1; grid-row: 1;
text-align: center; text-align: center;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
@media screen and (max-width: 768px) {
@media screen and (width <= 768px) {
text-align: left; text-align: left;
grid-column: 1/2; grid-column: 1/2;
grid-row: 1/-1; grid-row: 1/-1;
font-size: var(--font-up-3); font-size: var(--font-up-3);
} }
@media screen and (max-width: 600px) {
@media screen and (width <= 600px) {
grid-column: 1/-1; grid-column: 1/-1;
grid-row: 1; grid-row: 1;
text-align: center; text-align: center;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
@include breakpoint("mobile-extra-large") {
@include viewport.until(sm) {
font-size: var(--font-up-2); font-size: var(--font-up-2);
} }
} }
-1
View File
@@ -39,7 +39,6 @@ describe "Horizon theme | High level", type: :system do
"topic-status-data", "topic-status-data",
"topic-category-data", "topic-category-data",
"topic-likes-replies-data", "topic-likes-replies-data",
"topic-creator-data",
"topic-activity-data", "topic-activity-data",
], ],
) )
-3
View File
@@ -1,3 +0,0 @@
export default {
extends: ["@discourse/lint-configs/stylelint"],
};