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

fixed syntax related to [dir="rtl"] #2691

Merged

Conversation

LordPachelbel
Copy link
Contributor

Attribute selector syntax was incorrect in this file. For example,

.slick-next {
  &:before {
    &[dir="rtl"] {
      // stuff
    }
  }
}

would compile to .slick-next:before[dir="rtl"], when what was intended was [dir="rtl"] .slick-next:before, and this would cause browsers to ignore that rule.

I discovered this problem when I minified my compiled stylesheet with clean-css and the Next arrow disappeared: the <button> was still there but it had no ::before pseudo element which is where the arrow exists. clean-css grouped the .slick-next:before rule that defined the arrow with .slick-prev's broken :before[dir="rtl"] rule, causing both rules to be ignored:

.slick-next:before,.slick-prev:before[dir=rtl]{content:"→"}

The syntax is correct in slick-theme.scss.

@leggomuhgreggo
Copy link
Collaborator

Excellent. Thanks!

@leggomuhgreggo leggomuhgreggo merged commit c21002c into kenwheeler:master Apr 20, 2017
@LordPachelbel LordPachelbel deleted the fix-broken-attribute-selector branch June 21, 2018 19:35
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

Successfully merging this pull request may close these issues.

2 participants