# HG changeset patch # User Tomas Zeman # Date 1571904943 -7200 # Node ID bdde11c9c9fdc706a918838058b2b4824000cf21 # Parent 63c0ad93cd52894052351b875ed82e818040a4a4 PureCls.add(), +() methods - IdeaJ does not like & method diff -r 63c0ad93cd52 -r bdde11c9c9fd 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 + * Copyright 2017-2019 Tomas Zeman * * 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 " " } - -