When using vue.js
, most of my css
works well. However, some specific instances do not work as expected. An example of this is in Home.vue:
<template>
...
</template>
<script>
...
</script>
<style>
h1 {font-size:2.6em;font-weight:bold;color: #848381;}
</style>
During development mode on my notebook, the h1
css displays correctly. But after running npm run build
and uploading the files to an aws webserver
, the color of the h1
changes.
Additionally, while inspecting the site using Chrome Dev Tools, I noticed that some css properties are automatically added. Specifically, for all h1 to h6 tags, color:inherit is applied. Disabling this css property results in the color reverting back to what it was during development mode.
https://i.sstatic.net/YoxEf.png
How can I resolve this issue? Which area should I focus on troubleshooting?