Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter six #8

Merged
merged 5 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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