Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Used flex instead of floats for header layout #1523

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion djangoproject/scss/_dark-mode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ html[data-theme="light"] .theme-toggle .theme-label-when-light {
line-height: 45px;
text-align: center;
margin: 4px 10px;
float: right;

@include respond-min(768px) {
display: none;
Expand Down
9 changes: 4 additions & 5 deletions djangoproject/scss/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -482,22 +482,24 @@ blockquote {
z-index: 0;

.container {
display: flex;
flex-direction: row;
@include respond-min(768px) {
position: relative;
}
}

.mobile-toggle {margin-left: auto}

.meta {
@include font-size(13);
color: var(--primary);
font-weight: 700;
width: auto;
float: left;
margin: 8px 0 0 10px;
display: none;

@include respond-min(1150px) {
float: left;
width: 200px;
display: block;
}
Expand All @@ -511,7 +513,6 @@ blockquote {
background: url(../img/logo-django.png) 0 0 no-repeat;
color: var(--white-color);
display: block;
float: left;
font-weight: 700;
margin: 10px;
overflow: hidden;
Expand All @@ -537,7 +538,6 @@ blockquote {
color: var(--menu);
cursor: pointer;
display: block;
float: right;
height: 45px;
line-height: 48px;
margin: 4px 10px;
Expand Down Expand Up @@ -571,7 +571,6 @@ blockquote {

@include respond-min(768px) {
width: auto;
float: right;
max-height: none; // always show menu on a desktop width
}

Expand Down
8 changes: 4 additions & 4 deletions djangoproject/templates/includes/header.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<div role="banner" id="top">
<div class="container">
<div class="container container--flex--wrap--mobile">
<a class="logo" href="{% url 'homepage' %}">Django</a>
<p class="meta">The web framework for perfectionists with deadlines.</p>
<div class="mobile-toggle">
{% include "includes/toggle_theme.html" %}
</div>
<button class="menu-button">
<i class="icon icon-reorder"></i>
<span class="visuallyhidden">Menu</span>
</button>
<div class="mobile-toggle">
{% include "includes/toggle_theme.html" %}
</div>
<div role="navigation">
<ul>
<li{% if 'start' in request.path %} class="active"{% endif %}>
Expand Down
Loading