Refactor calendar CSS for version 2
Consolidates and optimizes CSS files for calendar v2 Reduces CSS files from 8 to 4, improving project structure Minimizes unused CSS rules and improves overall CSS efficiency Simplifies PurgeCSS configuration and content targeting
This commit is contained in:
parent
67b59e0993
commit
4e22fbc948
5 changed files with 156 additions and 421 deletions
|
|
@ -1,138 +1,61 @@
|
|||
{
|
||||
"summary": {
|
||||
"totalFiles": 8,
|
||||
"totalOriginalSize": 32987,
|
||||
"totalPurgedSize": 30540,
|
||||
"totalRejected": 71,
|
||||
"percentageRemoved": "0.22%",
|
||||
"potentialSavings": 2447
|
||||
"totalFiles": 4,
|
||||
"totalOriginalSize": 15460,
|
||||
"totalPurgedSize": 14900,
|
||||
"totalRejected": 23,
|
||||
"percentageRemoved": "0.15%",
|
||||
"potentialSavings": 560
|
||||
},
|
||||
"fileDetails": {
|
||||
"test-nesting.css": {
|
||||
"originalSize": 154,
|
||||
"purgedSize": 0,
|
||||
"rejectedCount": 5,
|
||||
"rejected": [
|
||||
".test-container",
|
||||
".test-container .test-child",
|
||||
":is(.test-container .test-child):hover",
|
||||
".test-container .test-nested",
|
||||
":is(.test-container .test-nested) .deep-nested"
|
||||
]
|
||||
},
|
||||
"calendar-sliding-animation.css": {
|
||||
"originalSize": 588,
|
||||
"purgedSize": 588,
|
||||
"calendar-v2.css": {
|
||||
"originalSize": 186,
|
||||
"purgedSize": 186,
|
||||
"rejectedCount": 0,
|
||||
"rejected": []
|
||||
},
|
||||
"calendar-popup-css.css": {
|
||||
"originalSize": 3023,
|
||||
"purgedSize": 2939,
|
||||
"rejectedCount": 5,
|
||||
"calendar-v2-layout.css": {
|
||||
"originalSize": 6275,
|
||||
"purgedSize": 6203,
|
||||
"rejectedCount": 3,
|
||||
"rejected": [
|
||||
"&[data-align=\"right\"]",
|
||||
"&[data-align=\"left\"]",
|
||||
"&:hover",
|
||||
"&:active",
|
||||
"&[data-action=\"close\"]:hover"
|
||||
"&[data-levels=\"resource date\"]",
|
||||
"&[data-levels=\"team resource date\"]"
|
||||
]
|
||||
},
|
||||
"calendar-month-css.css": {
|
||||
"originalSize": 5925,
|
||||
"purgedSize": 5485,
|
||||
"rejectedCount": 15,
|
||||
"calendar-v2-events.css": {
|
||||
"originalSize": 7298,
|
||||
"purgedSize": 6810,
|
||||
"rejectedCount": 20,
|
||||
"rejected": [
|
||||
".month-event.category-meeting",
|
||||
".month-event.category-deadline",
|
||||
".month-event.category-work",
|
||||
".month-event.category-personal",
|
||||
".month-event.duration-30min",
|
||||
".month-event.duration-1h",
|
||||
".month-event.duration-1h30",
|
||||
".month-event.duration-2h",
|
||||
".month-event.duration-3h",
|
||||
".month-event.duration-4h",
|
||||
"swp-calendar[data-view=\"month\"][data-loading=\"true\"] .month-grid",
|
||||
".month-grid.sliding-out-left",
|
||||
".month-grid.sliding-out-right",
|
||||
".month-grid.sliding-in-left",
|
||||
".month-grid.sliding-in-right"
|
||||
]
|
||||
},
|
||||
"calendar-layout-css.css": {
|
||||
"originalSize": 9940,
|
||||
"purgedSize": 8956,
|
||||
"rejectedCount": 19,
|
||||
"rejected": [
|
||||
"-out",
|
||||
"swp-day-header[data-today=true]",
|
||||
"swp-day-header[data-today=true] swp-day-name",
|
||||
"swp-day-header[data-today=true] swp-day-date",
|
||||
"swp-resource-avatar img",
|
||||
"[data-type=meeting]:is(swp-allday-container swp-allday-event)",
|
||||
"[data-type=meal]:is(swp-allday-container swp-allday-event)",
|
||||
"[data-type=milestone]:is(swp-allday-container swp-allday-event)",
|
||||
"[data-type=personal]:is(swp-allday-container swp-allday-event)",
|
||||
"[data-type=deadline]:is(swp-allday-container swp-allday-event)",
|
||||
".highlight[data-type=meeting]:is(swp-allday-container swp-allday-event)",
|
||||
".highlight[data-type=meal]:is(swp-allday-container swp-allday-event)",
|
||||
".highlight[data-type=milestone]:is(swp-allday-container swp-allday-event)",
|
||||
".highlight[data-type=personal]:is(swp-allday-container swp-allday-event)",
|
||||
".highlight[data-type=deadline]:is(swp-allday-container swp-allday-event)",
|
||||
":is(swp-scrollable-content::-webkit-scrollbar-thumb):hover",
|
||||
"swp-day-column[data-work-hours=off]",
|
||||
"swp-day-column[data-work-hours=off]:after",
|
||||
"swp-day-column[data-work-hours=off]:before"
|
||||
]
|
||||
},
|
||||
"calendar-events-css.css": {
|
||||
"originalSize": 4815,
|
||||
"purgedSize": 4344,
|
||||
"rejectedCount": 15,
|
||||
"rejected": [
|
||||
"&[data-type=\"meeting\"]",
|
||||
"&[data-type=\"meal\"]",
|
||||
"&[data-type=\"milestone\"]",
|
||||
"&[data-type=\"personal\"]",
|
||||
"&[data-type=\"deadline\"]",
|
||||
"&.hover[data-type=\"meeting\"]",
|
||||
"&.hover[data-type=\"meal\"]",
|
||||
"&.hover[data-type=\"milestone\"]",
|
||||
"&.hover[data-type=\"personal\"]",
|
||||
"&.hover[data-type=\"deadline\"]",
|
||||
"&:hover",
|
||||
"&[data-continues-before=\"true\"]",
|
||||
"&[data-continues-after=\"true\"]",
|
||||
"&:hover",
|
||||
"swp-events-layer[data-filter-active=\"true\"] swp-event",
|
||||
"swp-events-layer[data-filter-active=\"true\"] swp-event[data-matches=\"true\"]",
|
||||
"swp-event[data-stack-link]:not([data-stack-link*='\"stackLevel\":0'])",
|
||||
"\nswp-event-group[data-stack-link]:not([data-stack-link*='\"stackLevel\":0']) swp-event"
|
||||
"\nswp-event-group[data-stack-link]:not([data-stack-link*='\"stackLevel\":0']) swp-event",
|
||||
".is-pink",
|
||||
".is-magenta",
|
||||
".is-violet",
|
||||
".is-deep-purple",
|
||||
".is-indigo",
|
||||
".is-light-blue",
|
||||
".is-cyan",
|
||||
".is-teal",
|
||||
".is-light-green",
|
||||
".is-lime",
|
||||
".is-yellow",
|
||||
".is-orange",
|
||||
".is-deep-orange"
|
||||
]
|
||||
},
|
||||
"calendar-components-css.css": {
|
||||
"originalSize": 3476,
|
||||
"purgedSize": 3340,
|
||||
"rejectedCount": 8,
|
||||
"rejected": [
|
||||
"&:hover",
|
||||
"&:active",
|
||||
"&:not(:last-child)",
|
||||
"&:hover:not([disabled])",
|
||||
"&[disabled]",
|
||||
"&:focus",
|
||||
"swp-calendar[data-searching=\"true\"]",
|
||||
"&[data-search-match=\"true\"]"
|
||||
]
|
||||
},
|
||||
"calendar-base-css.css": {
|
||||
"originalSize": 5066,
|
||||
"purgedSize": 4888,
|
||||
"rejectedCount": 4,
|
||||
"rejected": [
|
||||
"swp-day-columns swp-event.text-selectable swp-day-columns swp-event-title",
|
||||
"\nswp-day-columns swp-event.text-selectable swp-day-columns swp-event-time",
|
||||
":focus",
|
||||
":focus:not(:focus-visible)"
|
||||
]
|
||||
"calendar-v2-base.css": {
|
||||
"originalSize": 1701,
|
||||
"purgedSize": 1701,
|
||||
"rejectedCount": 0,
|
||||
"rejected": []
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue