leny / kouto-swiss

A complete CSS framework for Stylus
http://leny.me/kouto-swiss/
MIT License
377 stars 34 forks source link

Add 'user-select' to vendor mixins #44

Closed mehcode closed 9 years ago

mehcode commented 9 years ago

http://caniuse.com/#feat=user-select-none


This should probably generate as follows:

.unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

I'm not sure how you'd like adjust the vendor stuff to do the above.

leny commented 9 years ago

Hi, thanks for the report (and the request).

Will you please add some unit tests for this feature ?

mehcode commented 9 years ago

Will you please add some unit tests for this feature ?

Added. Also updated to generate what I mentioned in the opening.

leny commented 9 years ago

Hi, thanks for the tests. I would prefer to keep using the ks-vendors() internal mixins, since the used vendors prefixes in the output will be dependent of which support you define with kouto swiss. I will correct that with the merge.

leny commented 9 years ago

Has been implemented & published in version 0.11.7.

Thanks again.

mehcode commented 9 years ago

@leny If you use your ks-vendors mixin it doesn't generate it 100% correctly (in my opinion).

It'd be missing the -webkit-touch-callout: value line.

leny commented 9 years ago

I'm a bit confused about including it, since it's really specific and not totally related to the user-select property.

In the current case, I think the best is to define your own mixin extending the one from kouto-swiss, like this :

user-select( value )
        -webkit-touch-callout: value
        ks-vendor( "user-select", arguments, feature: "user-select-none" )