hey @pierre6, @opaper and other developpers,
I just released a new free plugin to help fixing responsive height issues. Have a look!
Hi,
I tried to use âposition:stickyâ to create a sticky header once the user scrolls past the element - it did not work however.
Was anyone able to use (position: sticky) on an element? Or has anyone an idea why it is not working?
Thanks in advance for the help.
Maze
There could be numerous reasons why itâs not working. As this article explains, one of the reasons could be that your sticky element does not have sibling elements to âstick overâ. In Bubble, all elements we put on page are wrapped inside a âboxâ group and those groups inside a âlineâ group; Itâs how the engine achieve its responsive behaviour.
Depending on the complexity of your page, if your header is nested into a group that is nested into another group, that adds a lot of levels, so your sticky element is alone in its place.
I think youâd be better off with javascript; something like if the distance between my header and the top of the page is less than scroll distance, make the header's position fixed on top
.
Hey Julien,
Running into a problem which you may have a solution for.
Enjoying Classify btw!
Merci
It was made to be enjoyed
I just dropped a quick reply on your threadâŠ
Hi Julien and thank you for this cool plugin.
I would be really interested if you could point me or show an example of workflow changing the attribute to add a remove a class dynamically
Thank you
Hey @julienallard1 !
Iâm looking to add custom properties to my HTML elements. Would this plug-in solve that problem?
For instance in the source code of my app I want it to look like
Thanks!
@bubblealex
Classify only allows to alter the class attribute of elements. It can help if you want to add custom attributes to elements referred to by class:
document.querySelectorAll('.myClass').forEach(elm => {
elm.dataset.itemprop = 'name';
});
Is there a way to use âscroll-snapâ in Bubble??
I never used that rule, but I canât see why you couldnât; after all Bubble is just a websiteâŠ
hey @maxencepautre, sorry I overlooked your question.
Classify doesnât have workflow actions to add/remove classes. Instead you can use conditions under the condition tab from the elementâs property panel.
If though, in your use case, you need to alter an elementâs classname form a workflow here are 2 solutions (I recommend the first):
- Give your element a unique ID and use a Run javascript workflow action from the plugin Toolbox to add/remove classes by referring to the ID:
// Add a class:
document.querySelector('#elementID').classList.add('myClass');
// remove a class:
document.querySelector('#elementID').classList.remove('myClass');
// Toggle a class (add if absent or remove if present):
document.querySelector('#elementID').classList.toggle('myClass');
- Add as Class List custom state to your element, with conditions that add/remove classes through the ID field. Then, in your workflow simply add/remove the name of the classes from/to the custom state list and the conditions will replicate the list content to the classname.
@julienallard1 This is the documentation I found for implementing scroll-snap.Here they are using parent and child class.I am unable to understand how to achieve this using âclassifyâ plugin.Any help would be highly appreciated.
...
.container {
scroll-snap-type: y mandatory;
}
.child {
scroll-snap-align: start;
}
Does the element with the .child
class needs to be a direct child of the .parent
? If not then you can give the .parent
class to the repeating group (assuming that you want to achieve the scroll-snap thing in a repeating group) and the .child
class to an actual element within the RGâŠ
hi,
is it possible to make the text font-size of a text element depending on the view port width ?
What i did:
- assigned text element a class: â {addClass: âexampleClassâ}
- placeed html element with code:
<âstyleâ>
.exampleClass{
font-size: 20vw; â doesnt work
color: #009EE3; â doesnt work
box-shadow: 12px 12px 12px #000000; â this works
<"/style">
}
Someone knows what i have to do ?
Thx and best regards,
Benjamin
Perhaps your CSS is overridden by an other font-size and color statement. In chrome you can right-click an element and choose inspect to see its properties. If it is indeed overridden, youâll see your CSS striked out.
Although it should be used as a last resort, you can append the !important
statement just before the semi-colon to tell the browser that this CSS property must have priority above all others.
thank you very much for the great reply.
You are right, it was really overwritten.
How can I see which statemen has overwritten it ?
With the !important statement it has worked, thanks.
As described in my previous post, you can see that when you inspect the element. The property that is applied isnât striked out.
Hi all - have you noticed any disruption in how CSS is working in Bubble? Everything was working properly in my app until a few days ago.
I added the class âcontinuous-1â to my element as follows:
And I have the CSS code in an html element as below:
But the element is not animating at all (and it should according to the CSS code)
Any idea why?
bump. Anyone is experiencing the same issues with the Classify plugin not working anymore?
For Classify to stop working, there would need to have some code that intentionally stops it.
You should use the browserâs debugger to find where it breaks. If you inspect the element that has Classify commands and the elementâs ID still contains the commands, then yes, for some reason Classify hasnât parsed it.
Otherwise, still while inspecting the targeted element, you can check if your CSS rules are applied or not.
There can be many reasons why itâs not working. Have you reviewed your CSS for errors like missing semi-colons or brackets?