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

Do not fix width of manage project buttons #6549

Merged
merged 5 commits into from
Sep 4, 2019
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
22 changes: 14 additions & 8 deletions warehouse/static/sass/blocks/_package-snippet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@
padding: ($spacing-unit / 2) 20px ($spacing-unit / 2) 75px;
margin: 0 0 20px;

&,
&:hover {
// Use png fallback
background: $white url("../images/white-cube.png") no-repeat 0 50%;
// Or svg if the browser supports it
background-image: url("../images/white-cube.svg"), linear-gradient(transparent, transparent);
background-position: 20px;
@media only screen and (max-width: $tablet) {
padding: $spacing-unit / 2;
}

@media only screen and (min-width: $tablet + 1px) {
&,
&:hover {
// Use png fallback
background: $white url("../images/white-cube.png") no-repeat 0 50%;
// Or svg if the browser supports it
background-image: url("../images/white-cube.svg"), linear-gradient(transparent, transparent);
background-position: 20px;
}
}

&__title {
Expand Down Expand Up @@ -85,7 +91,7 @@
}

&__buttons {
width: 170px;
flex-shrink: 0;

.button {
display: inline-block;
Expand Down
9 changes: 9 additions & 0 deletions warehouse/static/sass/layout-helpers/_split-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,20 @@
@include split-table-layout;
}

&--no-wrap {
flex-wrap: nowrap;
align-items: center;
}

&--wrap-on-tablet {
@media only screen and (max-width: $tablet) {
flex-wrap: wrap;

> :first-child,
> :last-child {
display: block;
width: 100%;
padding: 0;
}

> :last-child {
Expand Down
2 changes: 1 addition & 1 deletion warehouse/templates/manage/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1 class="page-title">Your projects ({{ projects|length }})</h1>
{% for project in projects %}
{% set release = project.releases[0] if project.releases else None %}
<div class="package-snippet">
<div class="split-layout split-layout--table split-layout--wrap-on-tablet">
<div class="split-layout split-layout--no-wrap split-layout--wrap-on-tablet">
<div>
<h3 class="package-snippet__title">{{ project.name }}
{% if project.name in projects_sole_owned %}
Expand Down