Commit Graph

8 Commits

Author SHA1 Message Date
Benjamin Otte
519af3f91d cssimage: Warn if gradients only have 1 color stop
GTK <= 3.20 allowed that but the CSS spec and borwsers do not.
We might want to just remove that feature, but for now, we just warn.
2016-04-18 20:52:35 +02:00
Benjamin Otte
a52ecd2be6 css: Add gtk_css_number_value_can_parse()
Use it instead of _gtk_css_parser_has_number().

We need that once we introduce calc() support.
2016-02-13 04:49:08 +01:00
Benjamin Otte
e2d966eda5 cssnumbervalue: Remove gtk_css_number_value_get_unit()
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
2016-02-13 04:49:07 +01:00
Benjamin Otte
0645425046 cssimageradial: Don't print 2 spaces 2016-02-13 04:49:07 +01:00
Benjamin Otte
0c12601208 cssimageradial: Only allow at "<position>" after other props
Don't allow syntax like
  at top left circle
but follow the spec about requiring the at <position> right before the
comma.

This is porbably because
  circle at 10px 10px
could be interpreted as
  circle 10px at 10px
with the now disallowed syntax, too.

Test included.
2016-02-05 19:31:47 +01:00
Benjamin Otte
982da040b2 cssimageradial: Only emit one error for wrong position
Test included.
2016-02-05 19:31:47 +01:00
Matthias Clasen
9e63e61b16 Implement transitions for radial gradients
This was missing in the initial implementation.
2016-01-07 16:30:19 -05:00
Matthias Clasen
f727ee5687 Implement CSS radial gradients
Implement parsing and drawing of radial gradients according to
http://www.w3.org/TR/css3-images/#radial-gradients.

Transitions are not implemented yet.
2016-01-04 13:59:24 -05:00