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

3 years ago
  1. package nova.monadic_sfx.util
  2. import os.RelPath
  3. trait CssPath[T] {
  4. def path(self: T): String
  5. }
  6. object CssPath {
  7. implicit val cssPathForString = new CssPath[String] {
  8. def path(self: String): String = self
  9. }
  10. implicit val cssPathForOsRelPath = new CssPath[os.RelPath] {
  11. def path(self: RelPath): String = self.toString()
  12. }
  13. implicit def any2CssPath[T](t: T)(implicit C: CssPath[T]): CssPath[T] = C
  14. }