These are chat archives for skatejs/skatejs

10th
Nov 2016
Qiu-Kejian
@Qiu-Kejian
Nov 10 2016 07:42

Hello.

I am trying to build a few custom elements that render into svg.
The tricky part is make them composable.
For example:
<ekg-view>
<ekg-cal></ekg-cal>
<ekg-view>

Here <ekg-view> render into a <svg>,
and <ekg-cal> render into a <g> that is a sub element of <svg>.

For <ekg-view>, it's OK to rendered into shadowRoot.
But for ekg-cal, it seems not possible to get the <svg> as render host.

someone any idea?

Qiu-Kejian
@Qiu-Kejian
Nov 10 2016 07:47
I am trying to revise skatejs and expose it's "render host" and "render root".
"render host" is now the shadowRoot.
"render root" is the root element that been rendered.
With above 2 things exposed, custom elements is allowed to get parentNode's "render root" as "render host".
Is this going to work?
Hello.
16 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "prepublish"
17 error node v7.1.0
18 error npm v3.10.9
19 error code ELIFECYCLE
20 error skatejs@ prepublish: sk-bundle
20 error Exit status 1
21 error Failed at the skatejs@ prepublish script 'sk-bundle'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the skatejs package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error sk-bundle
21 error You can get information on how to open an issue for this project with:
21 error npm bugs skatejs
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls skatejs
how can i get sk-bundle to work?
Trey Shugart
@treshugart
Nov 10 2016 08:59
Is there any information in your npm.log? It's hard to tell what happened from that message.
For your avg question, can you post a link to a jsbin, webpackbin or codepen, please?
s/avg/svg
Qiu-Kejian
@Qiu-Kejian
Nov 10 2016 09:38
Hello. Please help me with skatejs build problem.
blob
blob
Trey Shugart
@treshugart
Nov 10 2016 10:38
sorry i meant npm-debug.log
I’m not seeing much more information in those screenshot than your paste. Your npm-debug.log will probably have some more information.
Keuller Magalhaes
@keuller
Nov 10 2016 12:18
Hi guys, I'm trying to get start to SkateJS, but I can't apply classes on my components..there is no error and when I inspect the code on the browser "shadow dom" are correct
any tip ?
Trey Shugart
@treshugart
Nov 10 2016 12:19
@keuller can you do up a code example, please?
Keuller Magalhaes
@keuller
Nov 10 2016 12:20
Screen Shot 2016-11-10 at 10.19.23.png
Screen Shot 2016-11-10 at 10.20.57.png
@treshugart see the last image ... it's my main component
Trey Shugart
@treshugart
Nov 10 2016 12:22
Oh, so css classes aren't applying inside the shadow root? That's expected behaviour: shadow dom encapsulation.
Keuller Magalhaes
@keuller
Nov 10 2016 12:22
yep...
Trey Shugart
@treshugart
Nov 10 2016 12:22
You have to add a style tag to each shadow root containing the styles you intend to use.
Keuller Magalhaes
@keuller
Nov 10 2016 12:24
ok, but I think it is just for my custom styles...I'm trying tio use Bulma CSS, how can I use it ?
Bit skate doesn't do anything with styles.
You could try taking the bulma Styles you need for a particular component and placebit in the style of a shadow root.
Unfortunately css frameworks need to catch up.
Keuller Magalhaes
@keuller
Nov 10 2016 12:27
ok..I got it
Trey Shugart
@treshugart
Nov 10 2016 12:28
Font styles bleed, but nothing else does.