You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebComponent support - specify where dynamic styles go instead of head #540
We try to integrate Gridstack in a WebComponent/Polymer environment which means to embed Gridstack in a custom element. We recognized that the dynamically calculated stylesheets for the height of items is added to the head node, so the styles are not available inside the shadow DOM of the custom element.
In order to enable Gridstack for WebComponents it would be great if Gridstack would be aware of the Shadow DOM and for example allow to provide the DOM root where to place the dynamically created stylesheets.
Can you please say if this is expected to be fixed? Currently use with polymer is simply impossible.
If it's not a priority, is there a recommended workaround in the meantime?
changed the title [-]Adjustable node for dynamic height styles[/-][+]WebComponent support - specify where dynamic styles go instead of head[/+]on Dec 22, 2019
I use angular component for this lib, and having local to that components styles would be better and might be using webcomponents soon as well.
@VinodLouis wish you had done a PR instead of creating a fork off the code!
looking at your file you have var GridStackEngine = function (width, onchange) which means it is very very old (or not based on gridstack but maybe gridster?) as the float param feature was added back in 11/19/2014 2 days after this project started....
(all the methods were renamed to camelCase in 2/17/2016 which do you not have either). And you released your in Aug 2017 ???
Note: that gridstack auto-generated CSS files added to the head on 11/25/2014 (for y and height in px) which you don't do Note2: the only real change I see vs our first file (other than missing float, oneColumn, etc...) is changed appendTo: 'body', to appendTo: 'parent',
Activity
IftachSadeh commentedon Jan 25, 2017
Hey radiolips,
Can you please say if this is expected to be fixed? Currently use with polymer is simply impossible.
If it's not a priority, is there a recommended workaround in the meantime?
VinodLouis commentedon Aug 24, 2017
Any one got workaround for this ?
VinodLouis commentedon Aug 25, 2017
I tried something in case if anyone is interested https://github.com/VinodLouis/polymer-gridstack
[adumesny] Note: this code IS NOT BASED on gristack (nor maintained), or is older than 2014.
radiolips commentedon May 10, 2018
@VinodLouis Can you create a PR with changes such that gridstack would work as a web component?
[-]Adjustable node for dynamic height styles[/-][+]WebComponent support - specify where dynamic styles go instead of head[/+]adumesny commentedon Dec 22, 2019
I use angular component for this lib, and having local to that components styles would be better and might be using webcomponents soon as well.
@VinodLouis wish you had done a PR instead of creating a fork off the code!
looking at your file you have
var GridStackEngine = function (width, onchange)which means it is very very old (or not based on gridstack but maybe gridster?) as thefloatparam feature was added back in 11/19/2014 2 days after this project started....(all the methods were renamed to camelCase in 2/17/2016 which do you not have either). And you released your in Aug 2017 ???
Note: that gridstack auto-generated CSS files added to the head on 11/25/2014 (for y and height in px) which you don't do
Note2: the only real change I see vs our first file (other than missing float, oneColumn, etc...) is changed
appendTo: 'body',toappendTo: 'parent',adumesny commentedon Feb 17, 2020
the offending code is:
which can be overridden using:
adumesny commentedon Feb 17, 2020
sorry for taking so long to address. fixed in 0.6.4
WebComponent support