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

Example for :doodle doesn't work #58

Open
zemian opened this issue Jul 30, 2021 · 1 comment
Open

Example for :doodle doesn't work #58

zemian opened this issue Jul 30, 2021 · 1 comment

Comments

@zemian
Copy link

zemian commented Jul 30, 2021

Hi, The first example for :doodle didn't work for me https://css-doodle.com/#selector-:doodle

https://codepen.io/zemian/pen/wvdjrMM

:doodle { --s: 0 }
:doodle(:hover) { --s: 1 }

transition: .5s cubic-bezier(.175, .885, .32, 1.275);
transition-delay: @rand(500ms);
transform: translateY(calc(var(--s) * 100%));

But if I add some setup like this, it worked:

  :doodle { @grid: 5 / 8em; grid-gap: 1px; }
  background: #60569e;
  
  :doodle { --s: 0 }
  :doodle(:hover) { --s: 1 }

  transition: .5s cubic-bezier(.175, .885, .32, 1.275);
  transition-delay: @rand(500ms);
  transform: translateY(calc(var(--s) * 100%));
@yuanchuan
Copy link
Member

Yes I only put the main part of the example code and it's not complete.

It'd be better to attach a demo link in the docs.

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

No branches or pull requests

2 participants