Specificity

case class Specificity(ids: Int, classes: Int, types: Int, order: Int) extends Ordered[Specificity]

Represents the specificity of a style selector or predicate. This is modeled after the precedence rules of the CSS standard.

trait Serializable
trait Product
trait Equals
trait Ordered[Specificity]
trait Comparable[Specificity]
class Object
trait Matchable
class Any

Value members

Concrete methods

Adds this and the given specificity by summing all its individual parameters.

Adds this and the given specificity by summing all its individual parameters.

def compare(other: Specificity): Int

Compares this instance with the given specificity. Applies the CSS standard weighting of first comparing the number of specified ids, followed by classes, then types and finally the order.

Compares this instance with the given specificity. Applies the CSS standard weighting of first comparing the number of specified ids, followed by classes, then types and finally the order.

Inherited methods

def <(that: Specificity): Boolean
Inherited from:
Ordered
def <=(that: Specificity): Boolean
Inherited from:
Ordered
def >(that: Specificity): Boolean
Inherited from:
Ordered
def >=(that: Specificity): Boolean
Inherited from:
Ordered
def compareTo(that: Specificity): Int
Inherited from:
Ordered
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product