vue components @import css

not support css3 @import

https://github.com/vuejs/vue-loader/issues/138#issuecomment-436847816


@charset "UTf-8"; /**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
*
* @description links.css
*
*/ a {
text-decoration: none;
color: #0f0;
}

<style>
@import "./links.css";
/* global css*/
a {
text-decoration: none;
}
</style> <style scoped lang="scss">
/* local css */
</style>

solutions

https://vuejs.org/v2/guide/single-file-components.html#What-About-Separation-of-Concerns

https://forum.vuejs.org/t/help-imported-css-styles-conflict-between-components/5687/4

<style src="./links.css">


<style src="./links.css">
/* global css*/
a {
text-decoration: none;
}
</style> <style scoped lang="scss">
/* local css */
</style>

css in js


<script>
// css in js
import "./links.css";
export default {
name: 'links',
}
</script> <style>
/* @import "./links.css"; */
/* global css */
a {
text-decoration: none;
}
</style> <style scoped lang="scss">
/* local css */
</style>


$ style src

what fuck tricks ???

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src

https://www.w3.org/TR/html401/present/styles.html

https://www.w3schools.com/TAGs/tag_style.asp

https://www.w3schools.com/TAGs/ref_standardattributes.asp

vue components & `@import css` bug的更多相关文章

  1. webpack4对第三方库css,项目全局css和vue内联css文件提取到单独的文件(二十二)

    在讲解提取css之前,我们先看下项目的架构如下结构: ### 目录结构如下: demo1 # 工程名 | |--- dist # 打包后生成的目录文件 | |--- node_modules # 所有 ...

  2. vue & components & props & methods & callback

    vue & components & props & methods & callback demo solution 1 & props & data ...

  3. ie6,ie7,ie8 css bug兼容解决方法

    IE浏览器以不支持大量的css 属性出名,同时也因其支持的css属性中存在大量bug. 这里收集了好多的bug以及其解决的办法,都在这个文章里面记录下来了!希望以后解决类似问题的时候能够快速解决,也希 ...

  4. Vue过渡效果之CSS过渡

    前面的话 Vue 在插入.更新或者移除 DOM 时,提供多种不同方式的应用过渡效果.本文将从CSS过渡transition.CSS动画animation及配合使用第三方CSS动画库(如animate. ...

  5. vue中引入css文件

    两种方式引入css文件,一种是直接在main.js中引入(也可以在其他的.vue文件中的<script></script>标签中),即下面这种写法: import 'eleme ...

  6. IE下css bug集合-翻译自haslayout.net

    概述IE浏览器以不支持大量的css 属性出名,同时也因其支持的css属性中存在大量bug. 本页列举了IE下的一些问题,实例样本和一些我们已知的解决方法. 尽管我已经尽力按照它们本来的性质对它们进行分 ...

  7. vue使用import来引入组件的注意事项

    Vue使用import ... from ...来导入组件,库,变量等.而from后的来源可以是js,vue,json.这个是在webpack.base.conf.js中设置的: module.exp ...

  8. vue 引入通用 css

    1.在入口 js 文件 main.js 中引入,一些公共的样式文件,可以在这里引入. import Vue from 'vue' import App from './App' // 引入App这个组 ...

  9. vue中的css作用域、vue中的scoped坑点

    一.css作用域 之前一直很困扰css的作用域问题,即使是模块化编程下,在对应的模块的js中import css进来,这个css仍然是全局的.导致在css中需要加上对应模块的html的id/class ...

随机推荐

  1. java基础 序列化反序列化流 实现Serializable 接口 自动装载序列号到对象文本文件如修改不能反序列化对象文本,除非自定义long型常量 打印流

    package com.swift.baseKnowledge; import java.io.File; import java.io.FileInputStream; import java.io ...

  2. LeetCode47.Permutations II(剑指offer38-1)

    Given a collection of numbers that might contain duplicates, return all possible unique permutations ...

  3. MySQL5.6基于MHA方式高可用搭建

    master 10.205.22.185 #MHA node slave1 10.205.22.186  #MHA node+MHA manager slave2 10.205.22.187  #MH ...

  4. springMVC 面试题整理

    1. springMVC怎么样把某个请求映射到特定的方法上面? 答:直接在方法上面加上注解@RequestMapping,并且在这个注解里面写上要拦截的路径. 2. @RequestMapping注解 ...

  5. PHP队列的实现

    队列是一种特殊的线性表,它只允许在表的前端,可以称之为front,进行删除操作:而在表的后端,可以称之为rear进行插入操作.队列和堆栈一样,是一种操作受限制的线性表,和堆栈不同之处在于:队列是遵循“ ...

  6. Python中的not, and, or

    logical_operator_lst = [ ('and 与运算',), ('or 或运算',), ('not 非运算',), ('逻辑运算符的优先级',), ('实例',), ('练习',), ...

  7. P1219 N皇后

    P1219 N皇后 题目描述 检查一个如下的6 x 6的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行.每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子. 上面的布局可以用序 ...

  8. Permute Digits 915C

    You are given two positive integer numbers a and b. Permute (change order) of the digits of a to con ...

  9. HNU暑假训练第一场C.Ninja Map

    一.题目大意 Intersections of Crossing Path City are aligned to a grid. There are N east-west streets whic ...

  10. MySQL CONCAT()与GROUP_CONCAT()的使用

      1 . MySQL CONCAT(str1,str2, ...)  --返回连接的字符串 mysql> SELECT CONCAT('My', 'S', 'QL'); -> 'MySQ ...