These are chat archives for ractivejs/ractive

9th
Oct 2017
lazylester
@lazylester
Oct 09 2017 00:17
there's an error, Chris. If I include (in the template file) an element with the attribute 'as-ractive_fileupload'='true' it fails to compile, but if I delete that attribute it compiles fine.
Where the template file, here is loaded via a script src attribute.
if the template is included iso loaded from another file, that attribute does not mess up the compilation.
Chris Reeves
@evs-chris
Oct 09 2017 00:37
are you putting single quotes around the name side too?
I only have access to my phone the playground right now, but I'll take a look when I get to a real machine
Anatoli Radulov
@avoto
Oct 09 2017 01:16
@evs-chris what is the best way to share some root/parent cssData with its nested components. I have this in my parent cssData: { globalColor: 'red' } then <style rel="ractive"> .subComponent { font-size: 20px; color:{{globalColor}}; } </style> inside my sub-component. So in order for me to use that parent color inside oninit I did this.set('@style.globalColor',this.parent.get('@style.globalColor')). Maybe it makes sense to have a way to pass the cssData of the current instance inside the child one like this: <nested-component @style={{@style}} /> (just thinking out loud)
Chris Reeves
@evs-chris
Oct 09 2017 01:44
cssData is inherited if you use const Parent = Ractive.extend(...); const Child = Parent.extend(...);
you can even Ractive.styleSet('globalColor', ...) and all ractive instances will inherit globalColor
Anatoli Radulov
@avoto
Oct 09 2017 01:47
In my case I use RCU together with RVC, where new components are simply created via Component = Ractive.extend( options ); - so, they don't have inheritance.
I will give Ractive.styleSet() a go.
lazylester
@lazylester
Oct 09 2017 02:13
@evs-chris yes... single quotes for attribute name and value.
Chris Reeves
@evs-chris
Oct 09 2017 02:21
interesting... does it work without the quotes on the name?
lazylester
@lazylester
Oct 09 2017 04:37
@evs-chris it does!! who'da thought! not me! Thanks Chris.
kouts
@kouts
Oct 09 2017 19:01
Quick question: If ractive-load does not work with current Ractive version then why is it mentioned in the Loaders section https://ractive.js.org/integrations/#vanilla ?
I don't know if other loaders such as rvc are working
Chris Reeves
@evs-chris
Oct 09 2017 20:15
carryover?
I really need to get around to getting the publish bit for ractive-load, rvc, and friends
there's no reason they can't work with ractive 0.8+, they just need to be updated slightly