mixin in js
/*
Mixins are Sass functions that group CSS declarations together.
We can reuse them later like variables.
We can create a mixin with @mixin ex: @mixin variable-name {}
we can create a mixin as a function show below and add parameters as well
After creating the mixin, we can use it in any class with @include command.
This approach simplifies the code.
*/
/****example-1****/
@mixin my-flex {
display:flex;
align-items:center;
justify-content:center;
}
/****example-2****/
$font-color: red;
@mixin my-font($font-color) {...}
/****HOW TO USE****/
div {
@include my-flex;
}
shantay
Also in JavaScript:
- nodejs check if variable is undefined
- or operator js
- react player disable download
- check if isset variable js
- javascript split regex
- react big calendar messages
- jquery window trigger resize
- addeventlistener hover js
- add firebase javascript
- unique array javascript es6 Map
- javascript check if string is json parsable
- how to right text with js
- javascript declare array
- how to stop react app in terminal
- js object random key
- javascript get every odd element
- c# beautify json string
- javascript href redirect
- javascript check if key exists in object
- drupal 8 node has field
- javascript to uppercase
- javascript regex
- reactnode prop-types
- npm http angular