-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* decoupling clearbit * prevent multiple submits * prevent multiple submits * uptimizing css for country
- Loading branch information
Showing
25 changed files
with
967 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
292 changes: 289 additions & 3 deletions
292
src/Blocks/components/country/country-frontend-mandatory.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,291 @@ | ||
@import './country-style'; | ||
.choices__item { | ||
$countries: ( | ||
ac, | ||
ad, | ||
ae, | ||
af, | ||
ag, | ||
ai, | ||
al, | ||
am, | ||
ao, | ||
aq, | ||
ar, | ||
as, | ||
at, | ||
au, | ||
aw, | ||
ax, | ||
az, | ||
ba, | ||
bb, | ||
bd, | ||
be, | ||
bf, | ||
bg, | ||
bh, | ||
bi, | ||
bj, | ||
bl, | ||
bm, | ||
bn, | ||
bo, | ||
bq, | ||
br, | ||
bs, | ||
bt, | ||
bv, | ||
bw, | ||
by, | ||
bz, | ||
ca, | ||
cc, | ||
cd, | ||
cf, | ||
cg, | ||
ch, | ||
ci, | ||
ck, | ||
cl, | ||
cm, | ||
cn, | ||
co, | ||
cp, | ||
cr, | ||
cu, | ||
cv, | ||
cw, | ||
cx, | ||
cy, | ||
cz, | ||
de, | ||
dg, | ||
dj, | ||
dk, | ||
dm, | ||
do, | ||
dz, | ||
ea, | ||
ec, | ||
ee, | ||
eg, | ||
eh, | ||
er, | ||
es, | ||
et, | ||
eu, | ||
fi, | ||
fj, | ||
fk, | ||
fm, | ||
fo, | ||
fr, | ||
ga, | ||
gb, | ||
gd, | ||
ge, | ||
gf, | ||
gg, | ||
gh, | ||
gi, | ||
gl, | ||
gm, | ||
gn, | ||
gp, | ||
gq, | ||
gr, | ||
gs, | ||
gt, | ||
gu, | ||
gw, | ||
gy, | ||
hk, | ||
hm, | ||
hn, | ||
hr, | ||
ht, | ||
hu, | ||
ic, | ||
id, | ||
ie, | ||
il, | ||
im, | ||
in, | ||
io, | ||
iq, | ||
ir, | ||
is, | ||
it, | ||
je, | ||
jm, | ||
jo, | ||
jp, | ||
ke, | ||
kg, | ||
kh, | ||
ki, | ||
km, | ||
kn, | ||
kp, | ||
kr, | ||
kw, | ||
ky, | ||
kz, | ||
la, | ||
lb, | ||
lc, | ||
li, | ||
lk, | ||
lr, | ||
ls, | ||
lt, | ||
lu, | ||
lv, | ||
ly, | ||
ma, | ||
mc, | ||
md, | ||
me, | ||
mf, | ||
mg, | ||
mh, | ||
mk, | ||
ml, | ||
mm, | ||
mn, | ||
mo, | ||
mp, | ||
mq, | ||
mr, | ||
ms, | ||
mt, | ||
mu, | ||
mv, | ||
mw, | ||
mx, | ||
my, | ||
mz, | ||
na, | ||
nc, | ||
ne, | ||
nf, | ||
ng, | ||
ni, | ||
nl, | ||
no, | ||
np, | ||
nr, | ||
nu, | ||
nz, | ||
om, | ||
pa, | ||
pe, | ||
pf, | ||
pg, | ||
ph, | ||
pk, | ||
pl, | ||
pm, | ||
pn, | ||
pr, | ||
ps, | ||
pt, | ||
pw, | ||
py, | ||
qa, | ||
re, | ||
ro, | ||
rs, | ||
ru, | ||
rw, | ||
sa, | ||
sb, | ||
sc, | ||
sd, | ||
se, | ||
sg, | ||
sh, | ||
si, | ||
sj, | ||
sk, | ||
sl, | ||
sm, | ||
sn, | ||
so, | ||
sr, | ||
ss, | ||
st, | ||
sv, | ||
sx, | ||
sy, | ||
sz, | ||
ta, | ||
tc, | ||
td, | ||
tf, | ||
tg, | ||
th, | ||
tj, | ||
tk, | ||
tl, | ||
tm, | ||
tn, | ||
to, | ||
tr, | ||
tt, | ||
tv, | ||
tw, | ||
tz, | ||
ua, | ||
ug, | ||
um, | ||
un, | ||
us, | ||
uy, | ||
uz, | ||
va, | ||
vc, | ||
ve, | ||
vg, | ||
vi, | ||
vn, | ||
vu, | ||
wf, | ||
ws, | ||
xk, | ||
ye, | ||
yt, | ||
za, | ||
zm, | ||
zw, | ||
); | ||
|
||
.es-field--country { | ||
@extend %country-choices-icons; | ||
$width: 20px; | ||
$height: 15px; | ||
|
||
&::before { | ||
content: ''; | ||
background-image: url('../public/flags.png'); | ||
background-repeat: no-repeat; | ||
inline-size: $width; | ||
block-size: $height; | ||
vertical-align: middle; | ||
margin-inline-end: 10px; | ||
display: inline-block; | ||
} | ||
|
||
$i: 0; | ||
|
||
@each $country in $countries { | ||
&[data-country-code="#{$country}"]::before { | ||
background-position: -#{$i * $width} 0; | ||
} | ||
|
||
$i: $i + 1; | ||
} | ||
|
||
// If placeholder is used. | ||
&:not([data-country-code])::before { | ||
display: none !important; // stylelint-disable-line declaration-no-important | ||
} | ||
} |
Oops, something went wrong.