1
0
mirror of https://github.com/flarum/core.git synced 2025-08-18 14:22:02 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
David Wheatley
61be08577d fix: .container set to width larger than viewport 2021-12-24 13:37:21 +01:00
David Wheatley
d1dd3d952d feat: use position: sticky on discussion sidenav 2021-12-24 13:33:42 +01:00
10 changed files with 74 additions and 27 deletions

View File

@@ -50,6 +50,7 @@
color: var(--muted-color); color: var(--muted-color);
} }
thead th { thead th {
position: -webkit-sticky;
position: sticky; position: sticky;
top: 0; top: 0;
padding-bottom: 10px; padding-bottom: 10px;
@@ -73,6 +74,7 @@
} }
tbody { tbody {
th { th {
position: -webkit-sticky;
position: sticky; position: sticky;
left: 0; left: 0;
padding-right: 50px; padding-right: 50px;

View File

@@ -2,8 +2,8 @@
position: relative !important; position: relative !important;
padding-top: var(--header-height); padding-top: var(--header-height);
padding-bottom: 50px; padding-bottom: 50px;
overflow-x: hidden;
min-height: 100vh; min-height: 100vh;
width: 100%;
@media @phone { @media @phone {
padding-top: var(--header-height-phone); padding-top: var(--header-height-phone);
@@ -27,13 +27,16 @@
box-shadow: 0 2px 6px var(--shadow-color); box-shadow: 0 2px 6px var(--shadow-color);
} }
} }
.App-primaryControl, .App-titleControl, .App-backControl { .App-primaryControl,
.App-titleControl,
.App-backControl {
position: absolute !important; position: absolute !important;
z-index: calc(~"var(--zindex-header) + 1"); z-index: calc(~"var(--zindex-header) + 1");
top: 0 !important; top: 0 !important;
margin: 0; margin: 0;
.App.affix &, .Composer & { .App.affix &,
.Composer & {
position: fixed !important; position: fixed !important;
} }
@@ -59,15 +62,18 @@
right: 0; right: 0;
&.Dropdown { &.Dropdown {
.Button, .Button-caret { .Button,
.Button-caret {
display: none !important; display: none !important;
} }
.Dropdown-toggle, .Button-icon { .Dropdown-toggle,
.Button-icon {
display: block !important; display: block !important;
} }
} }
} }
.App-primaryControl, .App-backControl { .App-primaryControl,
.App-backControl {
margin: 0 !important; margin: 0 !important;
> .Button { > .Button {
@@ -90,7 +96,8 @@
text-align: center; text-align: center;
color: var(--header-color) !important; color: var(--header-color) !important;
&, > .Button { &,
> .Button {
font-size: 16px; font-size: 16px;
} }
> .Button { > .Button {
@@ -142,6 +149,7 @@
z-index: var(--zindex-modal); z-index: var(--zindex-modal);
.drawerOpen & { .drawerOpen & {
-webkit-transform: none !important;
transform: none !important; transform: none !important;
} }
} }
@@ -199,12 +207,15 @@
> li { > li {
padding: 0 10px 0; padding: 0 10px 0;
} }
.FormControl, .ButtonGroup, .Button { .FormControl,
.ButtonGroup,
.Button {
width: 100%; width: 100%;
text-align: left; text-align: left;
} }
.Dropdown-menu { .Dropdown-menu {
.ButtonGroup, .Button { .ButtonGroup,
.Button {
width: auto; width: auto;
} }
} }
@@ -220,7 +231,7 @@
@media @phone { @media @phone {
.App-drawer { .App-drawer {
& when (@config-colored-header = true) { & when (@config-colored-header = true) {
.light-contents(@name: 'header-colored'); .light-contents(@name: "header-colored");
} }
} }
} }
@@ -244,7 +255,7 @@
} }
& when (@config-colored-header = true) { & when (@config-colored-header = true) {
.light-contents(@name: 'header-colored'); .light-contents(@name: "header-colored");
} }
} }
@@ -253,7 +264,8 @@
margin-right: 25px; margin-right: 25px;
} }
.Header-controls { .Header-controls {
&, > li { &,
> li {
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
} }

View File

@@ -177,6 +177,7 @@
box-shadow: 0 2px 6px var(--shadow-color); box-shadow: 0 2px 6px var(--shadow-color);
visibility: hidden; visibility: hidden;
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch;
transform: translate(0, 70vh); transform: translate(0, 70vh);
transition: transform 0.3s, visibility 0s 0.3s; transition: transform 0.3s, visibility 0s 0.3s;
@@ -207,6 +208,7 @@
} }
} }
.open& { .open& {
-webkit-transform: none;
transform: none; transform: none;
visibility: visible; visibility: visible;
transition-delay: 0s; transition-delay: 0s;

View File

@@ -33,6 +33,7 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
z-index: var(--zindex-modal); z-index: var(--zindex-modal);
-webkit-overflow-scrolling: touch;
// When fading in the modal, animate it to slide down // When fading in the modal, animate it to slide down
.Modal { .Modal {
@@ -142,6 +143,7 @@
transform: translate(0, 100vh); transform: translate(0, 100vh);
&.in { &.in {
-webkit-transform: none !important;
transform: none !important; transform: none !important;
} }
&:before { &:before {
@@ -153,6 +155,7 @@
.Modal { .Modal {
max-width: 100%; max-width: 100%;
margin: 0; margin: 0;
-webkit-transform: none !important;
transform: none !important; transform: none !important;
} }
.Modal-content { .Modal-content {
@@ -180,6 +183,7 @@
z-index: 1; z-index: 1;
} }
.Modal-content { .Modal-content {
border: 0; border: 0;
border-radius: var(--border-radius); border-radius: var(--border-radius);
box-shadow: 0 7px 15px var(--shadow-color); box-shadow: 0 7px 15px var(--shadow-color);

View File

@@ -6,6 +6,7 @@
display: inline-block; display: inline-block;
width: auto; width: auto;
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none;
padding-right: 30px; padding-right: 30px;
cursor: pointer; cursor: pointer;
line-height: 1; line-height: 1;

View File

@@ -65,7 +65,11 @@
// CSS3 Content Columns // CSS3 Content Columns
/** @deprecated */ /** @deprecated */
.content-columns(@column-count; @column-gap: @grid-gutter-width) { .content-columns(@column-count; @column-gap: @grid-gutter-width) {
// Safari
-webkit-column-count: @column-count;
column-count: @column-count; column-count: @column-count;
// Safari
-webkit-column-gap: @column-gap;
column-gap: @column-gap; column-gap: @column-gap;
} }
@@ -81,6 +85,7 @@
// Placeholder text // Placeholder text
.placeholder(@color) { .placeholder(@color) {
// Safari // Safari
&::-webkit-input-placeholder,
&::placeholder { &::placeholder {
color: @color; color: @color;
} }
@@ -171,7 +176,7 @@
// User select // User select
// For selecting text on the page // For selecting text on the page
.user-select(@select) { .user-select(@select) {
// Safari // Safari + MS Edge
-webkit-user-select: @select; -webkit-user-select: @select;
user-select: @select; user-select: @select;
} }

View File

@@ -13,6 +13,7 @@ body {
font-size: 13px; font-size: 13px;
line-height: 1.5; line-height: 1.5;
overflow-y: scroll; overflow-y: scroll;
width: 100%;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@@ -65,6 +66,8 @@ p {
@media @desktop-hd { @media @desktop-hd {
width: @screen-desktop-hd; width: @screen-desktop-hd;
} }
max-width: 100%;
} }
.containerNarrow { .containerNarrow {

View File

@@ -80,6 +80,7 @@
padding: 15px 0; padding: 15px 0;
white-space: nowrap; white-space: nowrap;
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch;
&:after { &:after {
content: " "; content: " ";

View File

@@ -15,7 +15,8 @@
margin: 15px; margin: 15px;
display: inline-block; display: inline-block;
&.item-controls, &.item-scrubber { &.item-controls,
&.item-scrubber {
margin: 0; margin: 0;
display: block; display: block;
} }
@@ -23,22 +24,27 @@
} }
} }
@media @tablet-up { @media @tablet-up {
.DiscussionPage-nav { .DiscussionPage-discussion > .container {
float: right; display: flex;
flex-direction: row-reverse;
&, > ul {
width: 150px;
} }
.DiscussionPage-nav {
min-width: 150px;
> ul { > ul {
position: fixed; margin-top: 24px;
margin-top: 30px; position: sticky;
top: ~"calc(24px + var(--header-height))";
z-index: 1; z-index: 1;
width: 100%;
> li { > li {
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.ButtonGroup, .Button { .ButtonGroup,
.Button {
width: 100%; width: 100%;
} }
.ButtonGroup:not(.itemCount1) { .ButtonGroup:not(.itemCount1) {
@@ -54,7 +60,7 @@
@media @tablet-up { @media @tablet-up {
.DiscussionPage-stream { .DiscussionPage-stream {
margin-right: 225px; margin-right: 75px;
} }
} }
@@ -132,7 +138,8 @@
} }
} }
// When the pane is pinned, move the other page content inwards // When the pane is pinned, move the other page content inwards
.App-content, .App-footer { .App-content,
.App-footer {
.hasPane.panePinned & { .hasPane.panePinned & {
margin-left: var(--pane-width); margin-left: var(--pane-width);

View File

@@ -107,15 +107,25 @@
} }
.animated { .animated {
-webkit-animation-fill-mode: both;
animation-fill-mode: both; animation-fill-mode: both;
-webkit-animation-duration: 0.5s;
animation-duration: 0.5s; animation-duration: 0.5s;
animation-delay: 1.7s; animation-delay: 1.7s;
-webkit-animation-delay: 1.7s;
}
@-webkit-keyframes fadeIn {
0% {opacity: 0}
100% {opacity: 1}
} }
@keyframes fadeIn { @keyframes fadeIn {
0% {opacity: 0} 0% {opacity: 0}
100% {opacity: 1} 100% {opacity: 1}
} }
.fadeIn { .fadeIn {
-webkit-animation-name: fadeIn;
animation-name: fadeIn; animation-name: fadeIn;
} }