Implement background-position keyword values

Also fixes calculation of background-position percentages:

Rather than multiplying the container size by a percent and aligning the top
left of the image at the resulting width, we also need to subtract a
corresponding percent of the image size, per
http://dev.w3.org/csswg/css2/colors.html#propdef-background-position

"A value pair of '100% 100%' places the lower right corner of the image in the
lower right corner of the padding box. With a value pair of '14% 84%', the
point 14% across and 84% down the image is to be placed at the point 14%
across and 84% down the padding box."
This commit is contained in:
Matt Brubeck 2014-09-11 17:12:25 -07:00
parent 66a7de750c
commit 6c9524b687
9 changed files with 258 additions and 50 deletions

View file

@ -67,6 +67,9 @@
== min_max_height_a.html min_max_height_b.html
== minimum_line_height_a.html minimum_line_height_b.html
== background_position_a.html background_position_b.html
== background_position_keyword.html background_position_b.html
== background_position_percent.html background_position_b.html
== background_position_shorthand.html background_position_shorthand_ref.html
== background_repeat_x_a.html background_repeat_x_b.html
== background_repeat_y_a.html background_repeat_y_b.html
== background_repeat_none_a.html background_repeat_none_b.html