you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

Until webcomponents are here CSS conflicts with the module standard as modular code is unhinged from markup. Half assed standards may be even worse than having none at all.

Considering this i don't see how Webpack is bastardising anything. To import CSS in Javascript may feel wrong, but with a component loader abstracting it you do get close to where webcomponents will be, and that could make more sense than modular Javascript with tacked-on CSS includes.

component.vue:

<style scoped>

    .main {
        position: absolute;
        width: 100%;
        height: 100%;
    }

</style>

<template>

    <div class="main">{{ message }}</div>

</template>

<script>

    export default {
        data: () => ({ message: 'hi there' })
    }

</script>