So basically I'm trying to use custom sass at work for a project but the npm run watch gives me the following error:
Incompatible units px and rem.
followed by saying the issue resides here (in _variables.scss):
$input-height-base: ($line-height-computed + ($padding-base-vertical * 2) + 2) !default;
(It is needed for the template in a vue.js component for our website)
I've tried solutions from Incompatible units: 'rem' and 'px' - Bootstrap 4 and Laravel Mix so changing
$font-size-base: 14px !default;
to
$font-size-base: 1rem;
doesn't work. I've also tried the other steps suggested in all of the answers. I've come across another suggestion of commenting out the following in app.scss :
@import 'variables';
but no luck with that either. Also, inside of bootstrap.js require('bootstrap); is set so it isn't that either.
In case you need to see it, my component:
Vue.component('my-component', require('./components/MyComponent.vue').default);
const app = new Vue({
el: '#example',
});
usage:
export default {
name: "my-component",
props: {
headerColor: {
type: String,
default: ""
}
},
data() {
return {
input: null,
input: null,
input: null,
input: null,
input: null,
input: null,
input: null,
input: null,
input: null,
input:
"Some example text"
};
},
};
php file:
<div id="example">
<my-component></my-component>
</div>
I'm hoping that once it works I'll be able to load my component on our website so I can begin development with it. Any help is appreciated! I hope I've provided enough information as I'm about to leave work for the night but I will try my best to provide more before I get back if needed.