From 837b93f8b1e68acec74456e838ff4352d0be225c Mon Sep 17 00:00:00 2001 From: Myun2 Date: Thu, 30 Dec 2010 14:48:25 +0900 Subject: [PATCH] =?utf8?q?web/css/attr=5Ftext.hpp:=20text=5Fjustify,=20tex?= =?utf8?q?t=5Findent,=20text=5Falign=20=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/web/css/attr_text.hpp | 45 ++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/roast/include/roast/web/css/attr_text.hpp b/roast/include/roast/web/css/attr_text.hpp index 6f31d04e..61cda87f 100644 --- a/roast/include/roast/web/css/attr_text.hpp +++ b/roast/include/roast/web/css/attr_text.hpp @@ -289,10 +289,21 @@ namespace roast */ // 5. Justification behaviors + + // text_justify (text-align: justify only) + template + struct text_justify_ : declaration_<_attrname_str::text_justify, _Value> + { + ROAST_LEXICAL_FIXSTR(_auto, "auto") + ROAST_LEXICAL_FIXSTR(Auto, "auto") + ROAST_LEXICAL_FIXSTR(inter_word, "inter-word") + ROAST_LEXICAL_FIXSTR(inter_ideograph, "inter-ideograph") + ROAST_CSS_STR_DEF(distribute) + ROAST_LEXICAL_FIXSTR(distribute_all_lines, "distribute-all-lines") + ROAST_CSS_STR_DEF(newspaper) + }; + typedef text_justify_<_true_analyze> text_justify; /* - ROAST_LEXICAL_FIXSTR(text_justify, "text-justify") - auto | inter-word | inter-ideograph | distribute | distribute-all-lines | newspaper - 'text-justify-trim' none | punctuation | punct-and-kana @@ -373,14 +384,27 @@ namespace roast }; typedef vertical_align_<_true_analyze> vertical_align; + ////////////////////////////////////////////////////////////////////////////////// + // 16 Text / (C3) 3.11. Text - /* - ROAST_LEXICAL_FIXSTR(text_indent, "text-indent") - | | inherit - - ROAST_LEXICAL_FIXSTR(text_align, "text-align") - left | right | center | justify | inherit - + + // text_indent + template + struct text_indent_ : declaration_<_attrname_str::text_indent, _Value> {}; + + // text_align + template + struct text_align_ : declaration_<_attrname_str::text_align, _Value> + { + ROAST_CSS_STR_DEF(left) + ROAST_CSS_STR_DEF(right) + ROAST_CSS_STR_DEF(center) + ROAST_CSS_STR_DEF(justify) + ROAST_CSS_STR_DEF(inherit) + }; + typedef text_align_<_true_analyze> text_align; + + /* ROAST_LEXICAL_FIXSTR(text_decoration, "text-decoration") none | [ underline || overline || line-through || blink ] | inherit @@ -416,6 +440,7 @@ namespace roast // ROAST_LEXICAL_FIXSTR(text_shadow, "text-shadow") // color x y shading, ... (C2) + // none | [ || ? ,]* [ || ?] | inherit } } } -- 2.11.0