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

Background image not covering entire page if custom image used for Login page #2597

Closed
ai-matulis opened this issue Nov 30, 2018 · 4 comments

Comments

@ai-matulis
Copy link

Background position is set to auto instead of cover if custom image used for Login page

	<Login
		loginForm={<MyLoginForm />}
		backgroundImage='https://source.unsplash.com/1600x900/?traffic,road'
		{...props}
	/>

Fix:

In Login.js replace
this.containerRef.current.style.background = url(${backgroundImage});
with
this.containerRef.current.style.backgroundImage = url(${backgroundImage});

Environment

  • React-admin version: 2.5.0
@ai-matulis ai-matulis changed the title Background is not 'cover' if custom image used for Login page Background image not covering entire page if custom image used for Login page Nov 30, 2018
@ai-matulis
Copy link
Author

Fixed in 2.5.1

@fzaninotto
Copy link
Member

yep, sorry for the temporary regression.

@antoniorrm
Copy link

antoniorrm commented Dec 21, 2018

not work in my project.

@fzaninotto
Copy link
Member

@antoniorrm As it works on master, we can't reproduce your problem. Please provide a link to a CodeSandbox reproducing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants