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

Lightningcss randomly drops a selector, breaking styling #738

Open
danieltroger opened this issue May 10, 2024 · 0 comments
Open

Lightningcss randomly drops a selector, breaking styling #738

danieltroger opened this issue May 10, 2024 · 0 comments

Comments

@danieltroger
Copy link

Steps to reproduce:

  1. Unzip selector-dropped-repro.zip
  2. npm install
  3. node index.js

Expected behavior:

This rule from the input css is preserved:

.depict.plp .filters .body .input-row > .left {
  align-items: center;
  display: flex;
}

Actual behavior:

Output code is:

.depict.plp .filters .search-in-filters .query::placeholder{color:#868689}@media not all and (hover:none){.depict.plp .filters .search-in-filters .query:hover{color:#0f0f0f}.depict.plp .filters .search-in-filters .query:hover~.search-icon path{fill:#0f0f0f}}.depict.plp .filters .search-in-filters .query:focus{color:#000;border:1px solid #0f0f0f;outline:none}.depict.plp .filters .search-in-filters .query:focus~svg path{fill:#000}.depict.plp .filters .search-in-filters .query:focus~button svg path{fill:#000}.depict.plp .filters .body .input-row{justify-content:space-between;align-items:center;padding-top:5px;padding-bottom:5px;display:flex}.depict.plp .filters .body .input-row .text{color:#333335;-webkit-line-clamp:1;font-weight:400;line-height:20px}.depict.plp .filters .body .input-row :checked~.text{color:#0f0f0f;font-weight:500}.depict.plp .filters .body .input-row .fake-checked~.text{color:#0f0f0f;font-weight:500}.depict.plp .filters .body .input-row.count-0 *+.text{color:#cbcbcc}.depict.plp .filters .body .count{color:#868689;font-weight:400}.depict.plp .filters .body .input-row:not(.count-0):hover .count{color:#000}

Which does not contain the string .left, meaning that selector has been dropped/wrongly minified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant