pretty-checkbox-vue icon indicating copy to clipboard operation
pretty-checkbox-vue copied to clipboard

Animations

Open jernejrostan opened this issue 6 years ago • 8 comments

Hi,

Just wondering why animations are not working for me. Did copy pasted your example code. Is it connected to icons, as you are using mdi for examples, i have font awesome icons?

Thx!

jernejrostan avatar Mar 01 '18 13:03 jernejrostan

Hi @jernejrostan ,

Thank you for using this component,

it's not connected to icons, but you should import animations in your styles, if you are using Scss for example you should add following line to your Scss file:

@import '~pretty-checkbox/scss/extras/animation';

but if you just import the whole styles in your html there should be no problem. something like following:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pretty-checkbox.min.css">

hamed-ehtesham avatar Mar 01 '18 15:03 hamed-ehtesham

Hi @hamed-ehtesham ,

I did import it in main scss file that im using

@import '~pretty-checkbox/src/pretty-checkbox.scss';

And as i looked into source of this file it seems that it imports all files that are needed. Maybe im doing something wrong?

Thx

jernejrostan avatar Mar 01 '18 15:03 jernejrostan

i just checked it with font awesome,

there is no problem with it, test if adding following line to your html fixes your problem:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/pretty-checkbox.min.css">

hamed-ehtesham avatar Mar 01 '18 16:03 hamed-ehtesham

I've tried this suggestions also, and no luck

Here's part of code

<fieldset class="form-group">
  <label for="code" class="control-label col-md-3">Vertical:</label>
  <div class="col-md-8">
    <p-radio class="p-icon p-curve p-pulse" name="vertical" color="info-o">
      <i slot="extra" class="icon fa fa-check"></i>
      Casino
    </p-radio>
    <p-radio class="p-icon p-curve p-pulse" name="vertical" color="info-o">
      <i slot="extra" class="icon fa fa-check"></i>
      Sportsbook
    </p-radio>
  </div>
</fieldset>

Im testing this un run dev mode. Cant figure out what is wrong.

jernejrostan avatar Mar 02 '18 08:03 jernejrostan

I come across your problem eventually,

this problem has nothing to do with Font Awesome; mdi (and probably others) has (have) the same problem too. sometimes animations doesn't apply to elements they're supposed to apply to, i checked the style of the element (label:before in p-pulse case) and animation property wasn't applied to it

i hope @lokesh-coder fix this problem in next version of library

you can also open an issue here

hamed-ehtesham avatar Mar 02 '18 15:03 hamed-ehtesham

thanks, i'll try to figure out solution before i bug them there :)

jernejrostan avatar Mar 05 '18 20:03 jernejrostan

Anyway, why doesn't toggle have animations? I mean, I can see animations from almost every possible configurations from Pretty Checkbox, except toggle. From where I start searching from to help you develop that?

Either when we have color and off-color animations are disabled.

marcosrocha85 avatar Sep 24 '18 19:09 marcosrocha85

Where do you import pretty-checkbox.scss in? I found if we do that in scoped scss of single file component, styles would only apply to root because of vue's policy.

bendwarn avatar Nov 12 '19 10:11 bendwarn