vue-headroom icon indicating copy to clipboard operation
vue-headroom copied to clipboard

remove styles

Open samburgers opened this issue 6 years ago • 3 comments

Hi there, any chance for the option to remove any inline styles, and just use the classes for CSS changes.

Cheers!

samburgers avatar Sep 18 '17 13:09 samburgers

Yes, you can do that yourself. You need to redefine the style function from this line: https://github.com/dalphyx/vue-headroom/blob/master/src/headroom.vue#L123

That computed function is only used in the style property: https://github.com/dalphyx/vue-headroom/blob/master/src/headroom.vue#L2

When importing, just redefine the function to return an empty string instead:

import headroom from 'vue-headroom'
headroom.computed.style = () => ''

I hope it helps!

jdvivar avatar Sep 27 '18 13:09 jdvivar

Can this be documented? I thought this plugin would be more like the original headroom.js, but the inline styles have been getting in my way.

missmatsuko avatar Sep 06 '19 01:09 missmatsuko

I think that this need to be a prop to wether or not use the inline-style (and I guess that most of the time that will be turn off). ie. :inline="false" or something else.

jesuismaxime avatar Aug 10 '20 18:08 jesuismaxime