diff --git a/include/spaic-css/CSS.hpp b/include/spaic-css/CSS.hpp index f661ea1..708594f 100644 --- a/include/spaic-css/CSS.hpp +++ b/include/spaic-css/CSS.hpp @@ -5,9 +5,9 @@ namespace spaic::css { template -Stylesheet css(T... params); +Stylesheet css(T&&... params); template -Stylesheet keyframes(T... params); +Stylesheet keyframes(T&&... params); } // namespace spaic::css #include \ No newline at end of file diff --git a/include/spaic-css/CssProperty.hpp b/include/spaic-css/CssProperty.hpp index 12f6093..4a7b2d2 100644 --- a/include/spaic-css/CssProperty.hpp +++ b/include/spaic-css/CssProperty.hpp @@ -11,7 +11,8 @@ template class CssProperty { public: - AssignedCssProperty operator=(T value); + template + AssignedCssProperty operator=(U&& value); }; } // namespace spaic::css::prop diff --git a/include/spaic-css/Unit.hpp b/include/spaic-css/Unit.hpp index 0ea99c0..06c7599 100644 --- a/include/spaic-css/Unit.hpp +++ b/include/spaic-css/Unit.hpp @@ -58,7 +58,7 @@ class CssUnit long double value; public: - CssUnit(long double value) noexcept : value(value) {} + CssUnit(long double value) noexcept; std::string toCssValue(); }; @@ -99,4 +99,6 @@ defineUnitUDL(percent); } // namespace spaic::css::unit #undef defineUnitUDLRaw -#undef defineUnitUDL \ No newline at end of file +#undef defineUnitUDL + +#include \ No newline at end of file diff --git a/include/spaic-css/detail/CSS.hpp b/include/spaic-css/detail/CSS.hpp index cb4640e..bde1c6a 100644 --- a/include/spaic-css/detail/CSS.hpp +++ b/include/spaic-css/detail/CSS.hpp @@ -5,9 +5,15 @@ namespace spaic::css { template -Stylesheet css(T... params) +Stylesheet css(T&&... params) { // TODO: css(params) return Stylesheet(); } +template +Stylesheet keyframes(T&&... params) +{ + // TODO: keyframes(params) + return Stylesheet(); +} } // namespace spaic::css diff --git a/include/spaic-css/detail/CssProperty.hpp b/include/spaic-css/detail/CssProperty.hpp index 09fa61e..fd8947c 100644 --- a/include/spaic-css/detail/CssProperty.hpp +++ b/include/spaic-css/detail/CssProperty.hpp @@ -4,11 +4,10 @@ namespace spaic::css::prop { - template -AssignedCssProperty CssProperty::operator=(T value) +template +AssignedCssProperty CssProperty::operator=(U&& value) { return AssignedCssProperty(); } - } // namespace spaic::css::prop \ No newline at end of file diff --git a/include/spaic-css/detail/Unit.hpp b/include/spaic-css/detail/Unit.hpp new file mode 100644 index 0000000..5787d1d --- /dev/null +++ b/include/spaic-css/detail/Unit.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include + +namespace spaic::css::unit +{ + template + CssUnit::CssUnit(long double value) noexcept : value(value) {} +} // namespace spaic::css::unit