Top "Mixins" questions

A mixin is a way to enhance an object with properties or methods from another object without inheriting from that object.

Is there a way to stub a method of an included module with Rspec?

I have a module that is included in another module, and they both implement the same method. I would like …

ruby rspec mixins stubbing
ruby module_function vs including module

In ruby, I understand that module functions can be made available without mixing in the module by using module_function …

ruby module mixins
How to set keyframes name in LESS

I try to set up this LESS mixin for CSS animation keyframes: .keyframes(@name, @from, @to) {; @-webkit-keyframes "@name" { from { @from; } …

css less mixins css-animations
CSS-Less class extend class with pseudo class

I was wondering how I could do something like the following with less css: .btn { color : black; } .btn:hover { color : …

css mixins less pseudo-class
LESS mix-in for nth-child?

I'm trying to make a LESS mixin that will give me this output: .resource:nth-child(8n+1) { clear: left; } I've got …

css less mixins
What is C++ Mixin-Style?

I have just come across this keyword C++ Mixin-Style, do anyone know what this is? In this post, is has …

c++ mixins
How to mixin and call link_to from controller in Rails?

This seems like a noob question, but the simple answer is eluding me. I need to call link_to in …

ruby-on-rails helpers actionview link-to mixins
CSS LESS Placeholder Mixin

I want to create a placeholder mixin as follows. However, this fails to compile in LESS version 1.7.0. .placeholder(...) { ::-webkit-input-placeholder: @arguments; :…

css less mixins
Less mixin with optional parameters

I have a Less mixin defined as: .fontStyle(@family, @size, @weight: normal, @style: normal, @color: #ffffff, @letter-spacing: normal) { font-family: @family; …

css parameters less mixins
Bootstrap 4 media-queries mixins not working with Bootstrap 4 via CDN

I'm using bootstrap 4 connected via CDN, all works fine, but only mixins not working. I have this error in php …

sass gulp media-queries bootstrap-4 mixins