Skip to content

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

Stylize PhonePrefixWidget

dominik-zeglen77cca38e6da5
diff --git a/saleor/static/images/arrow_select.svg b/saleor/static/images/arrow_select.svg
new file mode 100644
index 0000000000..cc3e09f51e
--- /dev/null
+++ b/saleor/static/images/arrow_select.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
+<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
+<g><path d="M500,10L227.8,391.1h544.4L500,10z M500,990l272.2-381.1H227.8L500,990z"/></g>
+</svg>
diff --git a/saleor/static/scss/components/_forms.scss b/saleor/static/scss/components/_forms.scss
index 662dd1702f..77a253193c 100644
--- a/saleor/static/scss/components/_forms.scss
+++ b/saleor/static/scss/components/_forms.scss
@@ -18,6 +18,23 @@
.form-group {
text-align: left;
position: relative;
+ .phone-prefix-input {
+ display: grid;
+ grid-template-columns: 6rem calc(100% - 6rem);
+ input {
+ border-left-color: transparent;
+ border: {
+ bottom-left-radius: 0;
+ top-left-radius: 0;
+ }
+ }
+ select {
+ border: {
+ bottom-right-radius: 0;
+ top-right-radius: 0;
+ }
+ }
+ }
}
.input-btn {
@@ -155,7 +172,5 @@ input#id_quantity {
select.form-control {
appearance: none;
border-radius: 2px;
- background-image: url('../images/arrow_select.svg');
- background-position: 100% 50%;
- background-repeat: no-repeat;
+ background: url('../images/arrow_select.svg') 100% 50% no-repeat / 24px 14px;
}
diff --git a/templates/userprofile/snippets/phone-prefix-widget.html b/templates/userprofile/snippets/phone-prefix-widget.html
index 90ed8199f1..dfbb05b2e6 100644
--- a/templates/userprofile/snippets/phone-prefix-widget.html
+++ b/templates/userprofile/snippets/phone-prefix-widget.html
@@ -1,4 +1,4 @@
-<div>
+<div class="phone-prefix-input">
{% for widget in widget.subwidgets %}
{% include widget.template_name %}
{% endfor %}