Remove unused styles and prevent postcss from purging relevant ones

This commit is contained in:
Eike Kettner 2021-02-14 02:20:01 +01:00
parent f6e5bda2d8
commit 5461321e59
3 changed files with 34 additions and 28 deletions

View File

@ -133,32 +133,4 @@
@apply bg-lime-200 dark:bg-lightblue-700 italic font-bold px-1;
}
.tag::before {
position: absolute;
transform: translateY(-50%) translateX(50%) rotate(-45deg);
top: 50%;
right: 100%;
content: '';
background-color: inherit;
background-image: none;
border-color: inherit;
width: 1.2em;
height: 1.2em;
border-radius: 4px;
}
.tag::after {
position: absolute;
content: '';
top: 50%;
left: -.25em;
margin-top: -.25em;
background-color: #fff;
width: .4em;
height: .4em;
box-shadow: 0 -1px 1px 0 rgba(0,0,0,.3);
border-radius: 500rem;
}
}

View File

@ -0,0 +1,33 @@
- KEEP THIS
this is only to prevent postcss-purge from removing these classes from
the final css. These are provided by an elm component, that generates
them using string concatenation, which cannot be detected by postcss.
elm-datepicker--container
elm-datepicker--input
elm-datepicker--picker
elm-datepicker--picker-header
elm-datepicker--prev-container
elm-datepicker--prev
elm-datepicker--month-container
elm-datepicker--month
elm-datepicker--year
elm-datepicker--year-menu
elm-datepicker--next-container
elm-datepicker--next
elm-datepicker--table
elm-datepicker--weekdays
elm-datepicker--dow
elm-datepicker--days
elm-datepicker--row
elm-datepicker--day
elm-datepicker--other-month
elm-datepicker--day
elm-datepicker--row
elm-datepicker--day
elm-datepicker--day
elm-datepicker--today
elm-datepicker--day
elm-datepicker--other-month

View File

@ -16,6 +16,7 @@ const prodPlugins =
require("@fullhuman/postcss-purgecss")({
content: [
"./modules/webapp/src/main/elm/**/*.elm",
"./modules/webapp/src/main/styles/keep.txt",
"./modules/restserver/src/main/templates/*.html"
],
defaultExtractor: content => content.match(/[A-Za-z0-9-_:/\.]+/g) || []