Skip to content

Commit

Permalink
feat: add analysis for border-radius (#401)
Browse files Browse the repository at this point in the history
Thanks to @KenjiCrosland and @Robbert for ideas and feedback!

refs #301
  • Loading branch information
bartveneman authored Jun 8, 2024
1 parent 3564b7a commit c38de03
Show file tree
Hide file tree
Showing 13 changed files with 1,279 additions and 1 deletion.
105 changes: 105 additions & 0 deletions src/__fixtures__/bol-com-20231008.json
Original file line number Diff line number Diff line change
Expand Up @@ -55989,6 +55989,111 @@
},
"uniquenessRatio": 0.47368421052631576
},
"borderRadiuses": {
"total": 115,
"totalUnique": 29,
"unique": {
"0": 12,
"50%": 30,
"11px": 1,
"1.5rem": 5,
".75rem": 4,
".25rem": 11,
"4rem": 1,
"100%": 5,
".05em": 1,
"2px": 1,
".5em": 1,
"4px 0 0 4px": 6,
"0 4px 4px 0": 7,
".25em": 4,
"1em": 2,
"8px": 1,
".3333333333em": 1,
".3333333333em 0 0 .3333333333em": 1,
"0 .3333333333em .3333333333em 0": 1,
"0 .2222222222em .2222222222em 0": 1,
".25em 0 0 .25em": 2,
"0 .25em .25em 0": 2,
"0 5px 5px 0": 1,
"0 0 .25em .25em": 1,
".5rem": 6,
"0 0 .5em .5em": 1,
"1.375rem 50%": 4,
"1rem": 1,
"0 0 .25rem .25rem": 1
},
"uniquenessRatio": 0.25217391304347825,
"itemsPerContext": {
"border-radius": {
"total": 111,
"totalUnique": 28,
"unique": {
"0": 12,
"50%": 30,
"11px": 1,
"1.5rem": 5,
".75rem": 4,
".25rem": 11,
"4rem": 1,
"100%": 5,
".05em": 1,
"2px": 1,
".5em": 1,
"4px 0 0 4px": 6,
"0 4px 4px 0": 7,
".25em": 4,
"1em": 2,
"8px": 1,
".3333333333em": 1,
".3333333333em 0 0 .3333333333em": 1,
"0 .3333333333em .3333333333em 0": 1,
"0 .2222222222em .2222222222em 0": 1,
".25em 0 0 .25em": 2,
"0 .25em .25em 0": 2,
"0 5px 5px 0": 1,
"0 0 .25em .25em": 1,
".5rem": 6,
"0 0 .5em .5em": 1,
"1rem": 1,
"0 0 .25rem .25rem": 1
},
"uniquenessRatio": 0.25225225225225223
},
"border-top-left-radius": {
"total": 1,
"totalUnique": 1,
"unique": {
"1.375rem 50%": 1
},
"uniquenessRatio": 1
},
"border-top-right-radius": {
"total": 1,
"totalUnique": 1,
"unique": {
"1.375rem 50%": 1
},
"uniquenessRatio": 1
},
"border-bottom-right-radius": {
"total": 1,
"totalUnique": 1,
"unique": {
"1.375rem 50%": 1
},
"uniquenessRatio": 1
},
"border-bottom-left-radius": {
"total": 1,
"totalUnique": 1,
"unique": {
"1.375rem 50%": 1
},
"uniquenessRatio": 1
}
}
},
"animations": {
"durations": {
"total": 113,
Expand Down
173 changes: 173 additions & 0 deletions src/__fixtures__/bootstrap-5.3.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -29176,6 +29176,179 @@
},
"uniquenessRatio": 0.6129032258064516
},
"borderRadiuses": {
"total": 228,
"totalUnique": 38,
"unique": {
"0": 67,
"0.25rem": 1,
"var(--bs-border-radius)": 29,
"var(--bs-border-radius-sm)": 12,
"var(--bs-border-radius-lg)": 12,
"0.25em": 1,
"50%": 11,
"2em": 1,
"1rem": 4,
"var(--bs-btn-border-radius)": 1,
"var(--bs-dropdown-border-radius)": 1,
"var(--bs-dropdown-item-border-radius, 0)": 1,
"var(--bs-nav-tabs-border-radius)": 2,
"var(--bs-nav-pills-border-radius)": 1,
"var(--bs-navbar-toggler-border-radius)": 1,
"var(--bs-card-border-radius)": 1,
"var(--bs-card-inner-border-radius)": 9,
"var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0": 1,
"0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)": 1,
"var(--bs-accordion-border-radius)": 6,
"var(--bs-accordion-inner-border-radius)": 4,
"var(--bs-breadcrumb-border-radius)": 1,
"var(--bs-pagination-border-radius)": 4,
"var(--bs-badge-border-radius)": 1,
"var(--bs-alert-border-radius)": 1,
"var(--bs-progress-border-radius)": 1,
"var(--bs-list-group-border-radius)": 13,
"0.375rem": 1,
"var(--bs-toast-border-radius)": 1,
"calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))": 2,
"var(--bs-modal-border-radius)": 1,
"var(--bs-modal-inner-border-radius)": 4,
"var(--bs-tooltip-border-radius)": 1,
"var(--bs-popover-border-radius)": 1,
"var(--bs-popover-inner-border-radius)": 2,
"var(--bs-border-radius-xl)": 9,
"var(--bs-border-radius-xxl)": 9,
"var(--bs-border-radius-pill)": 9
},
"uniquenessRatio": 0.16666666666666666,
"itemsPerContext": {
"border-radius": {
"total": 74,
"totalUnique": 31,
"unique": {
"0": 21,
"0.25rem": 1,
"var(--bs-border-radius)": 13,
"var(--bs-border-radius-sm)": 4,
"var(--bs-border-radius-lg)": 4,
"0.25em": 1,
"50%": 3,
"2em": 1,
"1rem": 4,
"var(--bs-btn-border-radius)": 1,
"var(--bs-dropdown-border-radius)": 1,
"var(--bs-dropdown-item-border-radius, 0)": 1,
"var(--bs-nav-pills-border-radius)": 1,
"var(--bs-navbar-toggler-border-radius)": 1,
"var(--bs-card-border-radius)": 1,
"var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius) 0 0": 1,
"0 0 var(--bs-card-inner-border-radius) var(--bs-card-inner-border-radius)": 1,
"var(--bs-card-inner-border-radius)": 1,
"var(--bs-breadcrumb-border-radius)": 1,
"var(--bs-badge-border-radius)": 1,
"var(--bs-alert-border-radius)": 1,
"var(--bs-progress-border-radius)": 1,
"var(--bs-list-group-border-radius)": 1,
"0.375rem": 1,
"var(--bs-toast-border-radius)": 1,
"var(--bs-modal-border-radius)": 1,
"var(--bs-tooltip-border-radius)": 1,
"var(--bs-popover-border-radius)": 1,
"var(--bs-border-radius-xl)": 1,
"var(--bs-border-radius-xxl)": 1,
"var(--bs-border-radius-pill)": 1
},
"uniquenessRatio": 0.4189189189189189
},
"border-top-right-radius": {
"total": 46,
"totalUnique": 17,
"unique": {
"0": 15,
"var(--bs-nav-tabs-border-radius)": 1,
"var(--bs-card-inner-border-radius)": 2,
"var(--bs-accordion-border-radius)": 1,
"var(--bs-accordion-inner-border-radius)": 1,
"var(--bs-pagination-border-radius)": 1,
"var(--bs-list-group-border-radius)": 6,
"calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))": 1,
"var(--bs-modal-inner-border-radius)": 1,
"var(--bs-popover-inner-border-radius)": 1,
"var(--bs-border-radius)": 4,
"var(--bs-border-radius-sm)": 2,
"var(--bs-border-radius-lg)": 2,
"var(--bs-border-radius-xl)": 2,
"var(--bs-border-radius-xxl)": 2,
"50%": 2,
"var(--bs-border-radius-pill)": 2
},
"uniquenessRatio": 0.3695652173913043
},
"border-bottom-right-radius": {
"total": 31,
"totalUnique": 13,
"unique": {
"0": 8,
"var(--bs-card-inner-border-radius)": 2,
"var(--bs-accordion-border-radius)": 2,
"var(--bs-accordion-inner-border-radius)": 1,
"var(--bs-pagination-border-radius)": 1,
"var(--bs-modal-inner-border-radius)": 1,
"var(--bs-border-radius)": 4,
"var(--bs-border-radius-sm)": 2,
"var(--bs-border-radius-lg)": 2,
"var(--bs-border-radius-xl)": 2,
"var(--bs-border-radius-xxl)": 2,
"50%": 2,
"var(--bs-border-radius-pill)": 2
},
"uniquenessRatio": 0.41935483870967744
},
"border-top-left-radius": {
"total": 34,
"totalUnique": 16,
"unique": {
"0": 9,
"var(--bs-nav-tabs-border-radius)": 1,
"var(--bs-card-inner-border-radius)": 2,
"var(--bs-accordion-border-radius)": 1,
"var(--bs-accordion-inner-border-radius)": 1,
"var(--bs-pagination-border-radius)": 1,
"calc(var(--bs-toast-border-radius) - var(--bs-toast-border-width))": 1,
"var(--bs-modal-inner-border-radius)": 1,
"var(--bs-popover-inner-border-radius)": 1,
"var(--bs-border-radius)": 4,
"var(--bs-border-radius-sm)": 2,
"var(--bs-border-radius-lg)": 2,
"var(--bs-border-radius-xl)": 2,
"var(--bs-border-radius-xxl)": 2,
"50%": 2,
"var(--bs-border-radius-pill)": 2
},
"uniquenessRatio": 0.47058823529411764
},
"border-bottom-left-radius": {
"total": 43,
"totalUnique": 14,
"unique": {
"0": 14,
"var(--bs-card-inner-border-radius)": 2,
"var(--bs-accordion-border-radius)": 2,
"var(--bs-accordion-inner-border-radius)": 1,
"var(--bs-pagination-border-radius)": 1,
"var(--bs-list-group-border-radius)": 6,
"var(--bs-modal-inner-border-radius)": 1,
"var(--bs-border-radius)": 4,
"var(--bs-border-radius-sm)": 2,
"var(--bs-border-radius-lg)": 2,
"var(--bs-border-radius-xl)": 2,
"var(--bs-border-radius-xxl)": 2,
"50%": 2,
"var(--bs-border-radius-pill)": 2
},
"uniquenessRatio": 0.32558139534883723
}
}
},
"animations": {
"durations": {
"total": 54,
Expand Down
34 changes: 34 additions & 0 deletions src/__fixtures__/cnn-20231008.json
Original file line number Diff line number Diff line change
Expand Up @@ -32743,6 +32743,40 @@
},
"uniquenessRatio": 1
},
"borderRadiuses": {
"total": 39,
"totalUnique": 9,
"unique": {
"0": 1,
"5px": 3,
"50%": 15,
"4px": 13,
"100%": 1,
"50px": 1,
"8px": 3,
"34px": 1,
"16px": 1
},
"uniquenessRatio": 0.23076923076923078,
"itemsPerContext": {
"border-radius": {
"total": 39,
"totalUnique": 9,
"unique": {
"0": 1,
"5px": 3,
"50%": 15,
"4px": 13,
"100%": 1,
"50px": 1,
"8px": 3,
"34px": 1,
"16px": 1
},
"uniquenessRatio": 0.23076923076923078
}
}
},
"animations": {
"durations": {
"total": 86,
Expand Down
Loading

0 comments on commit c38de03

Please sign in to comment.