diff options
author | ale <ale@incal.net> | 2021-06-19 16:43:43 +0100 |
---|---|---|
committer | ale <ale@incal.net> | 2021-06-19 16:43:43 +0100 |
commit | 833da3f33a5c727a8d7ccd034c43497c66793026 (patch) | |
tree | 2963588cf4fc88f77a39f2a4ab535a5bb44756a9 /vendor/github.com/andybalholm/cascadia/specificity.go | |
parent | a3019b1703b29e74cfb8fd71b9f79b0c1da11395 (diff) | |
download | crawl-833da3f33a5c727a8d7ccd034c43497c66793026.tar.gz crawl-833da3f33a5c727a8d7ccd034c43497c66793026.zip |
go mod vendor
Diffstat (limited to 'vendor/github.com/andybalholm/cascadia/specificity.go')
-rw-r--r-- | vendor/github.com/andybalholm/cascadia/specificity.go | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/vendor/github.com/andybalholm/cascadia/specificity.go b/vendor/github.com/andybalholm/cascadia/specificity.go deleted file mode 100644 index 8db864f..0000000 --- a/vendor/github.com/andybalholm/cascadia/specificity.go +++ /dev/null @@ -1,26 +0,0 @@ -package cascadia - -// Specificity is the CSS specificity as defined in -// https://www.w3.org/TR/selectors/#specificity-rules -// with the convention Specificity = [A,B,C]. -type Specificity [3]int - -// returns `true` if s < other (strictly), false otherwise -func (s Specificity) Less(other Specificity) bool { - for i := range s { - if s[i] < other[i] { - return true - } - if s[i] > other[i] { - return false - } - } - return false -} - -func (s Specificity) Add(other Specificity) Specificity { - for i, sp := range other { - s[i] += sp - } - return s -} |