Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix styles

weronkab7f7e87bd1c5
diff --git a/saleor/static/scss/storefront/components/_cards.scss b/saleor/static/scss/storefront/components/_cards.scss
index b916c5cc58..ea32d2c9a6 100644
--- a/saleor/static/scss/storefront/components/_cards.scss
+++ b/saleor/static/scss/storefront/components/_cards.scss
@@ -52,4 +52,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/saleor/static/scss/storefront/components/_cart-dropdown.scss b/saleor/static/scss/storefront/components/_cart-dropdown.scss
index 867df3b079..34b66e3136 100644
--- a/saleor/static/scss/storefront/components/_cart-dropdown.scss
+++ b/saleor/static/scss/storefront/components/_cart-dropdown.scss
@@ -27,7 +27,6 @@
height: 5rem;
border-bottom: solid 1px $gray;
h3 {
- font-size: 1rem;
margin-bottom: 0;
padding: $global-padding * 1.4;
span {
diff --git a/saleor/static/scss/storefront/components/_forms.scss b/saleor/static/scss/storefront/components/_forms.scss
index 373e741830..5fe471b949 100644
--- a/saleor/static/scss/storefront/components/_forms.scss
+++ b/saleor/static/scss/storefront/components/_forms.scss
@@ -109,7 +109,10 @@
input#id_quantity {
min-width: 4rem;
- padding: 0.5rem;
+ padding: $global-padding / 2;
+ &:focus {
+ outline: none;
+ }
}
.help-block {
diff --git a/saleor/static/scss/storefront/components/_typography.scss b/saleor/static/scss/storefront/components/_typography.scss
index d693190aa3..9ff8d8fe40 100644
--- a/saleor/static/scss/storefront/components/_typography.scss
+++ b/saleor/static/scss/storefront/components/_typography.scss
@@ -42,4 +42,4 @@ a {
text-decoration: none;
}
}
-}
\ No newline at end of file
+}
diff --git a/saleor/static/scss/storefront/layouts/_cart.scss b/saleor/static/scss/storefront/layouts/_cart.scss
index f733a98f51..66bd81d266 100644
--- a/saleor/static/scss/storefront/layouts/_cart.scss
+++ b/saleor/static/scss/storefront/layouts/_cart.scss
@@ -37,13 +37,6 @@
&__quantity {
form {
display: inline-block;
- input {
- width: 4rem;
- padding: $global-padding / 2;
- &:focus {
- outline: none;
- }
- }
}
&-error {
display: block;
diff --git a/saleor/static/scss/storefront/layouts/_checkout.scss b/saleor/static/scss/storefront/layouts/_checkout.scss
index 0a10d2fce1..8052d35857 100644
--- a/saleor/static/scss/storefront/layouts/_checkout.scss
+++ b/saleor/static/scss/storefront/layouts/_checkout.scss
@@ -52,17 +52,12 @@
text-align: center;
h3 {
margin-bottom: $global-margin * 3;
- text-transform: uppercase;
}
.btn {
margin: $global-margin * 2 auto 0;
- padding: $global-padding / 2 $global-padding * 2.5;
}
&__continue {
padding: $global-padding * 2 0 $global-padding;
- p {
- font-size: 0.8rem;
- }
}
&__form {
background-color: $light-gray;
@@ -105,7 +100,6 @@
margin-top: $global-margin * 3;
}
h3 {
- text-transform: uppercase;
margin-bottom: $global-margin * 3;
}
.btn {
diff --git a/saleor/static/scss/storefront/layouts/_login.scss b/saleor/static/scss/storefront/layouts/_login.scss
index b4a0333f76..8e0d5486cb 100644
--- a/saleor/static/scss/storefront/layouts/_login.scss
+++ b/saleor/static/scss/storefront/layouts/_login.scss
@@ -49,29 +49,29 @@
display: block;
}
}
-}
-
-.forgott-password {
- h2 {
- font-size: 2rem;
- padding-top: $global-padding*2;
- font-weight: 300;
- }
- p {
- font-size: 1rem;
- padding-top: $global-padding;
- }
- fieldset {
- max-width: 60%;
- margin: auto;
- padding-bottom: $global-padding;
- @include media-breakpoint-down(sm) {
- max-width: 80%;
- }
- }
- .login__btn-group {
- img {
+ &__forgott-password {
+ h2 {
padding-top: $global-padding * 2;
+ text-transform: uppercase;
+ }
+ p {
+ font-size: 1rem;
+ padding-top: $global-padding;
+ }
+ fieldset {
+ max-width: 60%;
+ margin: auto;
+ padding-bottom: $global-padding;
+ @include media-breakpoint-down(sm) {
+ max-width: 80%;
+ }
+ }
+ .login__btn-group {
+ img {
+ padding-top: $global-padding * 2;
+ }
}
}
}
+
+
diff --git a/saleor/static/scss/storefront/layouts/_order-details.scss b/saleor/static/scss/storefront/layouts/_order-details.scss
index 2f0b244c0d..3e84e3cf3d 100644
--- a/saleor/static/scss/storefront/layouts/_order-details.scss
+++ b/saleor/static/scss/storefront/layouts/_order-details.scss
@@ -5,36 +5,24 @@
&__addresses {
margin-top: $global-margin * 2;
}
- &__table-header {
- color: $gray;
- padding-bottom: $global-padding / 2;
- margin-top: $global-margin * 2;
- .col-md-3 {
- text-align: right;
- }
- > .row {
- border-bottom: 1px solid $light-gray;
- }
- }
- &__table {
- @include media-breakpoint-down(sm) {
- margin-top: $global-margin * 3;
- }
- span {
- color: $gray;
- }
+ &__product {
a {
- img {
- margin-right: $global-margin;
+ transition: 0.3s;
+ &:hover {
+ color: $skull-gray;
}
p {
- color: $body-color;
+ display: inline-block;
+ margin-top: $global-margin / 2;
+ margin-bottom: 0;
+ line-height: 1rem;
+ small {
+ color: $skull-gray;
+ }
}
- }
- .row {
- padding: $global-padding / 2 0;
- &:not(:last-of-type) {
- border-bottom: 1px solid $light-gray;
+ img {
+ vertical-align: top;
+ margin-right: $global-margin;
}
}
}
diff --git a/saleor/static/scss/storefront/layouts/_styleguide.scss b/saleor/static/scss/storefront/layouts/_styleguide.scss
index 78bf669e56..0f0cd0a7f1 100644
--- a/saleor/static/scss/storefront/layouts/_styleguide.scss
+++ b/saleor/static/scss/storefront/layouts/_styleguide.scss
@@ -89,4 +89,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/saleor/static/scss/storefront/layouts/_userprofile.scss b/saleor/static/scss/storefront/layouts/_userprofile.scss
index 76c4f11769..13dbc6849e 100644
--- a/saleor/static/scss/storefront/layouts/_userprofile.scss
+++ b/saleor/static/scss/storefront/layouts/_userprofile.scss
@@ -2,7 +2,6 @@
h2 {
text-align: center;
text-transform: uppercase;
- font-size: 1.4rem;
}
&__user {
h2 {
@@ -12,7 +11,6 @@
img {
margin-top: $global-margin / 2;
}
-
}
&__nav {
margin: $global-margin * 2 0 $global-margin;
@@ -36,16 +34,10 @@
margin: 0;
}
&__address-edit {
- h1 {
+ h2 {
text-align: center;
- font-size: 1.3em;
text-transform: uppercase;
padding-bottom: $global-padding;
}
- .btn {
- padding: $global-padding / 2 $global-padding * 2;
- text-transform: uppercase;
- font-size: 1rem;
- }
}
}
diff --git a/saleor/static/scss/storefront/storefront.scss b/saleor/static/scss/storefront/storefront.scss
index 183bf84f02..bf27ee9515 100644
--- a/saleor/static/scss/storefront/storefront.scss
+++ b/saleor/static/scss/storefront/storefront.scss
@@ -1,29 +1,30 @@
@import "variables";
@import "~bootstrap/scss/bootstrap";
-@import "components/typography";
-@import "components/buttons";
-@import "components/labels";
-@import "components/pagination";
@import "components/breadcrumbs";
-@import "components/forms";
+@import "components/buttons";
+@import "components/cards";
@import "components/cart-dropdown";
-@import "components/header";
+@import "components/filters";
@import "components/footer";
-@import "layouts/home";
-@import "layouts/product-page";
+@import "components/forms";
+@import "components/header";
+@import "components/labels";
+@import "components/loader";
+@import "components/pagination";
+@import "components/table";
+@import "components/tabs";
+@import "components/typography";
+@import "components/variant-picker";
+
@import "layouts/cart";
-@import "layouts/userprofile";
-@import "layouts/login";
-@import "layouts/product-list";
-@import "layouts/checkout";
-@import "layouts/order-details";
@import "layouts/category-page";
+@import "layouts/checkout";
+@import "layouts/home";
+@import "layouts/login";
@import "layouts/no-results";
+@import "layouts/order-details";
+@import "layouts/product-list";
+@import "layouts/product-page";
@import "layouts/styleguide";
-@import "components/loader";
-@import "components/variant-picker";
-@import "components/filters";
-@import "components/tabs";
-@import "components/table";
-@import "components/cards";
+@import "layouts/userprofile";
diff --git a/templates/account/password_reset_done.html b/templates/account/password_reset_done.html
index 4b6a417480..0a7ff22ac5 100644
--- a/templates/account/password_reset_done.html
+++ b/templates/account/password_reset_done.html
@@ -7,7 +7,7 @@
{% block title %}{% trans "Password Reset" context "Password reset done page title" %}{% endblock %}
{% block form %}
- <div class="forgott-password">
+ <div class="ligin__forgott-password">
<h2>{% trans "Password Reset" context "Password reset done title" %}</h2>
{% if user.is_authenticated %}
{% include "account/partials/already_logged_in.html" %}
diff --git a/templates/category/_items.html b/templates/category/_items.html
index 21ad1c1f35..c548431a34 100644
--- a/templates/category/_items.html
+++ b/templates/category/_items.html
@@ -6,38 +6,35 @@
{% load get_thumbnail from product_images %}
{% for product, availability in products %}
- <div class="col-6 col-lg-3 product-list">
- <script type="application/ld+json">
- {% autoescape off %}{% product_availability_schema product %}{% endautoescape %}
- </script>
- <a href="{{ product.get_absolute_url }}" class="link--clean">
- <div class="text-center">
- <div>
- <img class="img-responsive"
- src="{% product_first_image product method="crop" size="255x255" %}"
- srcset="{% product_first_image product method="crop" size="255x255" %} 1x, {% product_first_image product method="crop" size="510x510" %} 2x"
- alt="">
- <span class="product-list-item-name" title="{{ product }}">{{ product }}</span>
- </div>
-
- <div class="panel-footer">
- {% if availability.available %}
- {% price_range availability.price_range %}
- {% if availability.discount %}
- {% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}
- <div class="product-list__sale"><img src="{% static "images/sale_bg.svg" %}">
- <span>
- {% comment %}Translators: Layout may break if character length is different than four.{% endcomment %}
- {% trans "Sale" context "Sale (discount) label for item in product list" %}
- </span>
- </div>
- {% endif %}
- {% endif %}
- {% else %}
- &nbsp;
- {% endif %}
- </div>
- </div>
- </a>
+<div class="col-6 col-lg-3 product-list">
+ <script type="application/ld+json">
+ {% autoescape off %}{% product_availability_schema product %}{% endautoescape %}
+ </script>
+ <a href="{{ product.get_absolute_url }}" class="link--clean">
+ <div class="text-center">
+ <div>
+ <img class="img-responsive" src="{% product_first_image product method="crop" size="400x400" %}" alt="">
+ <span class="product-list-item-name" title="{{ product }}">{{ product }}</span>
+ </div>
+
+ <div class="panel-footer">
+ {% if availability.available %}
+ {% price_range availability.price_range %}
+ {% if availability.discount %}
+ {% if availability.price_range_undiscounted.min_price != availability.price_range.min_price %}
+ <div class="product-list__sale"><img src="{% static "images/sale_bg.svg" %}">
+ <span>
+ {% comment %}Translators: Layout may break if character length is different than four.{% endcomment %}
+ {% trans "Sale" context "Sale (discount) label for item in product list" %}
+ </span>
+ </div>
+ {% endif %}
+ {% endif %}
+ {% else %}
+ &nbsp;
+ {% endif %}
+ </div>
</div>
+ </a>
+</div>
{% endfor %}
diff --git a/templates/checkout/login.html b/templates/checkout/login.html
index 77c63d3299..82f4b6259b 100644
--- a/templates/checkout/login.html
+++ b/templates/checkout/login.html
@@ -11,10 +11,10 @@
<h3>{% trans "New customer?" context "Checkout login page title" %}</h3>
<img class="checkout-pirate" src="{% static 'images/pirate_login.png' %}"
srcset="{% static 'images/pirate-checkout.png' %} 1x, {% static 'images/pirate-checkout2x.png' %} 2x">
- <p><a href="{% url 'checkout:index' %}" class="btn secondary">
+ <p><a href="{% url 'checkout:index' %}" class="btn secondary narrow">
{% trans "Continue" context "Checkout login page new users action" %}
</a></p>
- <p>{% trans "Registration is not required!" context "Checkout login page new users message" %}</p>
+ <small>{% trans "Registration is not required!" context "Checkout login page new users message" %}</small>
</div>
</div>
<div class="col-12 col-md-6 checkout__login__form">
diff --git a/templates/checkout/shipping_method.html b/templates/checkout/shipping_method.html
index 647004426d..febeefa6e1 100644
--- a/templates/checkout/shipping_method.html
+++ b/templates/checkout/shipping_method.html
@@ -6,9 +6,7 @@
{% block forms %}
<h3>{% trans "Shipping address" context "Checkout shipping address title" %}</h3>
{% include "userprofile/snippets/address-short.html" with address=checkout.shipping_address only %}
- <p class="checkout__edit-link">
- <a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a>
- </p>
+ <p><a href="{% url 'checkout:shipping-address' %}">{% trans "Select other address" %}</a></p>
<hr>
<form method="post" novalidate>
{% csrf_token %}
diff --git a/templates/order/order-details.html b/templates/order/order-details.html
index 534f893b79..213d1e06ef 100644
--- a/templates/order/order-details.html
+++ b/templates/order/order-details.html
@@ -25,19 +25,19 @@
</div>
</div>
{% endif %}
-<div class="order-details__table-header hidden-sm-down">
+<div class="table__header hidden-sm-down">
<div class="row">
<div class="col-md-6">
<small>
{% trans "Product" context "Order details column title" %}
</small>
</div>
- <div class="col-md-3">
+ <div class="col-md-3 text-right">
<small>
{% trans "Quantity" context "Order details column title" %}
</small>
</div>
- <div class="col-md-3">
+ <div class="col-md-3 text-right">
<small>
{% trans "Price" context "Order details column title" %}
</small>
@@ -45,7 +45,6 @@
</div>
</div>
-<div class="order-details__table">
{% for item in order %}
{% for item_line in item %}
<div class="row">
@@ -114,4 +113,4 @@
</div>
</div>
{% endfor %}
-</div>
+
diff --git a/templates/search/results.html b/templates/search/results.html
index 2df3da2ffe..65f3cd3ec9 100644
--- a/templates/search/results.html
+++ b/templates/search/results.html
@@ -21,7 +21,7 @@
{% block content %}
<div class="row home__featured">
- <div class="col-sm-12">
+ <div class="col-12">
{% if query and results %}
<div class="row">
{% include "category/_items.html" with products=results %}
diff --git a/templates/userprofile/address-edit.html b/templates/userprofile/address-edit.html
index 478222509b..e2bc995ecc 100644
--- a/templates/userprofile/address-edit.html
+++ b/templates/userprofile/address-edit.html
@@ -34,13 +34,13 @@
<div class="col-sm-8 col-lg-6 offset-sm-2 offset-lg-3">
<form method="post" novalidate>
{% csrf_token %}
- <h1 class="text-xs-center">
+ <h2 class="text-xs-center">
{% if address_form.instance.pk %}
{% trans "Edit address" context "Edit address title" %}
{% else %}
{% trans "New address" context "New address title" %}
{% endif %}
- </h1>
+ </h2>
<div class="userprofile__address-edit__form">
{% include "userprofile/snippets/address-form.html" %}
</div>