Skip to content

Commit 93e4a04

Browse files
authored
Fix IE flexbox bugs (#1552)
### Changes This PR fixes - Inconsistent padding across screens after #1547 ![image](https://user-images.githubusercontent.com/941075/48504661-7f7e7880-e82c-11e8-8ec9-5c5292ae1f0b.png) - IE glitches after we added flexbox in #1539 (the actual issues were: https://github.com/philipwalton/flexbugs#flexbug-3, https://github.com/philipwalton/flexbugs#flexbug-4 and https://github.com/philipwalton/flexbugs#flexbug-6) ![image](https://user-images.githubusercontent.com/941075/48504602-65dd3100-e82c-11e8-9cf0-69980328ebc2.png) # GIFs (it's not JIF) ## IE 10 ![ie10](https://user-images.githubusercontent.com/941075/48504817-cf5d3f80-e82c-11e8-9794-5608a8a5a3ca.gif) ## IE 11 ![ie11](https://user-images.githubusercontent.com/941075/48504894-fa479380-e82c-11e8-952a-0344370a433e.gif) ## Edge 17 ![edge17](https://user-images.githubusercontent.com/941075/48505076-5b6f6700-e82d-11e8-86be-969287b1cd06.gif) ## Firefox ![firefox](https://user-images.githubusercontent.com/941075/48505083-5f9b8480-e82d-11e8-900c-3ba69e6e2e12.gif) ## Safari ![safari](https://user-images.githubusercontent.com/941075/48505320-ee100600-e82d-11e8-9de2-427ea14b56fd.gif) ## Chrome ![chrome](https://user-images.githubusercontent.com/941075/48505322-ef413300-e82d-11e8-80c5-5acd333c17d6.gif) ## Pixel 2 ![pixel2](https://user-images.githubusercontent.com/941075/48505549-7393b600-e82e-11e8-8f30-0081aa36119c.gif) ## Galaxy S9 ![galaxys9](https://user-images.githubusercontent.com/941075/48505555-77273d00-e82e-11e8-8406-ec573bb5df88.gif) ## iPhone 7 ![iphone7](https://user-images.githubusercontent.com/941075/48505730-e9981d00-e82e-11e8-9dfe-963b526ead83.gif) ## iPhone X ![iphonex](https://user-images.githubusercontent.com/941075/48505736-ebfa7700-e82e-11e8-85c4-bb6fd75fbc04.gif)
1 parent 13271e2 commit 93e4a04

File tree

9 files changed

+110
-128
lines changed

9 files changed

+110
-128
lines changed

css/index.styl

+20-15
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,12 @@ loadingSize = 30px
132132

133133
.auth0-lock-cred-pane
134134
background white
135-
height: 100%
136-
min-height: 100%
137-
display: flex
138-
flex-direction: column
139135
border-radius 6px
140136
position relative
141-
white-space: nowrap
137+
display: flex;
138+
flex-direction: column;
139+
height: 100%
140+
min-height: 100%
142141

143142
&.horizontal-fade-exit
144143
.auth0-lock-content, .auth0-lock-terms
@@ -147,8 +146,12 @@ loadingSize = 30px
147146

148147
&.auth0-lock-moving
149148
overflow hidden
150-
151-
149+
.auth0-lock-cred-pane-internal-wrapper
150+
display: flex
151+
flex-direction: column
152+
height: 100%
153+
min-height: 100%
154+
152155
// Lock header content
153156

154157

@@ -168,9 +171,8 @@ loadingSize = 30px
168171
justify-content: center
169172

170173
.auth0-lock-content-wrapper
171-
flex: 1
174+
flex-grow: 1
172175
flex-shrink: 0
173-
overflow: scroll
174176

175177
.auth0-lock-close-button, .auth0-lock-back-button
176178
-webkit-box-sizing content-box !important
@@ -311,9 +313,9 @@ loadingSize = 30px
311313
box-sizing border-box
312314

313315
.auth0-lock-form
314-
display initial
315316
-webkit-animation fadeIn .2s
316317
animation fadeIn .2s
318+
padding 20px
317319

318320
h2
319321
font-size 22px
@@ -497,6 +499,7 @@ loadingSize = 30px
497499
width: 38px
498500

499501
.auth0-lock-social-button-icon
502+
box-sizing: content-box
500503
width 40px
501504
height 40px
502505
position absolute
@@ -642,9 +645,7 @@ loadingSize = 30px
642645
transition-duration .5s
643646

644647
.auth0-lock-submit-container
645-
flex: 1
646648
flex-shrink: 0
647-
overflow: scroll
648649

649650
.auth0-loading-container
650651
position relative
@@ -1099,8 +1100,11 @@ loadingSize = 30px
10991100
// database mode
11001101

11011102
.auth0-lock.auth0-lock
1102-
.auth0-lock-internal-content-wrapper
1103-
padding 20px
1103+
.auth0-lock-tabs-container
1104+
margin-left -20px
1105+
margin-right -20px
1106+
margin-top -20px
1107+
margin-bottom 20px
11041108
.auth0-lock-tabs
11051109
background white
11061110
padding 0
@@ -1248,6 +1252,7 @@ loadingSize = 30px
12481252
color red
12491253
font-size 12px
12501254
margin-top 5px
1255+
white-space nowrap
12511256

12521257
+breakpoint("mobile")
12531258
color black
@@ -1284,7 +1289,7 @@ loadingSize = 30px
12841289

12851290
.auth0-lock .auth0-loading-screen
12861291
min-height 42px
1287-
padding 20px
1292+
box-sizing border-box
12881293
@media screen and (max-width: 480px)
12891294
position absolute
12901295
top "calc(50vh - %s)" % headerHeight

src/__tests__/engine/classic/__snapshots__/login.test.jsx.snap

+8-24
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ exports[`LoginScreen renders LoginPane when SSO is enabled 1`] = `
77
>
88
ssoEnabled
99
</div>
10-
<div
11-
className="auth0-lock-internal-content-wrapper"
12-
>
10+
<div>
1311
<div
1412
data-__type="login_pane"
1513
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -34,9 +32,7 @@ exports[`LoginScreen renders LoginPane when SSO is enabled 1`] = `
3432

3533
exports[`LoginScreen renders LoginPane when has database connection 1`] = `
3634
<div>
37-
<div
38-
className="auth0-lock-internal-content-wrapper"
39-
>
35+
<div>
4036
<div
4137
data-__type="login_pane"
4238
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -61,9 +57,7 @@ exports[`LoginScreen renders LoginPane when has database connection 1`] = `
6157

6258
exports[`LoginScreen renders LoginPane when has enterprise connection 1`] = `
6359
<div>
64-
<div
65-
className="auth0-lock-internal-content-wrapper"
66-
>
60+
<div>
6761
<div
6862
data-__type="login_pane"
6963
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -95,9 +89,7 @@ exports[`LoginScreen renders LoginSignUpTabs when database connection is enabled
9589
data-signUpLabel="signUpLabel"
9690
data-signUpLink={false}
9791
/>
98-
<div
99-
className="auth0-lock-internal-content-wrapper"
100-
>
92+
<div>
10193
<div
10294
data-__type="login_pane"
10395
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -122,9 +114,7 @@ exports[`LoginScreen renders LoginSignUpTabs when database connection is enabled
122114

123115
exports[`LoginScreen renders LoginSignUpTabs when social connection is enabled and has initial screen signUp and has screen signUp 1`] = `
124116
<div>
125-
<div
126-
className="auth0-lock-internal-content-wrapper"
127-
>
117+
<div>
128118
<div
129119
data-__type="login_pane"
130120
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -154,9 +144,7 @@ exports[`LoginScreen renders SingleSignOnNotice when SSO is enabled 1`] = `
154144
>
155145
ssoEnabled
156146
</div>
157-
<div
158-
className="auth0-lock-internal-content-wrapper"
159-
>
147+
<div>
160148
<div
161149
data-__type="login_pane"
162150
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -181,9 +169,7 @@ exports[`LoginScreen renders SingleSignOnNotice when SSO is enabled 1`] = `
181169

182170
exports[`LoginScreen renders SocialButtonsPane when has social connections 1`] = `
183171
<div>
184-
<div
185-
className="auth0-lock-internal-content-wrapper"
186-
>
172+
<div>
187173
<div
188174
data-__type="social_buttons_pane"
189175
data-bigButtons={false}
@@ -199,8 +185,6 @@ exports[`LoginScreen renders SocialButtonsPane when has social connections 1`] =
199185

200186
exports[`LoginScreen renders empty div by default 1`] = `
201187
<div>
202-
<div
203-
className="auth0-lock-internal-content-wrapper"
204-
/>
188+
<div />
205189
</div>
206190
`;

src/__tests__/engine/classic/__snapshots__/sign_up_screen.test.jsx.snap

+7-21
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
exports[`SignUpScreen disables SocialButtonsPane when terms were not accepted 1`] = `
44
<div>
5-
<div
6-
className="auth0-lock-internal-content-wrapper"
7-
>
5+
<div>
86
<div
97
data-__type="social_buttons_pane"
108
data-bigButtons={false}
@@ -26,17 +24,13 @@ exports[`SignUpScreen renders LoginSignUpTabs SSO is disabled and has screen log
2624
data-loginLabel="loginLabel"
2725
data-signUpLabel="signUpLabel"
2826
/>
29-
<div
30-
className="auth0-lock-internal-content-wrapper"
31-
/>
27+
<div />
3228
</div>
3329
`;
3430

3531
exports[`SignUpScreen renders SignUpPane when has database connection 1`] = `
3632
<div>
37-
<div
38-
className="auth0-lock-internal-content-wrapper"
39-
>
33+
<div>
4034
<div
4135
data-__type="sign_up_pane"
4236
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -60,9 +54,7 @@ exports[`SignUpScreen renders SignUpPane when has database connection 1`] = `
6054

6155
exports[`SignUpScreen renders SignUpPane when has enterprise connection 1`] = `
6256
<div>
63-
<div
64-
className="auth0-lock-internal-content-wrapper"
65-
>
57+
<div>
6658
<div
6759
data-__type="sign_up_pane"
6860
data-emailInputPlaceholder="emailInputPlaceholder"
@@ -91,17 +83,13 @@ exports[`SignUpScreen renders SingleSignOnNotice when SSO is enabled and has scr
9183
>
9284
ssoEnabled
9385
</div>
94-
<div
95-
className="auth0-lock-internal-content-wrapper"
96-
/>
86+
<div />
9787
</div>
9888
`;
9989

10090
exports[`SignUpScreen renders SocialButtonsPane when has social connections 1`] = `
10191
<div>
102-
<div
103-
className="auth0-lock-internal-content-wrapper"
104-
>
92+
<div>
10593
<div
10694
data-__type="social_buttons_pane"
10795
data-bigButtons={false}
@@ -117,8 +105,6 @@ exports[`SignUpScreen renders SocialButtonsPane when has social connections 1`]
117105

118106
exports[`SignUpScreen renders empty div by default 1`] = `
119107
<div>
120-
<div
121-
className="auth0-lock-internal-content-wrapper"
122-
/>
108+
<div />
123109
</div>
124110
`;

src/engine/classic/login.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const Component = ({ i18n, model }) => {
9999
<div>
100100
{ssoNotice}
101101
{tabs}
102-
<div className="auth0-lock-internal-content-wrapper">
102+
<div>
103103
{social}
104104
{separator}
105105
{login}

src/engine/classic/sign_up_screen.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const Component = ({ i18n, model }) => {
7474
<div>
7575
{ssoNotice}
7676
{tabs}
77-
<div className="auth0-lock-internal-content-wrapper">
77+
<div>
7878
{social}
7979
{separator}
8080
{db}

src/engine/passwordless/social_or_email_login_screen.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const Component = ({ i18n, model }) => {
4444
const separator = social && email ? <PaneSeparator /> : null;
4545

4646
return (
47-
<div className="auth0-lock-internal-content-wrapper">
47+
<div>
4848
{social}
4949
{separator}
5050
{header}

src/engine/passwordless/social_or_phone_number_login_screen.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const Component = ({ i18n, model }) => {
4141
const separator = social && phoneNumber ? <PaneSeparator /> : null;
4242

4343
return (
44-
<div className="auth0-lock-internal-content-wrapper">
44+
<div>
4545
{social}
4646
{separator}
4747
{phoneNumber}

0 commit comments

Comments
 (0)