Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove styles #13

Open
samburgers opened this issue Sep 18, 2017 · 3 comments
Open

remove styles #13

samburgers opened this issue Sep 18, 2017 · 3 comments

Comments

@samburgers
Copy link

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

Cheers!

@jdvivar
Copy link
Contributor

jdvivar commented Sep 27, 2018

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!

@missmatsuko
Copy link

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.

@jesuismaxime
Copy link

jesuismaxime commented Aug 10, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants