@@ -368,7 +368,7 @@ struct
368368 let a_fy = user_attrib string_of_coord " fy"
369369
370370 let a_offset x =
371- user_attrib C. string_of_number_or_percentage " offset" x
371+ user_attrib C. string_of_offset " offset" x
372372
373373 let a_patternUnits x =
374374 user_attrib C. string_of_big_variant " patternUnits" x
@@ -539,7 +539,7 @@ struct
539539 let a_animation_fill x =
540540 user_attrib C. string_of_big_variant " fill" x
541541
542- let a_fill_opacity = user_attrib C. string_of_number_or_percentage " fill-opacity"
542+ let a_fill_opacity = user_attrib C. string_of_opacity " fill-opacity"
543543
544544 let a_fill_rule = user_attrib C. string_of_fill_rule " fill-rule"
545545
@@ -713,9 +713,12 @@ struct
713713 let a_ontouchmove = Xml. touch_event_handler_attrib " ontouchmove"
714714 let a_ontouchcancel = Xml. touch_event_handler_attrib " ontouchcancel"
715715
716+
717+ let a_opacity = user_attrib C. string_of_opacity " opacity"
718+
716719 let a_stop_color = color_attrib " stop-color"
717720
718- let a_stop_opacity = user_attrib C. string_of_number " stop-opacity"
721+ let a_stop_opacity = user_attrib C. string_of_opacity " stop-opacity"
719722
720723 let a_stroke = user_attrib C. string_of_paint " stroke"
721724
@@ -737,7 +740,7 @@ struct
737740 user_attrib C. string_of_length " stroke-dashoffset"
738741
739742 let a_stroke_opacity =
740- user_attrib C. string_of_number " stroke-opacity"
743+ user_attrib C. string_of_opacity " stroke-opacity"
741744
742745 (* xlink namespace given a nickname since some attributes mandated by
743746 the svg standard such as xlink:href live in that namespace, and we
@@ -1106,7 +1109,7 @@ struct
11061109
11071110 let string_of_numbers_semicolon = list ~sep: " ; " string_of_number
11081111
1109- let string_of_number_or_percentage = function
1112+ let string_of_offset = function
11101113 | `Number x -> string_of_number x
11111114 | `Percentage x -> string_of_percentage x
11121115
@@ -1116,6 +1119,8 @@ struct
11161119
11171120 let string_of_paint = string_of_paint
11181121
1122+ let string_of_opacity = string_of_number
1123+
11191124 let string_of_fill_rule = string_of_fill_rule
11201125
11211126 let string_of_strokedasharray = function
0 commit comments