-
Notifications
You must be signed in to change notification settings - Fork 15
Styling
You can create styles which will apply to any page. Let's try editing and changing the text color of the watch.
-
Open
client/src/main.css -
Let's look at the following piece of code.
#watch {
color: #fff;
}
To give all pages a red text by default, change the following code color: #fff; to color: red;
-
#watchis a CSS ID that applies to all pages in our watch. Making these kind of global changes in themain.cssfile helps us keep track of all changes that will affect our watch globally. Feel free to play around, but make sure to revert back to the original code.
- You can find an example of this in
client/src/js/pages/homePage/homePage.css
#home {
font-style: italic;
}
-
Let's try editing and changing the text color ONLY this page in the watch. In the
#homeblock, add the linecolor: blue;. -
Take a look to see if any other page has been affected or not.
#homeis a CSS ID that applies to only to the home page in our watch. Making these kind of global changes in thehomePage.cssfile helps us keep track of all changes that will affect our watch's home page. Feel free to play around, but make sure to revert back to the original code.
-
Create a new CSS file
client/src/js/pages/contactsPage/contactsPage.css -
Include the CSS file in
client/src/app.csswith the following code@import './js/pages/contactsPage/contactsPage.css'; -
Add your custom styles using the selector
#contactsto limit the scope.