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

CSS properties background-size & background-position don't seem to work. #11304

Closed
Gozala opened this issue May 20, 2016 · 2 comments
Closed

CSS properties background-size & background-position don't seem to work. #11304

Gozala opened this issue May 20, 2016 · 2 comments

Comments

@Gozala
Copy link
Contributor

@Gozala Gozala commented May 20, 2016

Here is the an html file that can be used to reproduce the issue:

<style>
.progress {
  display: block;
  width: 100%;
  height: 40px;
  overflow: hidden;

  background-color: inherit;
  background-image: linear-gradient(135deg, #4A90E2 calc(100% - 40px), transparent calc(100% - 40px));
  background-size: 0;
  background-position: 0 20px;
  background-repeat: no-repeat;
}

.progress .value {
  display: block;
  width: calc(100% + 40px);
  height: inherit;
  background-color: inherit;
  background-image: inherit;
  outline: 1px solid red;
}

</style>
<div class="progress" max="100" value="80">
  <div class="value" style="transform: translateX(-20%)"></div>
</div>

above page in servo renders as:

screen shot 2016-05-20 at 9 54 22 am

In other engines it renders as:

screen shot 2016-05-20 at 9 55 16 am

Difference is that other engines take background-size: 0 into account and there for outer elements background is not displayed while inner element's is.

Now removing background-size property reveals another issue, which is background-position is also not taken into account. In servo removing background-size has no effect. while in other engines it renders as follows:

screen shot 2016-05-20 at 10 04 24 am

One more odd behavior observed in servo is revealed by resizing window, when window size is increased at some point .progress element seems to overflow under something not sure under what or why though.

@nox
Copy link
Member

@nox nox commented Oct 1, 2017

This still happens.

@nox nox added the C-reproduced label Oct 1, 2017
@pyfisch
Copy link
Contributor

@pyfisch pyfisch commented Dec 16, 2017

This now renders in servo like in other engines. See #19554.

@jdm jdm closed this Dec 18, 2017
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
5 participants
You can’t perform that action at this time.