A platform for community discussion. Free, open, simple.
Giving post admin menu variable width in case of long translations
Krisceb9226518e1
diff --git a/app/assets/stylesheets/common/base/topic.scss b/app/assets/stylesheets/common/base/topic.scssindex 76f1c7d1de0..453d559f0c3 100644--- a/app/assets/stylesheets/common/base/topic.scss+++ b/app/assets/stylesheets/common/base/topic.scss@@ -25,7 +25,6 @@animation-name: button-jump-up;width: 145px;text-align: center;-.btn {margin: 0;}@@ -36,13 +35,11 @@position: relative;right: 38px;top: 35px;-.widget-button {height: 35px;border-right: 1px solid dark-light-diff($primary, $secondary, 80%, -70%);}}-.topic-admin-popup-menu.right-side {position: relative;right: 50px;@@ -52,6 +49,7 @@#topic-progress-wrapper.docked {.topic-admin-popup-menu.right-side {right: 50px;+ bottom: -150px; // Prevents menu from being too high when a topic is very short}}@@ -60,11 +58,9 @@flex-wrap: wrap;width: 90%;align-items: flex-end;-.btn-small {margin: 0 6px 0 0;}-a.topic-featured-link {display: inline-block;}@@ -83,29 +79,23 @@ a.badge-category {display: flex;flex-wrap: wrap;width: 90%;-.btn-small {margin: 0 6px 0 0;}-a.topic-featured-link {display: inline-block;}}-h1 {margin: 0 0 4px 0;width: 90%;}-a.badge-category {margin-top: 5px;}-a.edit-topic i {font-size: 0.8em;}-.edit-topic-title {display: flex;flex-wrap: wrap;@@ -206,7 +196,6 @@ a.badge-category {.post-links-container {@include unselectable;clear: both;-.post-links {margin-top: 1em;padding-top: 1em;@@ -215,11 +204,9 @@ a.badge-category {margin-bottom: 1em;}}-.expand-links {color: dark-light-choose($primary-medium, $secondary-medium);}-.track-link {display: flex;align-items: center;@@ -229,11 +216,9 @@ a.badge-category {text-overflow: ellipsis;}}-ul {margin: 0;list-style: none;-li {margin-bottom: 0.5em;a[href] {@@ -249,7 +234,6 @@ a.badge-category {}}}-a.reply-new {i {background: $secondary;@@ -270,7 +254,6 @@ a.topic-featured-link {text-transform: lowercase;color: dark-light-choose($primary-medium, $secondary-medium);font-size: 0.875rem;-&::before {position: relative;top: 0.1em;diff --git a/app/assets/stylesheets/desktop/topic-post.scss b/app/assets/stylesheets/desktop/topic-post.scssindex c23467c5020..0dd4a81c3ad 100644--- a/app/assets/stylesheets/desktop/topic-post.scss+++ b/app/assets/stylesheets/desktop/topic-post.scss@@ -21,18 +21,15 @@ h1 .topic-statuses .topic-status i {.topic-body {padding: 0;-&:first-of-type {border-top: none;}-.reply-to-tab {z-index: z("base") + 1;float: right;margin: -2px 25px 0 0;color: dark-light-choose($primary-medium, $secondary-medium);}-.actions .fade-out {.discourse-no-touch & {opacity: 0.7;@@ -42,7 +39,6 @@ h1 .topic-statuses .topic-status i {opacity: 1;}}-&:hover .actions .fade-out,.selected .actions .fade-out {opacity: 1;@@ -55,18 +51,14 @@ section.post-menu-area {nav.post-controls {padding: 0;-.like-button {display: inline-flex;-.like-count {color: dark-light-choose($primary-low-mid, $secondary-high);}-.widget-button {background: none;}-&:hover {background: $primary-low;.like-count {@@ -79,21 +71,17 @@ nav.post-controls {background: none;}}-&:active {box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);-.widget-button {box-shadow: none;}}-.like {&:focus {background: none;}}-.like-count {font-size: $font-up-1;margin-left: 0;@@ -108,38 +96,31 @@ nav.post-controls {margin-right: -12px;}}-.toggle-like {padding: 8px 8px;margin-left: 2px;}}-.highlight-action {color: dark-light-choose($primary-medium, $secondary-high);}-a,button {color: dark-light-choose($primary-low-mid, $secondary-high);-.d-icon {opacity: 1;}margin-right: 2px;display: inline-block;}-a.toggle-likes {padding: 8px 0;margin-right: -3px;}-span.badge-posts {margin-right: 5px;transition: all linear 0.15s;}-.actions {text-align: right;float: right;@@ -149,7 +130,6 @@ nav.post-controls {overflow: hidden;}}-.show-replies {margin-left: -10px;font-size: inherit;@@ -167,17 +147,14 @@ nav.post-controls {font-size: $font-down-1;}}-button.create {margin-right: 0;color: dark-light-choose($primary-high, $secondary-low);margin-left: 10px;}-.create i {margin-right: 5px;}-button {font-size: $font-up-1;padding: 8px 10px;@@ -185,36 +162,30 @@ nav.post-controls {background: transparent;border: none;margin-left: 3px;-&.d-hover,&:focus {background: $primary-low;color: $primary;}-&:active {box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);}-&.hidden {display: none;}&.admin {position: relative;}-&.delete.d-hover,&.delete:focus {background: $danger;color: $secondary;}-&.like.d-hover,&.like:focus {color: $love;background: $love-low;}-&.has-like {color: $love;}@@ -224,7 +195,6 @@ nav.post-controls {&.has-like[disabled]:active {box-shadow: none;}-&.bookmark {padding: 8px 11px;&.bookmarked {@@ -232,10 +202,13 @@ nav.post-controls {}}}-.post-admin-menu {+ display: inline-flex;+ flex-direction: column;+ box-sizing: border-box;background-color: $secondary;- width: 205px;+ width: auto;+ max-width: 320px;padding: 10px;border: 1px solid $primary-low;position: absolute;@@ -243,25 +216,20 @@ nav.post-controls {bottom: -2px;right: 15px;z-index: z("dropdown");-h3 {margin-top: 0;color: $primary;font-size: $font-0;}-ul {list-style: none;margin: 10px 0 0 0;}-li {- width: 176px;margin-bottom: 5px;-.d-icon {width: 14px;- margin-right: 14px;+ margin-right: 10px;}}}@@ -274,7 +242,6 @@ nav.post-controls {margin: 10px 0;}border: 1px solid $primary-low;-.topic-body {box-sizing: border-box;width: calc(100% - 70px); // [100% - .topic-avatar width]@@ -282,19 +249,15 @@ nav.post-controls {// which expect "normal" post width, but expansions are narroweroverflow: hidden;padding: 15px 25px 0 15px;- }-- // this is covered by .topic-body .regular on a normal post+ } // this is covered by .topic-body .regular on a normal post// but no such class structure exists for an embedded, expanded post.cooked {margin-top: 15px;}-.topic-avatar {padding-left: 25px;padding-top: 15px;}-.collapse-down,.collapse-up {position: absolute;@@ -307,9 +270,7 @@ nav.post-controls {background: $primary-low;color: $primary;}- }-- // bottom means "reply expansion" below a post+ } // bottom means "reply expansion" below a post&.bottom {border-top: none;margin-bottom: 20px;@@ -329,9 +290,7 @@ nav.post-controls {border-top: 1px solid $primary-low;}}- }-- // top means "in reply to expansion" above a post+ } // top means "in reply to expansion" above a post&.top {border-bottom: none;.collapse-down {@@ -350,7 +309,6 @@ nav.post-controls {&.top.topic-body {padding: 0;}-.post-date {color: dark-light-choose($primary-medium, $secondary-high);}@@ -361,7 +319,6 @@ nav.post-controls {.reply:first-of-type .row {border-top: none;}-.topic-meta-data {position: relative;}@@ -390,7 +347,6 @@ nav.post-controls {.topic-map {margin: 20px 0;-.map {.secondary {text-align: center;@@ -428,7 +384,6 @@ nav.post-controls {padding: 7px 10px 15px 10px;color: $primary;}-.participants {// PMs //.user {@@ -444,7 +399,6 @@ nav.post-controls {color: dark-light-choose($primary-medium, $secondary-high);}}-.buttons {float: right;.btn {@@ -458,7 +412,6 @@ nav.post-controls {color: $primary;background: $primary-low;}-&.collapsed {padding-bottom: 1px;}@@ -469,7 +422,6 @@ nav.post-controls {}}}-.link-summary .btn {color: dark-light-choose($primary-medium, $secondary-high);background: blend-primary-secondary(5%);@@ -498,7 +450,6 @@ nav.post-controls {color: $tertiary;}}-.bookmark.bookmarked .d-icon-bookmark {color: $tertiary;}@@ -513,9 +464,7 @@ nav.post-controls {padding: 20px 0 15px 0;table {margin-top: 10px;- }-- // this forces category to take less space in suggested topics+ } // this forces category to take less space in suggested topics// as the poster list is not present at all there.th.category {width: 150px;@@ -571,14 +520,12 @@ video {.extra-info-wrapper {overflow: hidden;-.badge-wrapper,i,.topic-link {-webkit-animation: fadein 0.7s;animation: fadein 0.7s;}-.topic-statuses {i {color: $header_primary;@@ -593,7 +540,6 @@ video {color: $header_primary;}}-.topic-link {color: $header_primary;display: block;@@ -601,13 +547,13 @@ video {overflow: hidden;text-overflow: ellipsis;}-.topic-header-extra {margin: 0 0 0 5px;}}/* default docked header CSS for all topics, including those without categories */+.extra-info {h1 {margin: 5px 0 0 0;@@ -615,13 +561,13 @@ video {line-height: $line-height-large;width: 100%;}-.topic-statuses {margin-top: -2px;}}/* override docked header CSS for topics with categories */+.extra-info.two-rows {h1 {line-height: $line-height-medium;@@ -630,7 +576,7 @@ video {}}-.open > .dropdown-menu {+.open>.dropdown-menu {display: block;}@@ -645,12 +591,7 @@ video {.deleted {.topic-body {- background-color: dark-light-diff(- rgba($danger, 0.7),- $secondary,- 50%,- -60%- );+ background-color: dark-light-diff( rgba($danger, 0.7), $secondary, 50%, -60%);}}@@ -675,6 +616,7 @@ video {}/* solo quotes */+blockquote {/* leave browser defaults for top and bottom here */margin-left: 0;@@ -683,13 +625,13 @@ blockquote {}/* quotes with attribution */+.quote {- & > blockquote {+ &>blockquote {.onebox-result {background-color: blend-primary-secondary(5%);}}-aside {.quote,.title,@@ -699,9 +641,8 @@ blockquote {background: blend-primary-secondary(5%);border-left: 5px solid $primary-low;}-- aside.quote > blockquote,- aside.quote > .title {+ aside.quote>blockquote,+ aside.quote>.title {border-left: 0;}}@@ -711,7 +652,6 @@ blockquote {$topic-body-width: 690px;$topic-body-width-padding: 11px;$topic-avatar-width: 45px;-.topic-body {width: $topic-body-width;float: left;@@ -730,18 +670,17 @@ $topic-avatar-width: 45px;}.gap {- width: calc(- #{$topic-avatar-width} + #{$topic-body-width} + 2 * #{$topic-body-width-padding}- );+ width: calc( #{$topic-avatar-width} + #{$topic-body-width} + 2 * #{$topic-body-width-padding});}/* hide the reply border above the time gap notices */-.time-gap + .topic-post .topic-body,-.time-gap + .topic-post .topic-avatar {++.time-gap+.topic-post .topic-body,+.time-gap+.topic-post .topic-avatar {border-top: none;}-.time-gap + .topic-post .embedded-posts.top {+.time-gap+.topic-post .embedded-posts.top {border-bottom: 1px solid $primary-low;}@@ -753,6 +692,7 @@ $topic-avatar-width: 45px;.dropdown {position: relative;}+.caret {display: inline-block;width: 0;@@ -764,6 +704,7 @@ $topic-avatar-width: 45px;content: "";margin-left: 5px;}+.dropdown-menu {position: absolute;bottom: 115%;@@ -789,6 +730,7 @@ $topic-avatar-width: 45px;color: $primary;}}+.dropdown-menu a {display: block;padding: 9px;@@ -797,21 +739,21 @@ $topic-avatar-width: 45px;line-height: $line-height-medium;color: $primary;transition: all linear 0.15s;-- & > div {+ &>div {margin-left: 26px;}}-.dropdown-menu li > a:hover,-.dropdown-menu .active > a,-.dropdown-menu .active > a:hover {++.dropdown-menu li>a:hover,+.dropdown-menu .active>a,+.dropdown-menu .active>a:hover {color: $primary;text-decoration: none;background-color: $highlight-medium;}-.dropdown-menu .disabled > a,-.dropdown-menu .disabled > a:hover {+.dropdown-menu .disabled>a,+.dropdown-menu .disabled>a:hover {text-decoration: none;color: $primary;background-color: $tertiary-low;@@ -824,7 +766,7 @@ $topic-avatar-width: 45px;font-size: $font-up-2;}-.open > .dropdown-menu {+.open>.dropdown-menu {display: block;clear: both;}@@ -838,20 +780,17 @@ $topic-avatar-width: 45px;padding: 5px;margin-bottom: 5px;right: 10px;-@include large-width {right: auto;margin-left: 330px;left: 50%;}-button {width: 180px;margin: 4px auto;display: inline-block;text-align: left;}-&.hidden {display: none;}@@ -879,7 +818,6 @@ $topic-avatar-width: 45px;font-weight: normal;margin-bottom: 10px;background: $tertiary-medium;-&[href] {color: $secondary;}@@ -917,14 +855,12 @@ $topic-avatar-width: 45px;}article.boxed {position: relative;-.select-posts {position: absolute;right: 0;z-index: z("base") + 1;top: 3em;height: 100px;-button {margin-left: 8px;background-color: dark-light-choose($primary-low-mid, $secondary-high);@@ -967,7 +903,6 @@ a.attachment:before {clear: both;height: 0;}-.post-info {display: inline-block;float: right;@@ -1015,22 +950,17 @@ span.highlighted {.gutter {display: none;}-.topic-avatar {width: 45px;}-.topic-post .reply-to-tab {right: 15%;}-.topic-body {box-sizing: border-box;width: calc(100% - 47px); //100% - [width of .topic-avatar + 2px]-padding-left: 2%;}-.embedded-posts {// top means "in reply to expansion" above a post&.top {diff --git a/app/assets/stylesheets/mobile/topic-post.scss b/app/assets/stylesheets/mobile/topic-post.scssindex b083511599d..f3618c4f70b 100644--- a/app/assets/stylesheets/mobile/topic-post.scss+++ b/app/assets/stylesheets/mobile/topic-post.scss@@ -1,5 +1,6 @@/* hide the reply border above the time gap notices */-.time-gap + .topic-post article {++.time-gap+.topic-post article {border-top: none;}@@ -29,11 +30,9 @@ span.badge-posts {.topic-post {nav.post-controls {color: dark-light-choose($primary-low-mid, $secondary-high);-.actions {display: flex;}-.like-button {display: flex;flex: 0 1 auto;@@ -44,7 +43,6 @@ span.badge-posts {&.like-count {padding: 8px 4px 8px 8px;line-height: 1.2;-&.regular-likes {margin-right: 0;}@@ -63,11 +61,10 @@ span.badge-posts {line-height: $line-height-medium;}}- button.like-count + button.toggle-like {+ button.like-count+button.toggle-like {padding: 8px 9px 8px 4px;}}-.d-icon {opacity: 1;}@@ -102,34 +99,36 @@ span.badge-posts {}.post-admin-menu {+ display: inline-flex;+ flex-direction: column;+ box-sizing: border-box;background-color: $secondary;- width: 205px;+ width: auto;+ max-width: 320px;padding: 10px;border: 1px solid $primary-low;position: absolute;text-align: left;- bottom: 0;+ bottom: -50px;left: 135px;+ @media screen and (max-width: 374px) {+ left: 50px;+ }z-index: z("dropdown");-h3 {margin-top: 0;color: $primary;font-size: $font-0;}-ul {list-style: none;margin: 10px 0 0 0;}-li {- width: 176px;margin-bottom: 5px;-.d-icon {width: 14px;- margin-right: 14px;+ margin-right: 10px;}}}@@ -168,22 +167,18 @@ a.reply-to-tab {.topic-map {margin: 10px 0;-h4 {line-height: $line-height-medium;}-.user {float: left;margin-right: 10px;}-.map-collapsed {.secondary {display: none;}}-.map {li {float: left;@@ -200,15 +195,13 @@ a.reply-to-tab {color: dark-light-choose($primary-high, $secondary-low);font-size: $font-up-1;}-- .avatar + a {+ .avatar+a {float: left;}}li.avatars {display: none;}-.links,.information,.avatars {@@ -216,13 +209,11 @@ a.reply-to-tab {color: $primary;overflow: auto;}-.information {p {margin: 0 0 10px 0;}}-.participants {// PMs //.user {@@ -230,7 +221,6 @@ a.reply-to-tab {margin: 0 10px 10px 0;}}-.buttons {.btn {border: 0;@@ -245,7 +235,6 @@ a.reply-to-tab {}}}-.link-summary .btn {color: dark-light-choose($primary-medium, $secondary-high);background: blend-primary-secondary(5%);@@ -259,7 +248,6 @@ a.reply-to-tab {.d-icon-bookmark.bookmarked {color: $tertiary;}-.combobox {float: left;margin-right: 1em;@@ -269,7 +257,8 @@ a.reply-to-tab {}#topic-footer-buttons p {- clear: both; /* this is to force the drop-down notification state description para below the button */+ clear: both;+ /* this is to force the drop-down notification state description para below the button */margin: 0;color: dark-light-choose($primary-medium, $secondary-medium);}@@ -290,7 +279,6 @@ a.reply-to-tab {td.likes {display: none;}-a.badge-category,a.badge-category-parent {font-size: $font-down-1;@@ -341,7 +329,7 @@ iframe {display: none;}-.open > .dropdown-menu {+.open>.dropdown-menu {display: block;}@@ -415,12 +403,7 @@ button.select-post {.deleted {.topic-body {- background-color: dark-light-diff(- rgba($danger, 0.7),- $secondary,- 50%,- -60%- );+ background-color: dark-light-diff( rgba($danger, 0.7), $secondary, 50%, -60%);}}@@ -458,7 +441,8 @@ span.highlighted {.topic-avatar {float: left;margin-right: 10px;- z-index: z("base") + 1; /* must render on top of topic-body + topic-meta-data, otherwise not tappable */+ z-index: z("base") + 1;+ /* must render on top of topic-body + topic-meta-data, otherwise not tappable */}.topic-meta-data {@@ -466,7 +450,6 @@ span.highlighted {font-size: $font-down-1;.names {line-height: $line-height-medium;-.poster-icon {float: right;}