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

Add CSS Vars #119

Open
rbrisita opened this issue Aug 18, 2022 · 1 comment
Open

Add CSS Vars #119

rbrisita opened this issue Aug 18, 2022 · 1 comment

Comments

@rbrisita
Copy link

rbrisita commented Aug 18, 2022

First thanks for this. It's a time saver.

Looking at the CSS, the styles would benefit from using CSS variables for attributes like width, height, color, duration, timing function, etc. For my purposes, I changed the inner color:

      :root {
        --inner-color: #7cf358
      }

      .hamburger.is-active .hamburger-inner,
      .hamburger.is-active .hamburger-inner::before,
      .hamburger.is-active .hamburger-inner::after {
        background-color: var(--inner-color);
      }

      .hamburger-inner,
      .hamburger-inner::before,
      .hamburger-inner::after {
        width: 40px;
        height: 4px;
        background-color: var(--inner-color);
        border-radius: 4px;
        position: absolute;
        transition-property: transform;
        transition-duration: 0.15s;
        transition-timing-function: ease;
      }
@TomoyaKuroda
Copy link

This repo isn't actively maintained so I created it by myself. Please check it out https://github.com/TomoyaKuroda/CSS-Variables-Hamburgers

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

2 participants