inuitcss / CONTRIBUTING

[DEPRECATED] [go to intuitcss/inuitcss]
https://github.com/inuitcss/inuitcss
11 stars 0 forks source link

Tools/Mixins - Link States #22

Closed corbpaul closed 8 years ago

corbpaul commented 9 years ago

I find myself writing &:hover, &:focus and &:active quite a lot through code in the past but have found this little mixin quite useful.

Not sure if it could fit into inuit?

///*------------------------------------*\
//    #LINK-STATES
//\*------------------------------------*/

// Create consistent user interact states
// e.g.
//
// .foo {
//      @include inuit-interact-states {
//          color: #3399FF;
//          text-decoration: underline;
//      };
// }
//
// This will generate hover, focus and active states
//
// .foo:hover,
// .foo:focus,
// .foo:active {
//      color: #3399FF;
//      text-decoration: underline;
// }

@mixin inuit-link-interact-states {

    &:hover,
    &:focus,
    &:active {
        @content;
    }
}
csshugs commented 9 years ago

@corbpaul I guess @csswizardry would say that this would be too cosmetic to fit into the framework. I do as well, although I think this could be useful to many people. But I think inuitcss aims to provide just the necessary stuff and helps you getting started with your project, instead of "dictating" things like link states. Don't saying this would be some kind of special case, but likely something most people would do slightly different than your approach. I'm sure many people may find this mixin useful though, so you could provide this as some kind of inuit-plugin and create a repository yourself (like so) and register it at bower/npm. But integrating this into the framework itself would be too specific in my opinion. In other words: I think there are many other possible little useful things like this mixin that would be helpful. If we would start integrating all these little things, the framework would become bloated very quickly. And bloated is exactly what inuitcss don't wants to be.

Crawleyprint commented 9 years ago

@csshugs +1 plus, I rarely want the states to look the same, not sure about others

nenadjelovac commented 9 years ago

@csshugs

+1.

anselmh commented 8 years ago

Thanks for the idea! As this adds extra-complexity and is very opinionated (not much agreement here) I’m going to close this now.