2 * Copyright © 2011 Red Hat Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Benjamin Otte <otte@gnome.org>
22 #include "gtkcssshorthandpropertyprivate.h"
24 #include <cairo-gobject.h>
27 #include "gtkcssarrayvalueprivate.h"
28 #include "gtkcsscornervalueprivate.h"
29 #include "gtkcssenumvalueprivate.h"
30 #include "gtkcssimageprivate.h"
31 #include "gtkcssimagevalueprivate.h"
32 #include "gtkcssnumbervalueprivate.h"
33 #include "gtkcssrepeatvalueprivate.h"
34 #include "gtkcssstringvalueprivate.h"
35 #include "gtkcssstylefuncsprivate.h"
36 #include "gtkcsstypesprivate.h"
37 #include "gtkcssvalueprivate.h"
38 #include "gtkprivatetypebuiltins.h"
39 #include "gtkstylepropertiesprivate.h"
40 #include "gtksymboliccolorprivate.h"
41 #include "gtktypebuiltins.h"
43 /* this is in case round() is not provided by the compiler,
44 * such as in the case of C89 compilers, like MSVC
46 #include "fallback-c89.c"
51 value_is_done_parsing (GtkCssParser *parser)
53 return _gtk_css_parser_is_eof (parser) ||
54 _gtk_css_parser_begins_with (parser, ';') ||
55 _gtk_css_parser_begins_with (parser, '}');
59 parse_four_numbers (GtkCssShorthandProperty *shorthand,
62 GtkCssNumberParseFlags flags)
66 for (i = 0; i < 4; i++)
68 if (!_gtk_css_parser_has_number (parser))
71 values[i] = _gtk_css_number_value_parse (parser, flags);
72 if (values[i] == NULL)
78 _gtk_css_parser_error (parser, "Expected a length");
84 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
91 parse_margin (GtkCssShorthandProperty *shorthand,
96 return parse_four_numbers (shorthand,
99 GTK_CSS_NUMBER_AS_PIXELS
100 | GTK_CSS_PARSE_LENGTH);
104 parse_padding (GtkCssShorthandProperty *shorthand,
105 GtkCssValue **values,
106 GtkCssParser *parser,
109 return parse_four_numbers (shorthand,
112 GTK_CSS_POSITIVE_ONLY
113 | GTK_CSS_NUMBER_AS_PIXELS
114 | GTK_CSS_PARSE_LENGTH);
118 parse_border_width (GtkCssShorthandProperty *shorthand,
119 GtkCssValue **values,
120 GtkCssParser *parser,
123 return parse_four_numbers (shorthand,
126 GTK_CSS_POSITIVE_ONLY
127 | GTK_CSS_NUMBER_AS_PIXELS
128 | GTK_CSS_PARSE_LENGTH);
132 parse_border_radius (GtkCssShorthandProperty *shorthand,
133 GtkCssValue **values,
134 GtkCssParser *parser,
137 GtkCssValue *x[4] = { NULL, }, *y[4] = { NULL, };
140 for (i = 0; i < 4; i++)
142 if (!_gtk_css_parser_has_number (parser))
144 x[i] = _gtk_css_number_value_parse (parser,
145 GTK_CSS_POSITIVE_ONLY
146 | GTK_CSS_PARSE_PERCENT
147 | GTK_CSS_NUMBER_AS_PIXELS
148 | GTK_CSS_PARSE_LENGTH);
155 _gtk_css_parser_error (parser, "Expected a number");
159 /* The magic (i - 1) >> 1 below makes it take the correct value
160 * according to spec. Feel free to check the 4 cases */
162 x[i] = _gtk_css_value_ref (x[(i - 1) >> 1]);
164 if (_gtk_css_parser_try (parser, "/", TRUE))
166 for (i = 0; i < 4; i++)
168 if (!_gtk_css_parser_has_number (parser))
170 y[i] = _gtk_css_number_value_parse (parser,
171 GTK_CSS_POSITIVE_ONLY
172 | GTK_CSS_PARSE_PERCENT
173 | GTK_CSS_NUMBER_AS_PIXELS
174 | GTK_CSS_PARSE_LENGTH);
181 _gtk_css_parser_error (parser, "Expected a number");
186 y[i] = _gtk_css_value_ref (y[(i - 1) >> 1]);
190 for (i = 0; i < 4; i++)
191 y[i] = _gtk_css_value_ref (x[i]);
194 for (i = 0; i < 4; i++)
196 values[i] = _gtk_css_corner_value_new (x[i], y[i]);
202 for (i = 0; i < 4; i++)
205 _gtk_css_value_unref (x[i]);
207 _gtk_css_value_unref (y[i]);
213 parse_border_color (GtkCssShorthandProperty *shorthand,
214 GtkCssValue **values,
215 GtkCssParser *parser,
218 GtkSymbolicColor *symbolic;
221 for (i = 0; i < 4; i++)
223 if (_gtk_css_parser_try (parser, "currentcolor", TRUE))
225 symbolic = gtk_symbolic_color_ref (_gtk_symbolic_color_get_current_color ());
229 symbolic = _gtk_css_parser_read_symbolic_color (parser);
230 if (symbolic == NULL)
234 values[i] = _gtk_css_value_new_take_symbolic_color (symbolic);
236 if (value_is_done_parsing (parser))
240 for (i++; i < 4; i++)
242 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
249 parse_border_style (GtkCssShorthandProperty *shorthand,
250 GtkCssValue **values,
251 GtkCssParser *parser,
256 for (i = 0; i < 4; i++)
258 values[i] = _gtk_css_border_style_value_try_parse (parser);
259 if (values[i] == NULL)
265 _gtk_css_parser_error (parser, "Expected a border style");
270 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
276 parse_border_image (GtkCssShorthandProperty *shorthand,
277 GtkCssValue **values,
278 GtkCssParser *parser,
283 if (values[0] == NULL &&
284 (_gtk_css_parser_has_prefix (parser, "none") ||
285 _gtk_css_image_can_parse (parser)))
289 if (_gtk_css_parser_try (parser, "none", TRUE))
293 image = _gtk_css_image_new_parse (parser, base);
298 values[0] = _gtk_css_image_value_new (image);
300 else if (values[3] == NULL &&
301 (values[3] = _gtk_css_border_repeat_value_try_parse (parser)))
303 /* please move along */
305 else if (values[1] == NULL)
307 GValue value = G_VALUE_INIT;
309 g_value_init (&value, GTK_TYPE_BORDER);
310 if (!_gtk_css_style_parse_value (&value, parser, base))
312 values[1] = _gtk_css_value_new_from_gvalue (&value);
313 g_value_unset (&value);
315 if (_gtk_css_parser_try (parser, "/", TRUE))
317 g_value_init (&value, GTK_TYPE_BORDER);
318 if (!_gtk_css_style_parse_value (&value, parser, base))
320 values[2] = _gtk_css_value_new_from_gvalue (&value);
321 g_value_unset (&value);
326 /* We parsed everything and there's still stuff left?
327 * Pretend we didn't notice and let the normal code produce
328 * a 'junk at end of value' error */
332 while (!value_is_done_parsing (parser));
338 parse_border_side (GtkCssShorthandProperty *shorthand,
339 GtkCssValue **values,
340 GtkCssParser *parser,
345 if (values[0] == NULL &&
346 _gtk_css_parser_has_number (parser))
348 values[0] = _gtk_css_number_value_parse (parser,
349 GTK_CSS_POSITIVE_ONLY
350 | GTK_CSS_NUMBER_AS_PIXELS
351 | GTK_CSS_PARSE_LENGTH);
352 if (values[0] == NULL)
355 else if (values[1] == NULL &&
356 (values[1] = _gtk_css_border_style_value_try_parse (parser)))
360 else if (values[2] == NULL)
362 GtkSymbolicColor *symbolic;
364 symbolic = _gtk_css_parser_read_symbolic_color (parser);
365 if (symbolic == NULL)
368 values[2] = _gtk_css_value_new_take_symbolic_color (symbolic);
371 while (!value_is_done_parsing (parser));
377 parse_border (GtkCssShorthandProperty *shorthand,
378 GtkCssValue **values,
379 GtkCssParser *parser,
384 if (values[0] == NULL &&
385 _gtk_css_parser_has_number (parser))
387 values[0] = _gtk_css_number_value_parse (parser,
388 GTK_CSS_POSITIVE_ONLY
389 | GTK_CSS_NUMBER_AS_PIXELS
390 | GTK_CSS_PARSE_LENGTH);
391 if (values[0] == NULL)
393 values[1] = _gtk_css_value_ref (values[0]);
394 values[2] = _gtk_css_value_ref (values[0]);
395 values[3] = _gtk_css_value_ref (values[0]);
397 else if (values[4] == NULL &&
398 (values[4] = _gtk_css_border_style_value_try_parse (parser)))
400 values[5] = _gtk_css_value_ref (values[4]);
401 values[6] = _gtk_css_value_ref (values[4]);
402 values[7] = _gtk_css_value_ref (values[4]);
404 else if (!G_IS_VALUE (&values[8]))
406 GtkSymbolicColor *symbolic;
408 symbolic = _gtk_css_parser_read_symbolic_color (parser);
409 if (symbolic == NULL)
412 values[8] = _gtk_css_value_new_take_symbolic_color (symbolic);
413 values[9] = _gtk_css_value_ref (values[8]);
414 values[10] = _gtk_css_value_ref (values[8]);
415 values[11] = _gtk_css_value_ref (values[8]);
419 /* We parsed everything and there's still stuff left?
420 * Pretend we didn't notice and let the normal code produce
421 * a 'junk at end of value' error */
425 while (!value_is_done_parsing (parser));
427 /* Note that border-image values are not set: according to the spec
428 they just need to be reset when using the border shorthand */
434 parse_font (GtkCssShorthandProperty *shorthand,
435 GtkCssValue **values,
436 GtkCssParser *parser,
439 PangoFontDescription *desc;
443 str = _gtk_css_parser_read_value (parser);
447 desc = pango_font_description_from_string (str);
450 mask = pango_font_description_get_set_fields (desc);
452 if (mask & PANGO_FONT_MASK_FAMILY)
454 values[0] = _gtk_css_array_value_new (_gtk_css_string_value_new (pango_font_description_get_family (desc)));
456 if (mask & PANGO_FONT_MASK_STYLE)
458 values[1] = _gtk_css_font_style_value_new (pango_font_description_get_style (desc));
460 if (mask & PANGO_FONT_MASK_VARIANT)
462 values[2] = _gtk_css_font_variant_value_new (pango_font_description_get_variant (desc));
464 if (mask & PANGO_FONT_MASK_WEIGHT)
466 values[3] = _gtk_css_font_weight_value_new (pango_font_description_get_weight (desc));
468 if (mask & PANGO_FONT_MASK_SIZE)
470 values[4] = _gtk_css_number_value_new ((double) pango_font_description_get_size (desc) / PANGO_SCALE, GTK_CSS_PX);
473 pango_font_description_free (desc);
479 parse_background (GtkCssShorthandProperty *shorthand,
480 GtkCssValue **values,
481 GtkCssParser *parser,
487 if (values[0] == NULL &&
488 (_gtk_css_parser_has_prefix (parser, "none") ||
489 _gtk_css_image_can_parse (parser)))
493 if (_gtk_css_parser_try (parser, "none", TRUE))
497 image = _gtk_css_image_new_parse (parser, base);
502 values[0] = _gtk_css_image_value_new (image);
504 else if (values[1] == NULL &&
505 (values[1] = _gtk_css_background_repeat_value_try_parse (parser)))
507 /* nothing to do here */
509 else if ((values[2] == NULL || values[3] == NULL) &&
510 (values[3] = _gtk_css_area_value_try_parse (parser)))
512 if (values[2] == NULL)
514 values[2] = values[3];
518 else if (values[4] == NULL)
520 GtkSymbolicColor *symbolic;
522 symbolic = _gtk_css_parser_read_symbolic_color (parser);
523 if (symbolic == NULL)
526 values[4] = _gtk_css_value_new_take_symbolic_color (symbolic);
530 /* We parsed everything and there's still stuff left?
531 * Pretend we didn't notice and let the normal code produce
532 * a 'junk at end of value' error */
536 while (!value_is_done_parsing (parser));
544 unpack_border (GtkCssShorthandProperty *shorthand,
545 GtkStyleProperties *props,
549 GValue v = G_VALUE_INIT;
550 GtkBorder *border = g_value_get_boxed (value);
552 g_value_init (&v, G_TYPE_INT);
554 g_value_set_int (&v, border->top);
555 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 0)), props, state, &v);
556 g_value_set_int (&v, border->right);
557 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 1)), props, state, &v);
558 g_value_set_int (&v, border->bottom);
559 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 2)), props, state, &v);
560 g_value_set_int (&v, border->left);
561 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 3)), props, state, &v);
567 pack_border (GtkCssShorthandProperty *shorthand,
569 GtkStyleQueryFunc query_func,
572 GtkCssStyleProperty *prop;
576 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 0);
577 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
579 border.top = _gtk_css_value_get_int (v);
580 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 1);
581 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
583 border.right = _gtk_css_value_get_int (v);
584 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 2);
585 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
587 border.bottom = _gtk_css_value_get_int (v);
588 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 3);
589 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
591 border.left = _gtk_css_value_get_int (v);
593 g_value_init (value, GTK_TYPE_BORDER);
594 g_value_set_boxed (value, &border);
598 unpack_border_radius (GtkCssShorthandProperty *shorthand,
599 GtkStyleProperties *props,
603 GtkCssValue *css_value;
606 css_value = _gtk_css_corner_value_new (_gtk_css_number_value_new (g_value_get_int (value), GTK_CSS_PX),
607 _gtk_css_number_value_new (g_value_get_int (value), GTK_CSS_PX));
609 for (i = 0; i < 4; i++)
610 _gtk_style_properties_set_property_by_property (props,
611 _gtk_css_shorthand_property_get_subproperty (shorthand, i),
615 _gtk_css_value_unref (css_value);
619 pack_border_radius (GtkCssShorthandProperty *shorthand,
621 GtkStyleQueryFunc query_func,
624 GtkCssStyleProperty *prop;
628 prop = GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("border-top-left-radius"));
629 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
631 i = _gtk_css_corner_value_get_x (v, 100);
633 g_value_init (value, G_TYPE_INT);
634 g_value_set_int (value, i);
638 unpack_font_description (GtkCssShorthandProperty *shorthand,
639 GtkStyleProperties *props,
643 GtkStyleProperty *prop;
644 PangoFontDescription *description;
646 GValue v = G_VALUE_INIT;
648 /* For backwards compat, we only unpack values that are indeed set.
649 * For strict CSS conformance we need to unpack all of them.
650 * Note that we do set all of them in the parse function, so it
651 * will not have effects when parsing CSS files. It will though
652 * for custom style providers.
655 description = g_value_get_boxed (value);
658 mask = pango_font_description_get_set_fields (description);
662 if (mask & PANGO_FONT_MASK_FAMILY)
664 GPtrArray *strv = g_ptr_array_new ();
666 g_ptr_array_add (strv, g_strdup (pango_font_description_get_family (description)));
667 g_ptr_array_add (strv, NULL);
668 g_value_init (&v, G_TYPE_STRV);
669 g_value_take_boxed (&v, g_ptr_array_free (strv, FALSE));
671 prop = _gtk_style_property_lookup ("font-family");
672 _gtk_style_property_assign (prop, props, state, &v);
676 if (mask & PANGO_FONT_MASK_STYLE)
678 g_value_init (&v, PANGO_TYPE_STYLE);
679 g_value_set_enum (&v, pango_font_description_get_style (description));
681 prop = _gtk_style_property_lookup ("font-style");
682 _gtk_style_property_assign (prop, props, state, &v);
686 if (mask & PANGO_FONT_MASK_VARIANT)
688 g_value_init (&v, PANGO_TYPE_VARIANT);
689 g_value_set_enum (&v, pango_font_description_get_variant (description));
691 prop = _gtk_style_property_lookup ("font-variant");
692 _gtk_style_property_assign (prop, props, state, &v);
696 if (mask & PANGO_FONT_MASK_WEIGHT)
698 g_value_init (&v, PANGO_TYPE_WEIGHT);
699 g_value_set_enum (&v, pango_font_description_get_weight (description));
701 prop = _gtk_style_property_lookup ("font-weight");
702 _gtk_style_property_assign (prop, props, state, &v);
706 if (mask & PANGO_FONT_MASK_SIZE)
708 g_value_init (&v, G_TYPE_DOUBLE);
709 g_value_set_double (&v, (double) pango_font_description_get_size (description) / PANGO_SCALE);
711 prop = _gtk_style_property_lookup ("font-size");
712 _gtk_style_property_assign (prop, props, state, &v);
718 pack_font_description (GtkCssShorthandProperty *shorthand,
720 GtkStyleQueryFunc query_func,
723 PangoFontDescription *description;
726 description = pango_font_description_new ();
728 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-family"))), query_data);
731 /* xxx: Can we set all the families here somehow? */
732 pango_font_description_set_family (description, _gtk_css_string_value_get (_gtk_css_array_value_get_nth (v, 0)));
735 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-size"))), query_data);
737 pango_font_description_set_size (description, round (_gtk_css_number_value_get (v, 100) * PANGO_SCALE));
739 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-style"))), query_data);
741 pango_font_description_set_style (description, _gtk_css_font_style_value_get (v));
743 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-variant"))), query_data);
745 pango_font_description_set_variant (description, _gtk_css_font_variant_value_get (v));
747 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-weight"))), query_data);
749 pango_font_description_set_weight (description, _gtk_css_font_weight_value_get (v));
751 g_value_init (value, PANGO_TYPE_FONT_DESCRIPTION);
752 g_value_take_boxed (value, description);
756 unpack_to_everything (GtkCssShorthandProperty *shorthand,
757 GtkStyleProperties *props,
761 GtkCssStyleProperty *prop;
764 n = _gtk_css_shorthand_property_get_n_subproperties (shorthand);
766 for (i = 0; i < n; i++)
768 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, i);
769 _gtk_style_property_assign (GTK_STYLE_PROPERTY (prop), props, state, value);
774 pack_first_element (GtkCssShorthandProperty *shorthand,
776 GtkStyleQueryFunc query_func,
779 GtkCssStyleProperty *prop;
781 /* NB: This is a fallback for properties that originally were
782 * not used as shorthand. We just pick the first subproperty
783 * as a representative.
784 * Lesson learned: Don't query the shorthand, query the
785 * real properties instead. */
786 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 0);
787 _gtk_style_property_query (GTK_STYLE_PROPERTY (prop),
794 _gtk_css_shorthand_property_register (const char *name,
796 const char **subproperties,
797 GtkCssShorthandPropertyParseFunc parse_func,
798 GtkCssShorthandPropertyAssignFunc assign_func,
799 GtkCssShorthandPropertyQueryFunc query_func)
801 GtkCssShorthandProperty *node;
803 node = g_object_new (GTK_TYPE_CSS_SHORTHAND_PROPERTY,
805 "value-type", value_type,
806 "subproperties", subproperties,
809 node->parse = parse_func;
810 node->assign = assign_func;
811 node->query = query_func;
815 _gtk_css_shorthand_property_init_properties (void)
817 /* The order is important here, be careful when changing it */
818 const char *font_subproperties[] = { "font-family", "font-style", "font-variant", "font-weight", "font-size", NULL };
819 const char *margin_subproperties[] = { "margin-top", "margin-right", "margin-bottom", "margin-left", NULL };
820 const char *padding_subproperties[] = { "padding-top", "padding-right", "padding-bottom", "padding-left", NULL };
821 const char *border_width_subproperties[] = { "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", NULL };
822 const char *border_radius_subproperties[] = { "border-top-left-radius", "border-top-right-radius",
823 "border-bottom-right-radius", "border-bottom-left-radius", NULL };
824 const char *border_color_subproperties[] = { "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", NULL };
825 const char *border_style_subproperties[] = { "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", NULL };
826 const char *border_image_subproperties[] = { "border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
827 const char *border_top_subproperties[] = { "border-top-width", "border-top-style", "border-top-color", NULL };
828 const char *border_right_subproperties[] = { "border-right-width", "border-right-style", "border-right-color", NULL };
829 const char *border_bottom_subproperties[] = { "border-bottom-width", "border-bottom-style", "border-bottom-color", NULL };
830 const char *border_left_subproperties[] = { "border-left-width", "border-left-style", "border-left-color", NULL };
831 const char *border_subproperties[] = { "border-top-width", "border-right-width", "border-bottom-width", "border-left-width",
832 "border-top-style", "border-right-style", "border-bottom-style", "border-left-style",
833 "border-top-color", "border-right-color", "border-bottom-color", "border-left-color",
834 "border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
835 const char *outline_subproperties[] = { "outline-width", "outline-style", "outline-color", NULL };
836 const char *background_subproperties[] = { "background-image", "background-repeat", "background-clip", "background-origin",
837 "background-color", NULL };
839 _gtk_css_shorthand_property_register ("font",
840 PANGO_TYPE_FONT_DESCRIPTION,
843 unpack_font_description,
844 pack_font_description);
845 _gtk_css_shorthand_property_register ("margin",
847 margin_subproperties,
851 _gtk_css_shorthand_property_register ("padding",
853 padding_subproperties,
857 _gtk_css_shorthand_property_register ("border-width",
859 border_width_subproperties,
863 _gtk_css_shorthand_property_register ("border-radius",
865 border_radius_subproperties,
867 unpack_border_radius,
869 _gtk_css_shorthand_property_register ("border-color",
871 border_color_subproperties,
873 unpack_to_everything,
875 _gtk_css_shorthand_property_register ("border-style",
876 GTK_TYPE_BORDER_STYLE,
877 border_style_subproperties,
879 unpack_to_everything,
881 _gtk_css_shorthand_property_register ("border-image",
883 border_image_subproperties,
887 _gtk_css_shorthand_property_register ("border-top",
889 border_top_subproperties,
893 _gtk_css_shorthand_property_register ("border-right",
895 border_right_subproperties,
899 _gtk_css_shorthand_property_register ("border-bottom",
901 border_bottom_subproperties,
905 _gtk_css_shorthand_property_register ("border-left",
907 border_left_subproperties,
911 _gtk_css_shorthand_property_register ("border",
913 border_subproperties,
917 _gtk_css_shorthand_property_register ("outline",
919 outline_subproperties,
923 _gtk_css_shorthand_property_register ("background",
925 background_subproperties,