martywallace / vue-keyboard

A simple virtual keyboard for Vue.js.
MIT License
153 stars 16 forks source link

Support for icon fonts #14

Open kennethllamasares opened 7 years ago

kennethllamasares commented 7 years ago

Hi i think it would be cool, if font icons are supported.

martywallace commented 7 years ago

@kennethllamasares You could add icons yourself (e.g. with icomoon) doing something like:

.vue-keyboard button[data-action="backspace"]:before {
    font-family: 'icomoon';
    font-size: 14px;
    content: '\xxxx';
}

And then either not including text for that action (layouts="{backspace}") or styling the text out of the button with text-indent or some other means.

If you have ideas for how I could implement this to be more achievable though I am happy to work on that, or if you think I should include some icons by default (e.g. for shift, backspace) then I can consider that too.