This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
</div> | |
</template> | |
export default { | |
name: 'sass loading component', | |
} | |
</script> | |
<style lang="scss" scoped> | |
// we can write sass now, woohoo! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
module: { | |
rules: [ | |
// ... other rules omitted | |
// this will apply to both plain `.scss` files | |
// AND `<style lang="scss">` blocks in `.vue` files | |
{ | |
test: /\.scss$/, | |
use: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install sass-loader node-sass -s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
</div> | |
</template> | |
export default { | |
name: 'average component', | |
} | |
</script> | |
<style scoped> | |
// css goes here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var user = { name: 'Bill', age: 31, city: 'Dallas', state: 'TX' } | |
// object destructuring | |
var {city, state} = user; | |
console.log(city, state); // "Dallas", "TX" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = { a: 1, b: 4} | |
// dot operator | |
obj.a // 1 | |
// bracket notation | |
obj['b'] // 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var welcome = `Welcome!` // Welcome! | |
var name = 'John Doe' | |
var greeting = `Hello, ${name}.` // Hello, John Doe. | |
// you can use more than one variable in a template literal | |
var month = 5 | |
var day = 30 | |
var year = 2019 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = []; | |
jQuery.map(obj , function (n, i) { | |
data[n.name] = n.value; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box-shadow: inset 0px 1px 3px rgba(0,0,0,.5); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.selector { | |
// small screens (xsmall - small) | |
@include breakpoint(small){ | |
// add styling here | |
} | |
// medium screens (small - medium) | |
@include breakpoint(medium){ | |
// add styling here |