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

:before element with padding/margin is pushing text to new line #19405

Open
ocerman opened this issue Nov 28, 2017 · 1 comment
Open

:before element with padding/margin is pushing text to new line #19405

ocerman opened this issue Nov 28, 2017 · 1 comment

Comments

@ocerman
Copy link

@ocerman ocerman commented Nov 28, 2017

It only happends when parent has property display set to inline-block and :before element has padding-right or margin-right.

before

<!DOCTYPE html>
<html>
	<head>
		<style>
			div{
				display: inline-block;
				background: lightgrey;
				padding: 1em;
			}
			
			div:before{
				content: '>';
				padding-right: 1em; /* or margin-right: 1em; */
			}
		</style>
	</head>
	<body>
		<div>Servo</div>
	</body>
</html>
@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Feb 4, 2018

I cannot reproduce the issue with latest upstream master (7c112c7)

image

Instead, I think padding of the div is not shown correctly.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.