Skip to content

Commit

Permalink
Merge pull request #10435 from notbakaneko/feature/layout-margin-cleanup
Browse files Browse the repository at this point in the history
Cleanup layout footer gap
  • Loading branch information
nanaya authored Aug 10, 2023
2 parents 01be460 + 7f9d7e3 commit 36d197d
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 99 deletions.
3 changes: 2 additions & 1 deletion resources/css/bem/account-edit.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@

display: flex;
flex-direction: column;
margin-bottom: 5px;

@media @desktop {
flex-direction: row;
}

&--first {
position: relative;

&::after {
.inner-shadow-top();
.full-size();
Expand Down
3 changes: 0 additions & 3 deletions resources/css/bem/artist-album.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
align-items: center;
.default-box-shadow();
overflow: hidden;
@media @desktop {
margin-bottom: 10px;
}

&__badge {
position: relative;
Expand Down
1 change: 0 additions & 1 deletion resources/css/bem/beatmap-discussions.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
@_timeline-colour: @osu-colour-b6;

.default-box-shadow();
margin-bottom: 10px;
background-color: @osu-colour-b4;
display: flex;
flex-direction: column;
Expand Down
4 changes: 0 additions & 4 deletions resources/css/bem/comments.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
background-color: hsl(var(--comments-bg-hsl));
color: var(--comments-fg);

@media @desktop {
margin-bottom: 10px;
}

&--page-extra {
--comments-bg-hsl: var(--hsl-b4);
--comments-pinned-bg-hsl: var(--hsl-b3);
Expand Down
4 changes: 0 additions & 4 deletions resources/css/bem/contest.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
background-color: @osu-colour-b5;
color: @osu-colour-c1;

@media @desktop {
margin-bottom: 10px;
}

&__description {
.default-gutter-v2();
.content-font();
Expand Down
2 changes: 1 addition & 1 deletion resources/css/bem/header-v4.less
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@

@media @desktop {
padding-top: @nav2-height + 15px;
min-height: (@nav2-height + 70px);
min-height: @header-container-min-height;
}

.@{_top}--supporter & {
Expand Down
9 changes: 7 additions & 2 deletions resources/css/bem/landing-sitemap.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
// See the LICENCE file in the repository root for full licence text.

.landing-sitemap {
text-align: center;
display: grid;
grid-gap: 10px;

@media @desktop {
text-align: left;
grid-template-columns: repeat(3, 1fr);
}

@media @mobile {
text-align: center;
}

&__header {
Expand Down
12 changes: 4 additions & 8 deletions resources/css/bem/osu-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@
&--with-gutter {
margin: -5px;
}

&--landing-sitemap {
width: 100%;
}
}

&__no-scroll {
Expand Down Expand Up @@ -116,14 +112,12 @@
}

&--page {
._page;
._page();
padding: 20px;
margin-bottom: 10px;
}

&--page-compact {
._page;
margin-bottom: 10px;
._page();
}

&--landing-sitemap {
Expand All @@ -136,13 +130,15 @@
&__section {
display: flex;
flex-direction: column;
margin-bottom: 10px;

&--full {
flex: 1 0 auto;
}

&--landing-footer {
margin-top: auto;
margin-bottom: 0;
flex: none;
.at2x("~@images/backgrounds/page-000.png", 500px, 500px);
}
Expand Down
35 changes: 13 additions & 22 deletions resources/css/bem/osu-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@
background-color: @_default-bg;
color: @_default-fg;
.default-box-shadow();
margin-bottom: 10px;
}

.page-width();
@media @desktop {
.page-width-desktop();
}

&--account-edit {
display: flex;
flex-direction: column;
gap: 5px;
}

&--account-edit-header {
.default-box-shadow();
}
Expand All @@ -32,7 +37,6 @@
.default-gutter-v2();
padding-top: 20px;
padding-bottom: 20px;
margin-bottom: 10px;
color: @osu-colour-c1;

h1, h3, h4 {
Expand Down Expand Up @@ -87,21 +91,15 @@
padding-bottom: $padding-top;
}

&--artists {
margin-bottom: 10px;
}

&--beatmapsets-search-header {
.default-box-shadow();
margin-bottom: 10px;
}

&--changelog {
.default;
.default();
background-color: @osu-colour-b4;
display: flex;
flex-direction: column;
margin-bottom: 0;
}

&--comment {
Expand All @@ -111,7 +109,6 @@
background-color: hsl(var(--comments-bg-hsl));
color: var(--comments-fg);
padding: 10px 0 0;
margin-bottom: 0;
}

&--comments {
Expand All @@ -124,7 +121,7 @@
}

&--contests {
.default;
.default();
}

&--description {
Expand All @@ -139,7 +136,6 @@
&--forum {
background-color: @osu-colour-b5;
color: @osu-colour-c1;
margin-bottom: 10px;
}

&--forum-topic {
Expand Down Expand Up @@ -189,7 +185,7 @@
}

&--generic-compact {
.default;
.default();
}

&--info-bar {
Expand Down Expand Up @@ -229,14 +225,10 @@
.default-box-shadow();
background-color: @osu-colour-b5;
color: @osu-colour-c1;

@media @desktop {
margin-bottom: 10px;
}
}

&--supporter {
.default;
.default();
display: flex;
flex-direction: column;
}
Expand All @@ -253,15 +245,14 @@
}

&--chat {
.default;
.default();

flex: 1 0 auto;
display: flex;
height: calc((var(--vh, 1vh) * 100) - (@nav2-height + 70px + 50px)); // viewport height - compact header+footer
margin-bottom: 0;
height: calc((var(--vh, 1vh) * 100) - (@header-container-min-height + 60px)); // viewport height - (header + footer + margins)

@media @mobile {
height: calc((var(--vh, 1vh) * 100) - 90px);
height: calc((var(--vh, 1vh) * 100) - var(--navbar-height));
}
}
}
1 change: 0 additions & 1 deletion resources/css/bem/search.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.default-box-shadow();
background-color: @osu-colour-b5;
padding: 10px 0;
margin-bottom: 10px;
display: flex;
flex-direction: column;
}
2 changes: 1 addition & 1 deletion resources/css/bem/store-products.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.store-products {
display: grid;
grid-gap: 10px;
padding: 10px;
padding: 10px 10px 0 10px; // remove bottom-margin from osu-layout__section

@media @desktop {
grid-template-columns: 1fr 1fr;
Expand Down
4 changes: 0 additions & 4 deletions resources/css/bem/tournament-list.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
padding-top: 20px;
padding-bottom: 20px;

@media @desktop {
margin-bottom: 10px;
}

&__heading {
color: white;
padding: 10px 0 10px;
Expand Down
4 changes: 0 additions & 4 deletions resources/css/bem/tournament.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
@_top: tournament;
background-color: @osu-colour-b5;

@media @desktop {
margin-bottom: 10px;
}

&__banner {
.at2x-simple-var(--tournament-header-banner);
}
Expand Down
1 change: 0 additions & 1 deletion resources/css/bem/user-home.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

@media @desktop {
padding: 0 @gutter-v2-desktop;
margin-bottom: 10px;
flex-direction: row;
align-items: flex-start;
}
Expand Down
1 change: 1 addition & 0 deletions resources/css/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@

@beatmapset-float-box-width: 275px;

@header-container-min-height: @nav2-height + 70px;
@header-title-height: 55px;

// top padding + menu + page title
Expand Down
2 changes: 1 addition & 1 deletion resources/views/accounts/_edit_legacy_api.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0.
See the LICENCE file in the repository root for full licence text.
--}}
<div class="account-edit">
<div class="account-edit" id="legacy-api">
<div class="account-edit__section">
<h2 class="account-edit__section-title">
{{ osu_trans('accounts.edit.legacy_api.title') }}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/accounts/_edit_notifications.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use App\Jobs\Notifications\BroadcastNotificationBase;
use App\Models\UserNotificationOption;
@endphp
<div class="account-edit">
<div class="account-edit" id="notifications">
<div class="account-edit__section">
<h2 class="account-edit__section-title">
{{ osu_trans('accounts.notifications.title') }}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/accounts/_edit_oauth.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0.
See the LICENCE file in the repository root for full licence text.
--}}
<div class="account-edit">
<div class="account-edit" id="oauth">
<div class="account-edit__section">
<h2 class="account-edit__section-title">
{{ osu_trans('accounts.oauth.title') }}
Expand Down
26 changes: 2 additions & 24 deletions resources/views/accounts/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@include('home._user_header_default', ['themeOverride' => 'settings'])

<div class="osu-page">
<div class="osu-page osu-page--account-edit">
<div class="account-edit account-edit--first">
<div class="account-edit__section">
<h2 class="account-edit__section-title">
Expand Down Expand Up @@ -66,10 +66,8 @@
</div>
</div>
</div>
</div>

<div class="osu-page" id="avatar">
<div class="account-edit">
<div class="account-edit" id="avatar">
<div class="account-edit__section">
<h2 class="account-edit__section-title">
{{ osu_trans('accounts.edit.avatar.title') }}
Expand Down Expand Up @@ -132,45 +130,25 @@ class="js-account-edit-avatar__button fileupload"
</div>
</div>
</div>
</div>

<div class="osu-page">
@include('accounts._edit_signature')
</div>

<div class="osu-page">
@include('accounts._edit_playstyles')
</div>

<div class="osu-page">
@include('accounts._edit_privacy')
</div>

<div class="osu-page" id="notifications">
@include('accounts._edit_notifications')
</div>

<div class="osu-page">
@include('accounts._edit_options')
</div>

<div class="osu-page">
@include('accounts._edit_password')
</div>

<div class="osu-page">
@include('accounts._edit_email')
</div>

<div class="osu-page">
@include('accounts._edit_sessions')
</div>

<div class="osu-page" id="oauth">
@include('accounts._edit_oauth')
</div>

<div class="osu-page" id="legacy-api">
@include('accounts._edit_legacy_api')
</div>
@endsection
Expand Down
Loading

0 comments on commit 36d197d

Please sign in to comment.