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 "gtkcssbordervalueprivate.h"
29 #include "gtkcsscornervalueprivate.h"
30 #include "gtkcssenumvalueprivate.h"
31 #include "gtkcssimageprivate.h"
32 #include "gtkcssimagevalueprivate.h"
33 #include "gtkcssnumbervalueprivate.h"
34 #include "gtkcssrepeatvalueprivate.h"
35 #include "gtkcssstringvalueprivate.h"
36 #include "gtkcssstylefuncsprivate.h"
37 #include "gtkcssvalueprivate.h"
38 #include "gtkstylepropertiesprivate.h"
39 #include "gtksymboliccolorprivate.h"
40 #include "gtktypebuiltins.h"
42 /* this is in case round() is not provided by the compiler,
43 * such as in the case of C89 compilers, like MSVC
45 #include "fallback-c89.c"
50 value_is_done_parsing (GtkCssParser *parser)
52 return _gtk_css_parser_is_eof (parser) ||
53 _gtk_css_parser_begins_with (parser, ';') ||
54 _gtk_css_parser_begins_with (parser, '}');
58 parse_four_numbers (GtkCssShorthandProperty *shorthand,
61 GtkCssNumberParseFlags flags)
65 for (i = 0; i < 4; i++)
67 if (!_gtk_css_parser_has_number (parser))
70 values[i] = _gtk_css_number_value_parse (parser, flags);
71 if (values[i] == NULL)
77 _gtk_css_parser_error (parser, "Expected a length");
83 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
90 parse_margin (GtkCssShorthandProperty *shorthand,
95 return parse_four_numbers (shorthand,
98 GTK_CSS_NUMBER_AS_PIXELS
99 | GTK_CSS_PARSE_LENGTH);
103 parse_padding (GtkCssShorthandProperty *shorthand,
104 GtkCssValue **values,
105 GtkCssParser *parser,
108 return parse_four_numbers (shorthand,
111 GTK_CSS_POSITIVE_ONLY
112 | GTK_CSS_NUMBER_AS_PIXELS
113 | GTK_CSS_PARSE_LENGTH);
117 parse_border_width (GtkCssShorthandProperty *shorthand,
118 GtkCssValue **values,
119 GtkCssParser *parser,
122 return parse_four_numbers (shorthand,
125 GTK_CSS_POSITIVE_ONLY
126 | GTK_CSS_NUMBER_AS_PIXELS
127 | GTK_CSS_PARSE_LENGTH);
131 parse_border_radius (GtkCssShorthandProperty *shorthand,
132 GtkCssValue **values,
133 GtkCssParser *parser,
136 GtkCssValue *x[4] = { NULL, }, *y[4] = { NULL, };
139 for (i = 0; i < 4; i++)
141 if (!_gtk_css_parser_has_number (parser))
143 x[i] = _gtk_css_number_value_parse (parser,
144 GTK_CSS_POSITIVE_ONLY
145 | GTK_CSS_PARSE_PERCENT
146 | GTK_CSS_NUMBER_AS_PIXELS
147 | GTK_CSS_PARSE_LENGTH);
154 _gtk_css_parser_error (parser, "Expected a number");
158 /* The magic (i - 1) >> 1 below makes it take the correct value
159 * according to spec. Feel free to check the 4 cases */
161 x[i] = _gtk_css_value_ref (x[(i - 1) >> 1]);
163 if (_gtk_css_parser_try (parser, "/", TRUE))
165 for (i = 0; i < 4; i++)
167 if (!_gtk_css_parser_has_number (parser))
169 y[i] = _gtk_css_number_value_parse (parser,
170 GTK_CSS_POSITIVE_ONLY
171 | GTK_CSS_PARSE_PERCENT
172 | GTK_CSS_NUMBER_AS_PIXELS
173 | GTK_CSS_PARSE_LENGTH);
180 _gtk_css_parser_error (parser, "Expected a number");
185 y[i] = _gtk_css_value_ref (y[(i - 1) >> 1]);
189 for (i = 0; i < 4; i++)
190 y[i] = _gtk_css_value_ref (x[i]);
193 for (i = 0; i < 4; i++)
195 values[i] = _gtk_css_corner_value_new (x[i], y[i]);
201 for (i = 0; i < 4; i++)
204 _gtk_css_value_unref (x[i]);
206 _gtk_css_value_unref (y[i]);
212 parse_border_color (GtkCssShorthandProperty *shorthand,
213 GtkCssValue **values,
214 GtkCssParser *parser,
217 GtkSymbolicColor *symbolic;
220 for (i = 0; i < 4; i++)
222 if (_gtk_css_parser_try (parser, "currentcolor", TRUE))
224 symbolic = gtk_symbolic_color_ref (_gtk_symbolic_color_get_current_color ());
228 symbolic = _gtk_css_parser_read_symbolic_color (parser);
229 if (symbolic == NULL)
233 values[i] = _gtk_css_value_new_take_symbolic_color (symbolic);
235 if (value_is_done_parsing (parser))
239 for (i++; i < 4; i++)
241 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
248 parse_border_style (GtkCssShorthandProperty *shorthand,
249 GtkCssValue **values,
250 GtkCssParser *parser,
255 for (i = 0; i < 4; i++)
257 values[i] = _gtk_css_border_style_value_try_parse (parser);
258 if (values[i] == NULL)
264 _gtk_css_parser_error (parser, "Expected a border style");
269 values[i] = _gtk_css_value_ref (values[(i - 1) >> 1]);
275 parse_border_image (GtkCssShorthandProperty *shorthand,
276 GtkCssValue **values,
277 GtkCssParser *parser,
282 if (values[0] == NULL &&
283 (_gtk_css_parser_has_prefix (parser, "none") ||
284 _gtk_css_image_can_parse (parser)))
288 if (_gtk_css_parser_try (parser, "none", TRUE))
292 image = _gtk_css_image_new_parse (parser, base);
297 values[0] = _gtk_css_image_value_new (image);
299 else if (values[3] == NULL &&
300 (values[3] = _gtk_css_border_repeat_value_try_parse (parser)))
302 /* please move along */
304 else if (values[1] == NULL)
306 values[1] = _gtk_css_border_value_parse (parser,
307 GTK_CSS_PARSE_PERCENT
308 | GTK_CSS_PARSE_NUMBER
309 | GTK_CSS_POSITIVE_ONLY,
312 if (values[1] == NULL)
315 if (_gtk_css_parser_try (parser, "/", TRUE))
317 values[2] = _gtk_css_border_value_parse (parser,
318 GTK_CSS_PARSE_PERCENT
319 | GTK_CSS_PARSE_LENGTH
320 | GTK_CSS_PARSE_NUMBER
321 | GTK_CSS_POSITIVE_ONLY,
324 if (values[2] == NULL)
330 /* We parsed everything and there's still stuff left?
331 * Pretend we didn't notice and let the normal code produce
332 * a 'junk at end of value' error */
336 while (!value_is_done_parsing (parser));
342 parse_border_side (GtkCssShorthandProperty *shorthand,
343 GtkCssValue **values,
344 GtkCssParser *parser,
349 if (values[0] == NULL &&
350 _gtk_css_parser_has_number (parser))
352 values[0] = _gtk_css_number_value_parse (parser,
353 GTK_CSS_POSITIVE_ONLY
354 | GTK_CSS_NUMBER_AS_PIXELS
355 | GTK_CSS_PARSE_LENGTH);
356 if (values[0] == NULL)
359 else if (values[1] == NULL &&
360 (values[1] = _gtk_css_border_style_value_try_parse (parser)))
364 else if (values[2] == NULL)
366 GtkSymbolicColor *symbolic;
368 symbolic = _gtk_css_parser_read_symbolic_color (parser);
369 if (symbolic == NULL)
372 values[2] = _gtk_css_value_new_take_symbolic_color (symbolic);
375 while (!value_is_done_parsing (parser));
381 parse_border (GtkCssShorthandProperty *shorthand,
382 GtkCssValue **values,
383 GtkCssParser *parser,
388 if (values[0] == NULL &&
389 _gtk_css_parser_has_number (parser))
391 values[0] = _gtk_css_number_value_parse (parser,
392 GTK_CSS_POSITIVE_ONLY
393 | GTK_CSS_NUMBER_AS_PIXELS
394 | GTK_CSS_PARSE_LENGTH);
395 if (values[0] == NULL)
397 values[1] = _gtk_css_value_ref (values[0]);
398 values[2] = _gtk_css_value_ref (values[0]);
399 values[3] = _gtk_css_value_ref (values[0]);
401 else if (values[4] == NULL &&
402 (values[4] = _gtk_css_border_style_value_try_parse (parser)))
404 values[5] = _gtk_css_value_ref (values[4]);
405 values[6] = _gtk_css_value_ref (values[4]);
406 values[7] = _gtk_css_value_ref (values[4]);
408 else if (!G_IS_VALUE (&values[8]))
410 GtkSymbolicColor *symbolic;
412 symbolic = _gtk_css_parser_read_symbolic_color (parser);
413 if (symbolic == NULL)
416 values[8] = _gtk_css_value_new_take_symbolic_color (symbolic);
417 values[9] = _gtk_css_value_ref (values[8]);
418 values[10] = _gtk_css_value_ref (values[8]);
419 values[11] = _gtk_css_value_ref (values[8]);
423 /* We parsed everything and there's still stuff left?
424 * Pretend we didn't notice and let the normal code produce
425 * a 'junk at end of value' error */
429 while (!value_is_done_parsing (parser));
431 /* Note that border-image values are not set: according to the spec
432 they just need to be reset when using the border shorthand */
438 parse_font (GtkCssShorthandProperty *shorthand,
439 GtkCssValue **values,
440 GtkCssParser *parser,
443 PangoFontDescription *desc;
447 str = _gtk_css_parser_read_value (parser);
451 desc = pango_font_description_from_string (str);
454 mask = pango_font_description_get_set_fields (desc);
456 if (mask & PANGO_FONT_MASK_FAMILY)
458 values[0] = _gtk_css_array_value_new (_gtk_css_string_value_new (pango_font_description_get_family (desc)));
460 if (mask & PANGO_FONT_MASK_STYLE)
462 values[1] = _gtk_css_font_style_value_new (pango_font_description_get_style (desc));
464 if (mask & PANGO_FONT_MASK_VARIANT)
466 values[2] = _gtk_css_font_variant_value_new (pango_font_description_get_variant (desc));
468 if (mask & PANGO_FONT_MASK_WEIGHT)
470 values[3] = _gtk_css_font_weight_value_new (pango_font_description_get_weight (desc));
472 if (mask & PANGO_FONT_MASK_SIZE)
474 values[4] = _gtk_css_number_value_new ((double) pango_font_description_get_size (desc) / PANGO_SCALE, GTK_CSS_PX);
477 pango_font_description_free (desc);
483 parse_background (GtkCssShorthandProperty *shorthand,
484 GtkCssValue **values,
485 GtkCssParser *parser,
491 if (values[0] == NULL &&
492 (_gtk_css_parser_has_prefix (parser, "none") ||
493 _gtk_css_image_can_parse (parser)))
497 if (_gtk_css_parser_try (parser, "none", TRUE))
501 image = _gtk_css_image_new_parse (parser, base);
506 values[0] = _gtk_css_image_value_new (image);
508 else if (values[1] == NULL &&
509 (values[1] = _gtk_css_background_repeat_value_try_parse (parser)))
511 /* nothing to do here */
513 else if ((values[2] == NULL || values[3] == NULL) &&
514 (values[3] = _gtk_css_area_value_try_parse (parser)))
516 if (values[2] == NULL)
518 values[2] = values[3];
522 else if (values[4] == NULL)
524 GtkSymbolicColor *symbolic;
526 symbolic = _gtk_css_parser_read_symbolic_color (parser);
527 if (symbolic == NULL)
530 values[4] = _gtk_css_value_new_take_symbolic_color (symbolic);
534 /* We parsed everything and there's still stuff left?
535 * Pretend we didn't notice and let the normal code produce
536 * a 'junk at end of value' error */
540 while (!value_is_done_parsing (parser));
548 unpack_border (GtkCssShorthandProperty *shorthand,
549 GtkStyleProperties *props,
553 GValue v = G_VALUE_INIT;
554 GtkBorder *border = g_value_get_boxed (value);
556 g_value_init (&v, G_TYPE_INT);
558 g_value_set_int (&v, border->top);
559 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 0)), props, state, &v);
560 g_value_set_int (&v, border->right);
561 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 1)), props, state, &v);
562 g_value_set_int (&v, border->bottom);
563 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 2)), props, state, &v);
564 g_value_set_int (&v, border->left);
565 _gtk_style_property_assign (GTK_STYLE_PROPERTY (_gtk_css_shorthand_property_get_subproperty (shorthand, 3)), props, state, &v);
571 pack_border (GtkCssShorthandProperty *shorthand,
573 GtkStyleQueryFunc query_func,
576 GtkCssStyleProperty *prop;
580 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 0);
581 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
583 border.top = _gtk_css_value_get_int (v);
584 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 1);
585 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
587 border.right = _gtk_css_value_get_int (v);
588 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 2);
589 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
591 border.bottom = _gtk_css_value_get_int (v);
592 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 3);
593 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
595 border.left = _gtk_css_value_get_int (v);
597 g_value_init (value, GTK_TYPE_BORDER);
598 g_value_set_boxed (value, &border);
602 unpack_border_radius (GtkCssShorthandProperty *shorthand,
603 GtkStyleProperties *props,
607 GtkCssValue *css_value;
610 css_value = _gtk_css_corner_value_new (_gtk_css_number_value_new (g_value_get_int (value), GTK_CSS_PX),
611 _gtk_css_number_value_new (g_value_get_int (value), GTK_CSS_PX));
613 for (i = 0; i < 4; i++)
614 _gtk_style_properties_set_property_by_property (props,
615 _gtk_css_shorthand_property_get_subproperty (shorthand, i),
619 _gtk_css_value_unref (css_value);
623 pack_border_radius (GtkCssShorthandProperty *shorthand,
625 GtkStyleQueryFunc query_func,
628 GtkCssStyleProperty *prop;
632 prop = GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("border-top-left-radius"));
633 v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
635 i = _gtk_css_corner_value_get_x (v, 100);
637 g_value_init (value, G_TYPE_INT);
638 g_value_set_int (value, i);
642 unpack_font_description (GtkCssShorthandProperty *shorthand,
643 GtkStyleProperties *props,
647 GtkStyleProperty *prop;
648 PangoFontDescription *description;
650 GValue v = G_VALUE_INIT;
652 /* For backwards compat, we only unpack values that are indeed set.
653 * For strict CSS conformance we need to unpack all of them.
654 * Note that we do set all of them in the parse function, so it
655 * will not have effects when parsing CSS files. It will though
656 * for custom style providers.
659 description = g_value_get_boxed (value);
662 mask = pango_font_description_get_set_fields (description);
666 if (mask & PANGO_FONT_MASK_FAMILY)
668 GPtrArray *strv = g_ptr_array_new ();
670 g_ptr_array_add (strv, g_strdup (pango_font_description_get_family (description)));
671 g_ptr_array_add (strv, NULL);
672 g_value_init (&v, G_TYPE_STRV);
673 g_value_take_boxed (&v, g_ptr_array_free (strv, FALSE));
675 prop = _gtk_style_property_lookup ("font-family");
676 _gtk_style_property_assign (prop, props, state, &v);
680 if (mask & PANGO_FONT_MASK_STYLE)
682 g_value_init (&v, PANGO_TYPE_STYLE);
683 g_value_set_enum (&v, pango_font_description_get_style (description));
685 prop = _gtk_style_property_lookup ("font-style");
686 _gtk_style_property_assign (prop, props, state, &v);
690 if (mask & PANGO_FONT_MASK_VARIANT)
692 g_value_init (&v, PANGO_TYPE_VARIANT);
693 g_value_set_enum (&v, pango_font_description_get_variant (description));
695 prop = _gtk_style_property_lookup ("font-variant");
696 _gtk_style_property_assign (prop, props, state, &v);
700 if (mask & PANGO_FONT_MASK_WEIGHT)
702 g_value_init (&v, PANGO_TYPE_WEIGHT);
703 g_value_set_enum (&v, pango_font_description_get_weight (description));
705 prop = _gtk_style_property_lookup ("font-weight");
706 _gtk_style_property_assign (prop, props, state, &v);
710 if (mask & PANGO_FONT_MASK_SIZE)
712 g_value_init (&v, G_TYPE_DOUBLE);
713 g_value_set_double (&v, (double) pango_font_description_get_size (description) / PANGO_SCALE);
715 prop = _gtk_style_property_lookup ("font-size");
716 _gtk_style_property_assign (prop, props, state, &v);
722 pack_font_description (GtkCssShorthandProperty *shorthand,
724 GtkStyleQueryFunc query_func,
727 PangoFontDescription *description;
730 description = pango_font_description_new ();
732 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-family"))), query_data);
735 /* xxx: Can we set all the families here somehow? */
736 pango_font_description_set_family (description, _gtk_css_string_value_get (_gtk_css_array_value_get_nth (v, 0)));
739 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-size"))), query_data);
741 pango_font_description_set_size (description, round (_gtk_css_number_value_get (v, 100) * PANGO_SCALE));
743 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-style"))), query_data);
745 pango_font_description_set_style (description, _gtk_css_font_style_value_get (v));
747 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-variant"))), query_data);
749 pango_font_description_set_variant (description, _gtk_css_font_variant_value_get (v));
751 v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-weight"))), query_data);
753 pango_font_description_set_weight (description, _gtk_css_font_weight_value_get (v));
755 g_value_init (value, PANGO_TYPE_FONT_DESCRIPTION);
756 g_value_take_boxed (value, description);
760 unpack_to_everything (GtkCssShorthandProperty *shorthand,
761 GtkStyleProperties *props,
765 GtkCssStyleProperty *prop;
768 n = _gtk_css_shorthand_property_get_n_subproperties (shorthand);
770 for (i = 0; i < n; i++)
772 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, i);
773 _gtk_style_property_assign (GTK_STYLE_PROPERTY (prop), props, state, value);
778 pack_first_element (GtkCssShorthandProperty *shorthand,
780 GtkStyleQueryFunc query_func,
783 GtkCssStyleProperty *prop;
785 /* NB: This is a fallback for properties that originally were
786 * not used as shorthand. We just pick the first subproperty
787 * as a representative.
788 * Lesson learned: Don't query the shorthand, query the
789 * real properties instead. */
790 prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 0);
791 _gtk_style_property_query (GTK_STYLE_PROPERTY (prop),
798 _gtk_css_shorthand_property_register (const char *name,
800 const char **subproperties,
801 GtkCssShorthandPropertyParseFunc parse_func,
802 GtkCssShorthandPropertyAssignFunc assign_func,
803 GtkCssShorthandPropertyQueryFunc query_func)
805 GtkCssShorthandProperty *node;
807 node = g_object_new (GTK_TYPE_CSS_SHORTHAND_PROPERTY,
809 "value-type", value_type,
810 "subproperties", subproperties,
813 node->parse = parse_func;
814 node->assign = assign_func;
815 node->query = query_func;
819 _gtk_css_shorthand_property_init_properties (void)
821 /* The order is important here, be careful when changing it */
822 const char *font_subproperties[] = { "font-family", "font-style", "font-variant", "font-weight", "font-size", NULL };
823 const char *margin_subproperties[] = { "margin-top", "margin-right", "margin-bottom", "margin-left", NULL };
824 const char *padding_subproperties[] = { "padding-top", "padding-right", "padding-bottom", "padding-left", NULL };
825 const char *border_width_subproperties[] = { "border-top-width", "border-right-width", "border-bottom-width", "border-left-width", NULL };
826 const char *border_radius_subproperties[] = { "border-top-left-radius", "border-top-right-radius",
827 "border-bottom-right-radius", "border-bottom-left-radius", NULL };
828 const char *border_color_subproperties[] = { "border-top-color", "border-right-color", "border-bottom-color", "border-left-color", NULL };
829 const char *border_style_subproperties[] = { "border-top-style", "border-right-style", "border-bottom-style", "border-left-style", NULL };
830 const char *border_image_subproperties[] = { "border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
831 const char *border_top_subproperties[] = { "border-top-width", "border-top-style", "border-top-color", NULL };
832 const char *border_right_subproperties[] = { "border-right-width", "border-right-style", "border-right-color", NULL };
833 const char *border_bottom_subproperties[] = { "border-bottom-width", "border-bottom-style", "border-bottom-color", NULL };
834 const char *border_left_subproperties[] = { "border-left-width", "border-left-style", "border-left-color", NULL };
835 const char *border_subproperties[] = { "border-top-width", "border-right-width", "border-bottom-width", "border-left-width",
836 "border-top-style", "border-right-style", "border-bottom-style", "border-left-style",
837 "border-top-color", "border-right-color", "border-bottom-color", "border-left-color",
838 "border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
839 const char *outline_subproperties[] = { "outline-width", "outline-style", "outline-color", NULL };
840 const char *background_subproperties[] = { "background-image", "background-repeat", "background-clip", "background-origin",
841 "background-color", NULL };
843 _gtk_css_shorthand_property_register ("font",
844 PANGO_TYPE_FONT_DESCRIPTION,
847 unpack_font_description,
848 pack_font_description);
849 _gtk_css_shorthand_property_register ("margin",
851 margin_subproperties,
855 _gtk_css_shorthand_property_register ("padding",
857 padding_subproperties,
861 _gtk_css_shorthand_property_register ("border-width",
863 border_width_subproperties,
867 _gtk_css_shorthand_property_register ("border-radius",
869 border_radius_subproperties,
871 unpack_border_radius,
873 _gtk_css_shorthand_property_register ("border-color",
875 border_color_subproperties,
877 unpack_to_everything,
879 _gtk_css_shorthand_property_register ("border-style",
880 GTK_TYPE_BORDER_STYLE,
881 border_style_subproperties,
883 unpack_to_everything,
885 _gtk_css_shorthand_property_register ("border-image",
887 border_image_subproperties,
891 _gtk_css_shorthand_property_register ("border-top",
893 border_top_subproperties,
897 _gtk_css_shorthand_property_register ("border-right",
899 border_right_subproperties,
903 _gtk_css_shorthand_property_register ("border-bottom",
905 border_bottom_subproperties,
909 _gtk_css_shorthand_property_register ("border-left",
911 border_left_subproperties,
915 _gtk_css_shorthand_property_register ("border",
917 border_subproperties,
921 _gtk_css_shorthand_property_register ("outline",
923 outline_subproperties,
927 _gtk_css_shorthand_property_register ("background",
929 background_subproperties,