A platform for community discussion. Free, open, simple.
DEV: Move mobile-specific admin styles to admin css bundle (#31529)
David Taylorfba7768cb14c
diff --git a/app/assets/stylesheets/admin/admin_report.scss b/app/assets/stylesheets/admin/admin_report.scssindex 9c331a7688e..6bd32d51505 100644--- a/app/assets/stylesheets/admin/admin_report.scss+++ b/app/assets/stylesheets/admin/admin_report.scss@@ -257,3 +257,27 @@}}}++.mobile-view {+ .admin-report.post-edits {+ .admin-report-table {+ .report-table {+ thead tr th.edit_reason,+ tbody tr td.edit_reason {+ width: auto;+ }+ }+ }+ }++ .admin-report.trending-search {+ .admin-report-table {+ .report-table {+ thead tr th.term,+ tbody tr td.term {+ width: 50%;+ }+ }+ }+ }+}diff --git a/app/assets/stylesheets/admin/admin_report_counters.scss b/app/assets/stylesheets/admin/admin_report_counters.scssindex 149410bdb5b..c5e1d5aac6a 100644--- a/app/assets/stylesheets/admin/admin_report_counters.scss+++ b/app/assets/stylesheets/admin/admin_report_counters.scss@@ -65,3 +65,11 @@}}}++.mobile-view {+ .counters-list {+ .counters-header .counters-cell {+ font-weight: normal;+ }+ }+}diff --git a/app/assets/stylesheets/admin/admin_report_table.scss b/app/assets/stylesheets/admin/admin_report_table.scssindex bfd8619c4a2..fd707d17ac2 100644--- a/app/assets/stylesheets/admin/admin_report_table.scss+++ b/app/assets/stylesheets/admin/admin_report_table.scss@@ -189,3 +189,36 @@}}}++.mobile-view .admin-report-table {+ .table {+ font-size: var(--font-down-1);+ }++ .table .admin-report-table-header {+ font-weight: 500;+ border-right: 1px solid var(--primary-low);+ padding: auto;++ .title {+ writing-mode: vertical-rl;+ text-orientation: mixed;+ text-align: right;+ transform: rotate(180deg);++ .emoji {+ transform: rotate(-180deg);+ }+ }++ .sort-btn {+ display: none;+ }+ }++ .table tbody tr td {+ &.user .username {+ display: none;+ }+ }+}diff --git a/app/assets/stylesheets/admin/admin_reports.scss b/app/assets/stylesheets/admin/admin_reports.scssindex 4db1ee6b4e7..1cb0b950810 100644--- a/app/assets/stylesheets/admin/admin_reports.scss+++ b/app/assets/stylesheets/admin/admin_reports.scss@@ -13,3 +13,28 @@height: 400px;}}++.mobile-view .admin-reports {+ .admin-report {+ .body {+ flex-direction: column;++ .filters {+ order: 0;+ margin: 0;+ width: 100%;+ }++ .main {+ order: 2;+ }++ .report-alert {+ margin: 0;+ order: 1;+ flex: 1 0 0px;+ padding: 1em;+ }+ }+ }+}diff --git a/app/assets/stylesheets/admin/badges.scss b/app/assets/stylesheets/admin/badges.scssindex 90db3e5b59e..a39a722e68b 100644--- a/app/assets/stylesheets/admin/badges.scss+++ b/app/assets/stylesheets/admin/badges.scss@@ -205,3 +205,48 @@}}}++.mobile-view {+ .admin-badges {+ .badges {+ margin: 0 0.25em;++ .content-list {+ flex: 0 0 100%;+ width: 100%;++ .admin-badge-list {+ max-height: 40vh;+ margin-right: 0;+ }+ }+ }++ .badge-intro {+ flex: 0 1 75%;+ }++ .current-badge {+ margin: 20px 0;+ width: 100%;++ textarea {+ width: 100%;+ }+ }++ input[type="text"] {+ width: 100%;+ }+ }++ .badges-header .create-new-badge .btn-default {+ .d-button-label {+ display: none;+ }++ .d-icon {+ margin-right: 0;+ }+ }+}diff --git a/app/assets/stylesheets/admin/customize.scss b/app/assets/stylesheets/admin/customize.scssindex 309ef9b77e5..3b57ece9b14 100644--- a/app/assets/stylesheets/admin/customize.scss+++ b/app/assets/stylesheets/admin/customize.scss@@ -1199,3 +1199,55 @@width: 28%;}}++.mobile-view .admin-customize {+ .show-current-style {+ padding: 0;+ width: 100%;+ }++ .themes-list,+ .color-schemes {+ width: 100%;+ margin-bottom: 1em;+ }++ .admin-container {+ display: flex;+ flex-wrap: wrap;+ padding: 0;+ }++ .content-list.color-schemes ul {+ max-height: 250px;+ overflow-x: auto;+ }++ .color-scheme {+ h1,+ h1 input {+ width: 100%;+ }++ .copy-to-clipboard {+ display: none;+ }++ .controls,+ .admin-controls {+ width: 100%;+ }++ .sp-replacer {+ flex-shrink: 0;+ }++ td {+ vertical-align: top;+ }++ td.actions {+ width: 40px;+ }+ }+}diff --git a/app/assets/stylesheets/admin/flags.scss b/app/assets/stylesheets/admin/flags.scssindex 9f6bfb7e8f7..762e81c4c0b 100644--- a/app/assets/stylesheets/admin/flags.scss+++ b/app/assets/stylesheets/admin/flags.scss@@ -14,3 +14,11 @@flex-basis: 100%;}}++.mobile-view .admin-contents table.grid tr.admin-flag-item {+ grid-template-columns: auto min-content;++ .d-toggle-switch {+ margin-right: 0;+ }+}diff --git a/app/assets/stylesheets/mobile/_index.scss b/app/assets/stylesheets/mobile/_index.scssindex d5f687dce87..2839a6744fd 100644--- a/app/assets/stylesheets/mobile/_index.scss+++ b/app/assets/stylesheets/mobile/_index.scss@@ -1,10 +1,3 @@-@import "admin_badges";-@import "admin_customize";-@import "admin_flags";-@import "admin_report";-@import "admin_report_counters";-@import "admin_report_table";-@import "admin_reports";@import "alert";@import "compose";@import "dashboard";diff --git a/app/assets/stylesheets/mobile/admin_badges.scss b/app/assets/stylesheets/mobile/admin_badges.scssdeleted file mode 100644index cc7ac95beb7..00000000000--- a/app/assets/stylesheets/mobile/admin_badges.scss+++ /dev/null@@ -1,44 +0,0 @@-.mobile-view {- .admin-badges {- .badges {- margin: 0 0.25em;-- .content-list {- flex: 0 0 100%;- width: 100%;-- .admin-badge-list {- max-height: 40vh;- margin-right: 0;- }- }- }-- .badge-intro {- flex: 0 1 75%;- }-- .current-badge {- margin: 20px 0;- width: 100%;-- textarea {- width: 100%;- }- }-- input[type="text"] {- width: 100%;- }- }-- .badges-header .create-new-badge .btn-default {- .d-button-label {- display: none;- }-- .d-icon {- margin-right: 0;- }- }-}diff --git a/app/assets/stylesheets/mobile/admin_customize.scss b/app/assets/stylesheets/mobile/admin_customize.scssdeleted file mode 100644index 626dfc1c4a2..00000000000--- a/app/assets/stylesheets/mobile/admin_customize.scss+++ /dev/null@@ -1,51 +0,0 @@-body .admin-customize {- .show-current-style {- padding: 0;- width: 100%;- }-- .themes-list,- .color-schemes {- width: 100%;- margin-bottom: 1em;- }-- .admin-container {- display: flex;- flex-wrap: wrap;- padding: 0;- }-- .content-list.color-schemes ul {- max-height: 250px;- overflow-x: auto;- }-- .color-scheme {- h1,- h1 input {- width: 100%;- }-- .copy-to-clipboard {- display: none;- }-- .controls,- .admin-controls {- width: 100%;- }-- .sp-replacer {- flex-shrink: 0;- }-- td {- vertical-align: top;- }-- td.actions {- width: 40px;- }- }-}diff --git a/app/assets/stylesheets/mobile/admin_flags.scss b/app/assets/stylesheets/mobile/admin_flags.scssdeleted file mode 100644index 21773720a1b..00000000000--- a/app/assets/stylesheets/mobile/admin_flags.scss+++ /dev/null@@ -1,7 +0,0 @@-.admin-contents table.grid tr.admin-flag-item {- grid-template-columns: auto min-content;-- .d-toggle-switch {- margin-right: 0;- }-}diff --git a/app/assets/stylesheets/mobile/admin_report.scss b/app/assets/stylesheets/mobile/admin_report.scssdeleted file mode 100644index 4b9c8a467f8..00000000000--- a/app/assets/stylesheets/mobile/admin_report.scss+++ /dev/null@@ -1,21 +0,0 @@-.admin-report.post-edits {- .admin-report-table {- .report-table {- thead tr th.edit_reason,- tbody tr td.edit_reason {- width: auto;- }- }- }-}--.admin-report.trending-search {- .admin-report-table {- .report-table {- thead tr th.term,- tbody tr td.term {- width: 50%;- }- }- }-}diff --git a/app/assets/stylesheets/mobile/admin_report_counters.scss b/app/assets/stylesheets/mobile/admin_report_counters.scssdeleted file mode 100644index ec10485f99b..00000000000--- a/app/assets/stylesheets/mobile/admin_report_counters.scss+++ /dev/null@@ -1,5 +0,0 @@-.counters-list {- .counters-header .counters-cell {- font-weight: normal;- }-}diff --git a/app/assets/stylesheets/mobile/admin_report_table.scss b/app/assets/stylesheets/mobile/admin_report_table.scssdeleted file mode 100644index 98880d04a17..00000000000--- a/app/assets/stylesheets/mobile/admin_report_table.scss+++ /dev/null@@ -1,32 +0,0 @@-.admin-report-table {- .table {- font-size: var(--font-down-1);- }-- .table .admin-report-table-header {- font-weight: 500;- border-right: 1px solid var(--primary-low);- padding: auto;-- .title {- writing-mode: vertical-rl;- text-orientation: mixed;- text-align: right;- transform: rotate(180deg);-- .emoji {- transform: rotate(-180deg);- }- }-- .sort-btn {- display: none;- }- }-- .table tbody tr td {- &.user .username {- display: none;- }- }-}diff --git a/app/assets/stylesheets/mobile/admin_reports.scss b/app/assets/stylesheets/mobile/admin_reports.scssdeleted file mode 100644index 4b9164c04a8..00000000000--- a/app/assets/stylesheets/mobile/admin_reports.scss+++ /dev/null@@ -1,24 +0,0 @@-.admin-reports {- .admin-report {- .body {- flex-direction: column;-- .filters {- order: 0;- margin: 0;- width: 100%;- }-- .main {- order: 2;- }-- .report-alert {- margin: 0;- order: 1;- flex: 1 0 0px;- padding: 1em;- }- }- }-}