Skip to content

Commit

Permalink
Merge pull request #8 from denOldTimer/chapter-six
Browse files Browse the repository at this point in the history
Chapter six
  • Loading branch information
denOldTimer authored Mar 9, 2021
2 parents 932f580 + 6e29d50 commit c3f3b32
Show file tree
Hide file tree
Showing 8 changed files with 14,850 additions and 10,100 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,30 @@ Lifecycle hooks : { [beforeCreated], [created], [beforeMount], [mounted],

---

## Basics : Chapter 6 : Dynamic Styling, Scss & Global styling

1. install two new files

- sass `npm i -D sass`
- sass-loader `npm i -D sass-loader@10.1.1`
- why version `10.1.1` because Vue 3 doesn't play nice with the latest version od sass-loader
- restart your server

2. refactoring css to scss of the `UserProfile.vue` page
3. refactoring css to scss of the `TwootItem.vue` page

4. Dynamic styling: adding a word count to the form

- add an conditional class --exceed if newTwootCharacterCount > 180 chars

5. Global styling:
- IMPORTANT make shore your App.vue style lang="scss", otherwise your app will not startup with global stylings
- add a new folder styles and a file base.scss in the root of your src directory `./src/styles/base.scss`
- create a `vue.config.js` file in the root of your project
- restart server the vue.config.js isn't hot reload

---

[data]: https://v3.vuejs.org/api/options-data.html#data-2
[props]: https://v3.vuejs.org/api/options-data.html#props
[computed]: https://v3.vuejs.org/api/options-data.html#computed
Expand Down
Loading

0 comments on commit c3f3b32

Please sign in to comment.