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

Outline drawing behavior for boxes with negative sizes #21138

Open
CYBAI opened this issue Jul 8, 2018 · 0 comments
Open

Outline drawing behavior for boxes with negative sizes #21138

CYBAI opened this issue Jul 8, 2018 · 0 comments

Comments

@CYBAI
Copy link
Collaborator

@CYBAI CYBAI commented Jul 8, 2018

Refer to w3c/csswg-drafts#2892

Here's the Servo (built with bd0c001) screenshot

First Case

default

HTML:

<html>
  <head>
    <style>
html {
  display: table;
  height: 100%;
  width: 100%;
}

body {
  display: table-cell;
  vertical-align: middle;
}

div {
  margin: auto;
  width: 100px;
  height: 100px;
  outline: inset 100px green;
  outline-offset: -125px;
}
   </style>
  </head>
  <body>
    <div></div>
  </body>
</html>

Second Case

default

<html>
  <head>
    <style>
html {
  display: table;
  height: 100%;
  width: 25px;
  margin: auto;
}

body {
  display: table-cell;
  vertical-align: middle;
}

div::before {
	line-height: 25px;
	font-size: 25px;
	content: "  ";
	background: white;
}
div {
	display: inline;
	outline: 25px ridge white;
	outline-offset: -40px;
	border: 25px dotted #ABABAB;
}
    </style>
  </head>
  <body>
    <div></div>
  </body>
</html>
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
2 participants
You can’t perform that action at this time.