PureCls.add(), +() methods - IdeaJ does not like & method
authorTomas Zeman <tomas@functionals.cz>
Thu, 24 Oct 2019 10:15:43 +0200
changeset 16 bdde11c9c9fd
parent 15 63c0ad93cd52
child 17 13abcbe6368b
PureCls.add(), +() methods - IdeaJ does not like & method
shared/src/main/scala/purecss/generic/PureCls.scala
--- a/shared/src/main/scala/purecss/generic/PureCls.scala	Fri Jan 19 10:34:58 2018 +0000
+++ b/shared/src/main/scala/purecss/generic/PureCls.scala	Thu Oct 24 10:15:43 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright 2017-2018 Tomas Zeman <tzeman@volny.cz>
+ * Copyright 2017-2019 Tomas Zeman <tomas@functionals.cz>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -24,8 +24,14 @@
 
   type Self = PureCls[Builder, Output, FragT]
 
-  def & (next: Self): Self = copy(chain = next :: chain)
-  def & (next: String): Self = this & PureCls[Builder, Output, FragT](next)
+  def add(next: Self): Self = copy(chain = next :: chain)
+  def add(next: String): Self = this & PureCls[Builder, Output, FragT](next)
+
+  def & (next: Self): Self = add(next)
+  def & (next: String): Self = add(next)
+
+  def + (next: Self): Self = add(next)
+  def + (next: String): Self = add(next)
 
   def apply()(implicit bundle: Bundle[Builder, Output, FragT]):
   Modifier[Builder] = {
@@ -35,5 +41,3 @@
 
   def asCss: String = (this :: chain.reverse) map(_.css) mkString " "
 }
-
-