From 4970f6bbff30e4545096e13c7c678d61d9a4e931 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Tue, 28 Dec 2010 18:51:41 +0900 Subject: [PATCH] web/css/attributes.hpp: color_ -> colorval_hex_. colorval_rgb_, colorval_percent_ Add. --- roast/include/roast/web/css/attributes.hpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/roast/include/roast/web/css/attributes.hpp b/roast/include/roast/web/css/attributes.hpp index 71478dc7..a79f3f25 100644 --- a/roast/include/roast/web/css/attributes.hpp +++ b/roast/include/roast/web/css/attributes.hpp @@ -54,10 +54,27 @@ namespace roast struct percent_ : percentx_ > {}; } - // color_ - template - struct color_ : seq > {}; + // colorval_hex_ + template + struct colorval_hex_ : seq > {}; + ROAST_LEXICAL_FIXSTR(_str_rgb_lpare, "rgb(") + // colorval_rgb_ + template + struct colorval_rgb_ : seq<_str_rgb_lpare, + num_string, chars::comma, + num_string, chars::comma, + num_string, chars::comma, + chars::rpare > {}; + + // colorval_percent_ + template + struct colorval_percent_ : seq<_str_rgb_lpare, + num_string, chars::percent, chars::comma, + num_string, chars::percent, chars::comma, + num_string, chars::percent, chars::comma, + chars::rpare > {}; + // url_ ROAST_LEXICAL_FIXSTR(_url_start_str, "url(\"") ROAST_LEXICAL_FIXSTR(_url_end_str, "\")") -- 2.11.0