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

Meta concerns #13

Open
barneycarroll opened this issue Jun 14, 2018 · 2 comments
Open

Meta concerns #13

barneycarroll opened this issue Jun 14, 2018 · 2 comments

Comments

@barneycarroll
Copy link
Contributor

I'd like to be able to run an application across several windows. At this point, the don't make me think magic style injections become a limitation.

I realise addressing this kind of outside context problem raises all sorts of other concerns - why not chuck in SSR and GTK native decorators while we're at it? - but for my part I'd be happy with what I think is a pretty modest proposal - a b.toString() method that returns the whole sheet as a string.

I think this would do a good job of preempting meta concerns down the road (multiple instances, stateless mode, etc) without complicating the API too much.

@porsager
Copy link
Owner

porsager commented Jun 14, 2018

Hi @barneycarroll ...

There's currently an undocumented method called getSheet which is used for the tests. It'll clear any rules when being called, since that's relevant during testing, but I'm not sure it's desirable for something like this.

I'd like to make this thing into a documented option (but with the clearing part pulled out into it's own method), and I suppose that would be exactly what you need. (also what might be needed for SSR).

What do you think?

@barneycarroll
Copy link
Contributor Author

I got it working. This code breaks BSS default workflow but allows the whole sheet to be accessed consistently:

import b from 'bss'

let style = ''

export () =>
  style += b.getStyle()

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

2 participants