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

Generating wrong css for :after :before pseudo selectors #45

Closed
chandu0101 opened this issue Jun 8, 2015 · 7 comments
Closed

Generating wrong css for :after :before pseudo selectors #45

chandu0101 opened this issue Jun 8, 2015 · 7 comments

Comments

@chandu0101
Copy link

 val reactTreeView = style(
       &.before.after(
        content := "g"
       )
    )

producing

.ReactTreeView_DefaultStyle-0001::after::before {
  content: g;
}

adding :: instead of :

@cretz
Copy link

cretz commented Jun 14, 2015

I am also seeing this. According to MDN this is CSS 3 and should work in modern browsers.

@chandu0101
Copy link
Author

yeah its working fine in new browsers ,but poor IE8 doesn't support it :p . tbh i don't care about IE8 as i only support flexbox browsers:)

@japgolly
Copy link
Owner

So according to the CSS3 spec we're doing the right thing. I think this is fine. IE8 will be forgotten long enough 😀

If this becomes a big deal, reopen and we can discuss what to do. Else I'm happy to leave this as is.

@cretz
Copy link

cretz commented Jun 15, 2015

@japgolly, maybe there should be a way to add custom pseudo selectors instead of sealing the class since it's not used for exhaustivity checks (or is it)? Granted I know in this case you can just use strings to get what you need, but I have a similar problem where I need a custom media query selector and I cannot figure out how to do without forking (mentioned in gitter, but I might open an issue shortly).

@japgolly
Copy link
Owner

@cretz Oh! Pseudo selectors are sealed out of habit. I originally started with empty case classes and Pseudo => Xs then, specifically so users could create their own, I moved their attributes into the class itself. Guess I forgot to unseal it :) I'll do that now.

@japgolly
Copy link
Owner

No wait, I'm talking rubbish, you can create your own using Pseudo.Custom() and compose using &. Can you give that a try?

@japgolly
Copy link
Owner

@cretz Moving to #50 as we've moved off the original issue topic.

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

3 participants