GithubHelp home page GithubHelp logo

forsigner / magic-check Goto Github PK

View Code? Open in Web Editor NEW
310.0 310.0 86.0 21 KB

Beautify Radio and Checkbox with pure CSS.

Home Page: http://forsigner.com/magic-check

License: MIT License

CSS 91.33% JavaScript 8.67%

magic-check's Issues

Using display:none breaks accessibility

Great work on this. When using display:none, for hiding radio and checkbox elements it breaks accessibility. When navigating form elements with keyboard elements with display:none don't receive focus.
This conversation could be used as solution for this. Also adding :focus styles would further improve the accessibility.

全选问题

如果用checked 来做全选效果,before 和 after 只触发一次

Print

Hi

I love this, so thanks for your work on it.

However, do you have a print stylesheet for this? Printing any magic checkbox or radio button fails to show if an item was checked/selected.

Thanks

When dynamically adding via JS

When you dynamically add a checkbox or radio via the JS, the animation stops working, that is, the state does not change.
Is it plugin problems or css animation features?

bower.json : main

Hi,

I must put CSS path ("css/magic-check.css") in main attribute of the bower.json unless bower/gruntjs will not work.

Vincent

Elements isn't tabbable

Hello!
Thank you for really beautiful controls!
I have a problem that the elements isn't tabbable. The role attributes doesn't work for this.
I think that it's very important for Web.

This is because native checkbox element is hidden display: none;
For correct working native element doesn't need to be hidden. It's need to be invisible for good view but doesn't hidden.

For myself I apply opacity: 0; but I'm not sure that it's a good idea... You are a pro, I think you can better :)

.magic-checkbox {
  position: absolute;
  opacity: 0; }

And for visual effect of focus I added the outline

.magic-checkbox:focus + label:before {
  outline: -webkit-focus-ring-color auto 5px;
}

I hope for your fix for everyone. Thank you! All the best!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.