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

Styles for use in isolated components #4224

Closed
ViggoV opened this issue Jul 14, 2020 · 1 comment
Closed

Styles for use in isolated components #4224

ViggoV opened this issue Jul 14, 2020 · 1 comment

Comments

@ViggoV
Copy link

ViggoV commented Jul 14, 2020

Environment

  • Package version(s): 3.29.0
  • Browser and OS versions: Chrome 83.0.4103.116 on MacOS 10.15.5

Feature request

Currently it is nescessary to insert the stylesheets globally to use Blueprint. However, as far as I can tell it should be possible to apply most of the styles, exept of course those for body and html, to an element forther down the DOM.

At my work we are currently slowly moving from a monolithic Rails application to a more modularised architecture. I am extracting the functionality component by component and would really like to use Blueprint, however I can't override the global styles for the time being.

Would it be possible to build a stripped version of the css-file(s) which could be used with something like styled-components to apply the styles to a standalone component.

Examples

The component I am currently working on is a cookie consent form, for use across our products. It is built as a standalone webpack module and served over private CDN. I would like to use Blueprint for checkboxes and buttons, but again I can't inject global styles into the existing site without jeopardizing the current layout.

@ViggoV ViggoV changed the title Styles for use in isolatied components Styles for use in isolated components Jul 14, 2020
@adidahiya
Copy link
Contributor

Yes, I believe this would be valuable, but it is a large undertaking and has not been a high priority for our use cases. I believe it's essentially the same as this issue so I'm going to mark it as a duplicate: #248

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

No branches or pull requests

2 participants