You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
419 B
18 lines
419 B
package nova.monadic_sfx.util
|
|
|
|
import os.RelPath
|
|
|
|
trait CssPath[T] {
|
|
def path(self: T): String
|
|
}
|
|
|
|
object CssPath {
|
|
implicit val cssPathForString = new CssPath[String] {
|
|
def path(self: String): String = self
|
|
}
|
|
implicit val cssPathForOsRelPath = new CssPath[os.RelPath] {
|
|
def path(self: RelPath): String = self.toString()
|
|
}
|
|
|
|
implicit def any2CssPath[T](t: T)(implicit C: CssPath[T]): CssPath[T] = C
|
|
}
|