vue components & `@import css` bug
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的更多相关文章
- webpack4对第三方库css,项目全局css和vue内联css文件提取到单独的文件(二十二)
在讲解提取css之前,我们先看下项目的架构如下结构: ### 目录结构如下: demo1 # 工程名 | |--- dist # 打包后生成的目录文件 | |--- node_modules # 所有 ...
- vue & components & props & methods & callback
vue & components & props & methods & callback demo solution 1 & props & data ...
- ie6,ie7,ie8 css bug兼容解决方法
IE浏览器以不支持大量的css 属性出名,同时也因其支持的css属性中存在大量bug. 这里收集了好多的bug以及其解决的办法,都在这个文章里面记录下来了!希望以后解决类似问题的时候能够快速解决,也希 ...
- Vue过渡效果之CSS过渡
前面的话 Vue 在插入.更新或者移除 DOM 时,提供多种不同方式的应用过渡效果.本文将从CSS过渡transition.CSS动画animation及配合使用第三方CSS动画库(如animate. ...
- vue中引入css文件
两种方式引入css文件,一种是直接在main.js中引入(也可以在其他的.vue文件中的<script></script>标签中),即下面这种写法: import 'eleme ...
- IE下css bug集合-翻译自haslayout.net
概述IE浏览器以不支持大量的css 属性出名,同时也因其支持的css属性中存在大量bug. 本页列举了IE下的一些问题,实例样本和一些我们已知的解决方法. 尽管我已经尽力按照它们本来的性质对它们进行分 ...
- vue使用import来引入组件的注意事项
Vue使用import ... from ...来导入组件,库,变量等.而from后的来源可以是js,vue,json.这个是在webpack.base.conf.js中设置的: module.exp ...
- vue 引入通用 css
1.在入口 js 文件 main.js 中引入,一些公共的样式文件,可以在这里引入. import Vue from 'vue' import App from './App' // 引入App这个组 ...
- vue中的css作用域、vue中的scoped坑点
一.css作用域 之前一直很困扰css的作用域问题,即使是模块化编程下,在对应的模块的js中import css进来,这个css仍然是全局的.导致在css中需要加上对应模块的html的id/class ...
随机推荐
- 15、SpringBoot------整合swagger2
开发工具:STS 前言: 对外提供一个Api,无论是对开发.测试.维护,都有很大的帮助. 下面我们来实现swagger2. 参考实例:https://blog.csdn.net/weixin_3947 ...
- SAP库存历史库存表更新逻辑 (转)
根据库存类型的不同,库存信息保存在不同的表中,具体而言见下表 库存类型 当前库存 历史库存 库存金额 历史库存金额 工厂级别库存 MARC MARCH MBEW MBEWH MBEW 库存地点库存 M ...
- Integer和int使用==比较的总结
public static void main(String[] args) { int i1 = 128; Integer i2 = 128; Integer i3 = new Integer(12 ...
- keepalived实现nginx的高可用
1.使用yum安装keepalived yum install keepalived -y 2.修改配置文件keepalived.conf 主服务器配置文件 global_defs { router_ ...
- System.gc()日志分析
打开日志:运行配置---XX:+PrintGCDetails 示例程序: package com.test; public class Test { private Object instance = ...
- 01 mysql 基础一 (进阶)
mysql基础一 1.认识mysql与创建用户 01 Mysql简介 Mysql是最流行的关系型数据库管理系统之一,由瑞典MySQLAB公司开发,目前属于Oracle公司. MySQL是一种关联数据库 ...
- DNS无法区域传送(axfr,ixfr)
这两天博主在学习dns服务器的配 首先简单介绍一下axfr,ixfr axfr:完全区域传送 ixfr :增量区域传送 主要是在dns主从服务器上面进行备份更新的. ----------------- ...
- 无序数组中第K大的数
1. 排序法 时间复杂度 O(nlogn) 2. 使用一个大小为K的数组arr保存前K个最大的元素 遍历原数组,遇到大于arr最小值的元素时候,使用插入排序方法,插入这个元素 时间复杂度,遍历是 O( ...
- [BZOJ2243][SDOI2011]染色(树链剖分)
[传送门] 树链剖分就行了,注意线段树上颜色的合并 Code #include <cstdio> #include <algorithm> #define N 100010 # ...
- (洛谷)P2709 小B的询问
题目描述 小B有一个序列,包含N个1~K之间的整数.他一共有M个询问,每个询问给定一个区间[L..R],求Sigma(c(i)^2)的值,其中i的值从1到K,其中c(i)表示数字i在[L..R]中的重 ...