My scss file contains a few classes. Each time I save the file, corresponding css files are generated. My initial thought was that I only need to import the resulting css in my main.js file to utilize it throughout my entire application. For example, let's say I have the following css class in my index.scss:
.button-label {
color: white;
font-family: "Comic Sans MS", cursive, sans-serif;
font-weight: bold;
}
I imported its file in main.js like this:
import "@/assets/styles/index.css";
...
const vm = new Vue({
store,
router,
Snotify,
vuetify,
render: h => h(App)
}).$mount("#app");
export default vm;
I would expect to now be able to use the button-label class in every component within my application. Unfortunately, it does not seem to work. It appears as though the specified classes are being ignored. Do I need to additionally import the mentioned file in my components? What am I doing incorrectly? How can I properly globally import stylesheets? Thank you for any assistance. Below is my index.html file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>