Skip to content

Adding ability to select components #651

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

Conversation

artalar
Copy link

@artalar artalar commented Jun 30, 2020

Inspired by reshadow

Now you may select components in styles if that components accepts className property:

import React from 'react'
import Link from 'some-library'
export default () => (
  <div>
    <Link>About</Link>
    
    <style jsx>{`
      .Link {
        text-decoration: none;
      }
    `}</style>
  </div>
)

The next question is how to apply styles conditionally...

@artalar artalar requested a review from giuseppeg as a code owner June 30, 2020 13:39
@artalar artalar force-pushed the artalar/proposal-semantics-selectors-650 branch from eac68ff to 0a63077 Compare June 30, 2020 13:42
@artalar
Copy link
Author

artalar commented Dec 10, 2020

@giuseppeg what do you think?

@artalar artalar mentioned this pull request Dec 14, 2020
@huozhi
Copy link
Member

huozhi commented Aug 31, 2021

Thanks for the PR! This approach might birng some confusion to users since it doesn't follow the css selector rules. Currently it's not easy to support use component name as selector since the code minification could change it during optimization phase. Would like to keep current as-is 🙏

@huozhi huozhi closed this Aug 31, 2021
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