vrimar / construct-ui

A Mithril.js UI library
https://vrimar.github.io/construct-ui
MIT License
287 stars 23 forks source link

Buttons using basic: true change background on hover #17

Closed angrytongan closed 4 years ago

angrytongan commented 4 years ago

When using basic: true on a Button, the background where the button would be if basic were false changes colour on hover. This makes it appear that there is a borderless button on hover, rather than no button at all.

Easiest to see on intent negative if you zoom in. Latest Chrome, Mac OS X.

const {
    Button

} = CUI;

const ButtonIntent = {
    view: () => {
        const intents = [ 'primary', 'positive', 'negative', 'warning' ];

        return [
            intents.map((i) => m(Button, {
                basic: false,
                intent: i,
                iconLeft: 'settings',
            })),

            intents.map((i) => m(Button, {
                basic: true,
                intent: i,
                iconLeft: 'settings',
            })),
        ];
    },
};

document.addEventListener('DOMContentLoaded', () => {
    m.route(document.body, '/', {
        '/': ButtonIntent
    });
});
vrimar commented 4 years ago

Are you referring to the light background when hovering over a basic button?

Capture

angrytongan commented 4 years ago

Yep. By design?

vrimar commented 4 years ago

Yep, that's intentional.