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

feature: scoped apply styles to the elements of its parent(s) and children #704

Open
mittalyashu opened this issue Feb 19, 2021 · 0 comments

Comments

@mittalyashu
Copy link

mittalyashu commented Feb 19, 2021

The scoped attribute has been deprecated, they might re-introduce it in future.

Use case

const testComponent = () => {
  return (
    <>
      <header className="card card-header">
        <div>
          Title
        </div>
        <Button>
          Create
          <style jsx scoped>{`
            .btn {
              width: 200px;
            }
          `}</style>
        </Button>
      </header>
      <footer className="card card-footer">
        <Button>
          Big CTA
          <style jsx scoped>{`
            .btn {
              width: 100%;
            }
          `}</style>
        </Button>
      </footer>
    </>
  );
};
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