I want to override the global css with the css defined in vue-loader component.
Currently I have this in index.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dashboard</title>
<link rel="stylesheet" href="build/styles.css">
</head>
<body id="the-dashboard">
<div id="app">
</div>
//...... Other Code Goes Here ......//
</body>
</html>
And in my vue component I have a scoped style:
<template>
// ..... Some Code Here ..... //
</template>
<style scoped>
// ... css code here ... //
</style>
<script>
// ... script goes here ... //
</script>
What I want is that when this component is loaded, it should totally override the global css in index.html. Which is to say that it should behave in such a way that only scoped css should be the one that should apply to the whole body(the css imported in index.html should not at all be used).
Is that possible?
<style scoped>should have done that? If your main css file classes are also present in<style scoped>It should have overridden?importa css reset file in your component.