OSDN Git Service

web/css/attributes.hpp: color_ -> colorval_hex_. colorval_rgb_, colorval_percent_...
authorMyun2 <myun2@nwhite.info>
Tue, 28 Dec 2010 09:51:41 +0000 (18:51 +0900)
committerMyun2 <myun2@nwhite.info>
Tue, 28 Dec 2010 09:51:41 +0000 (18:51 +0900)
roast/include/roast/web/css/attributes.hpp

index 71478dc..a79f3f2 100644 (file)
@@ -54,10 +54,27 @@ namespace roast
                                struct percent_ : percentx_<num_string<N> > {};
                        }
                        
-                       //      color_
-                       template <int _RGB>
-                       struct color_ : seq<chars::sharp, chex_string<_RGB> > {};
+                       //      colorval_hex_
+                       template <int _HexRgb>
+                       struct colorval_hex_ : seq<chars::sharp, chex_string<_HexRgb> > {};
                        
+                       ROAST_LEXICAL_FIXSTR(_str_rgb_lpare, "rgb(")
+                       //      colorval_rgb_
+                       template <unsigned char R, unsigned char G, unsigned char B>
+                       struct colorval_rgb_ : seq<_str_rgb_lpare,
+                               num_string<R>, chars::comma,
+                               num_string<G>, chars::comma,
+                               num_string<B>, chars::comma,
+                               chars::rpare > {};
+                       
+                       //      colorval_percent_
+                       template <unsigned char R, unsigned char G, unsigned char B>
+                       struct colorval_percent_ : seq<_str_rgb_lpare,
+                               num_string<R>, chars::percent, chars::comma,
+                               num_string<G>, chars::percent, chars::comma,
+                               num_string<B>, chars::percent, chars::comma,
+                               chars::rpare > {};
+                        
                        //      url_
                        ROAST_LEXICAL_FIXSTR(_url_start_str, "url(\"")
                        ROAST_LEXICAL_FIXSTR(_url_end_str, "\")")