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
loadScript()
takes a css
option to load stylesheet by URL
#86
Conversation
TODO: document new option in README
Couple of comments, I think that the default CSS version should match the default JS lib version. But having said that, the main usage for this library is to circumvent issues using modern JS tooling with dojo which referencing the CSS doesn't suffer from so I'm not sure that it should be used this way (I think the option of having it is fine but only as a backup). |
@tomwayson I'll review this today and will also test like before with my riotjs framework example. |
thanks @davetimmins! I agree on all accounts.
This PR is a testable incremental step towards the final api, which is going to allow what I think will be a more common use:
I agree, loading the CSS is a convenience, and entirely optional. This is why I didn't merge #80 which made it the default behavior, and am instead slowly and deliberately building up the capability from the outside in to make sure it doesn't interfere w/ the core mission of this library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this in a sample application and it works as described both in your PR description, src code, and tests.
🚢 it
@jwasilgeo I'mma hold of on documenting/releasing this for the moment, unless you need me to do so. I'm going to take a stab at #87 w/ the hope of making it easier to do #88 - if so we can document and release after those are done. |
Sounds good, thanks! |
@jwasilgeo, I lied, I released 2.2.0 w/ this and just punted on doc'ing it for now. Looks like it may be a while before I get a chance to work on #87 etc. |
¯_(ツ)_/¯ It's all good either way for me. Thanks @tomwayson. |
loadScript()
now takes acss
option that is a URL (string) and (if present) passes that toloadCss()
to load a stylesheet by URLnot yet
yes
not yet. Basically, it's either
loadScript({ css: cssUrl })
orloadModules(['esri/map'], { css: cssUrl })
, but it seems like it's going to be tricky to figure out how that fits into the README, and I may have had too much 🍷to deal w/ that at this hour.yet another step towards resolving #6