OSDN Git Service

web/css_attributes.hpp: px専用版を追加してみた
authorMyun2 <myun2@nwhite.info>
Sat, 25 Dec 2010 07:56:00 +0000 (16:56 +0900)
committerMyun2 <myun2@nwhite.info>
Sat, 25 Dec 2010 07:57:30 +0000 (16:57 +0900)
roast/include/roast/web/css_attributes.hpp
roast/test/lexical_test/css_test.cpp

index 4a3e402..354d0c8 100644 (file)
@@ -133,7 +133,15 @@ namespace roast
                                typename _Left=empty_type>
                        struct border_ : _trbl<_attrname_str::border, _Top, _Right, _Bottom, _Left> {};
 
-                       //      padding_px_
+                       //      px  ///////////////////////////////////////////////////////////////////////
+                       
+                       //      padding(px) {1,4}
+                       template <int _Top, int _Right, int _Bottom, int _Left>
+                       struct padding_px_ : padding_<
+                               unit::px_<_Top>,
+                               unit::px_<_Right>,
+                               unit::px_<_Bottom>,
+                               unit::px_<_Left> > {};
                }
        }
 #undef ROAST_CSS_DECL_ATTR
index 60dfe22..9691b50 100644 (file)
@@ -23,7 +23,8 @@ int main()
 //     cssa.analyze("/*ZZZ*//*ZZZ*/ /*ZZZ*//*ZZZ*/  /*ZZZ*/ hoge/*ZZZ*/ {aa /*ZZZ*/ :/*ZZZ*/ bb/*ZZZ*/; /*ZZZ*/ee:ss /*ZZZ*/}\n"
 //             "/*ZZZ*/hoge2,2#dd{cc:dd; aa  : bb ;  aa  : bb}",printer());
 
-       padding_<px_<10>, px_<10>, px_<10> > a;
+       //padding_<px_<10>, px_<10>, px_<10> > a;
+       padding_px_<10,20,30,8> a;
        border_<px_<10> > b;
        //float_string<132,58,2> a;
        //num_string<592116> a;