Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

purgecss removes CSS classes filter-layer1 which is needed in filter-text.component.html dynamic angular expression and other CSS classes unexpectedly #1204

Closed
jstein213 opened this issue Jul 8, 2022 · 1 comment · Fixed by #1207
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jstein213
Copy link

jstein213 commented Jul 8, 2022

Build Intershop PWA production config webpack plugin purgecss-webpack-plugin removes CSS classes filter-layer1 originating with filter-panel.scss from output CSS unexpectedly. At PWA runtime, filter navigation sidebar menu identation is wrong and menu malfunctions.

filter-text.component.html

<li class="filter-item filter-layer{{ facet.level }}" [ngClass]="{ 'filter-selected': facet.selected }">

Actual Behavior

purgecss removes CSS classes filter-layer1 which is needed in filter-text.component.html dynamic angular expression and other CSS classes unexpectedly

filter-text.component.html

<li class="filter-item filter-layer{{ facet.level }}" [ngClass]="{ 'filter-selected': facet.selected }">

Expected Behavior

purgecss does not removes CSS classes filter-layer1 and all to pattern filter-layer where is a number in range 1 to 9 .

Steps to Reproduce the Bug

Steps to reproduce the behavior:

  1. Build Intershop PWA production config

Environment Details

  • Project Code Version: git branch develop as of 2022-07-07

AB#78046

@jstein213 jstein213 added the bug Something isn't working label Jul 8, 2022
@jstein213
Copy link
Author

jstein213 commented Jul 8, 2022

applied solution from a PWA project based on intershop-pwa : Comment out CSS classes in filter-panel.scss with the block comment pattern start and end comment block following https://github.com/FullHuman/purgecss-docs/blob/master/whitelisting.md#in-the-css-directly for excluding CSS classes from CSS purge/minify to solution hint following model bugfix "missing styles for main navigation hover menu - removed by PurgeCSS (#901) (0205842)" from Quadient PWA 1.3.0 (2021-10-29) for a different CSS file for a different CSS file:

diff --git a/src/styles/pages/category/filter-panel.scss b/src/styles/pages/category/filter-panel.scss
index be8d52d74..11be32db8 100644
--- a/src/styles/pages/category/filter-panel.scss
+++ b/src/styles/pages/category/filter-panel.scss
@@ -45,6 +45,7 @@
   }
 }
 
+/* purgecss start ignore */
 .filter-group {
   position: relative;
   padding-bottom: $space-default;
@@ -252,6 +253,8 @@
   }
 }
 
+/* purgecss end ignore */
+
 .non-parametric-panel {
   .filter-group {
     padding-bottom: 0;

@shauke shauke self-assigned this Jul 11, 2022
shauke added a commit that referenced this issue Jul 11, 2022
@shauke shauke added this to the 3.0 milestone Jul 11, 2022
shauke added a commit that referenced this issue Jul 11, 2022
shauke added a commit that referenced this issue Jul 13, 2022
…1207)

* removed unused express-shop styles

closes: #1204
(cherry picked from commit 3bd0626)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants