[TypeStyle] Load raw CSS in TypeStyle
TypeStyle tries to be an all in one CSS in JS management solution so you can always fall back to raw CSS if you ever need to migrate old code quickly. This lesson will demonstrate how to use the cssRaw function along with the real world use case of CSS resets e.g. normalize.css.
import {cssRaw} from 'typestyle';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
cssRaw(`
body {
font-size: 1.5em;
font-weight: bold;
background-color: black;
color: gold
}
`);
const App = () => (
<div>
Hello World!
</div>
);
ReactDOM.render(
<App />,
document.getElementById('root')
);
[TypeStyle] Load raw CSS in TypeStyle的更多相关文章
- [TypeStyle] Add type safety to CSS using TypeStyle
TypeStyle is the only current CSS in JS solution that is designed with TypeSafety and TypeScript dev ...
- [TypeStyle] Generate static css + html files using TypeStyle
You can easily use TypeStyle to build static html files with encapsulated CSS. You can use this patt ...
- [TypeStyle] Use fallback values in TypeStyle for better browser support
You can increase the browser support of your CSS using fallback values and vendor prefixes. This les ...
- [TypeStyle] Add responsive styles using TypeStyle Media Queries
Media queries are very important for designs that you want to work on both mobile and desktop browse ...
- [TypeStyle] Style CSS pseudo-classes using TypeStyle with $nest
TypeStyle is a very thin layer on top of CSS. In this lesson we show how to change styles based on p ...
- How to load a local .CSS file & JavaScript resources using iPhone UIWebView Class
This post will cover the basic setup and creation of an application with web content for iPhone that ...
- JQuery 加载 CSS、JS 文件
JS 方式加载 CSS.JS 文件: //加载 css 文件 function includeCss(filename) { var head = document.getElementsByTagN ...
- js动态加载css文件和js文件的方法
今天研究了下js动态加载js文件和css文件的方法. 网上发现一个动态加载的方法.摘抄下来,方便自己以后使用 [code lang="html"] <html xmlns=& ...
- JavaScript动态加载资源【js|css】示例代码
在开发过程中会用到各种第三方的插件,或者自己写在单独文件中的js方法库或者css样式,在html头部总是需要写一大堆的script和link标签,如果想要自己实现动态的引入资源文件,可以使用开源的re ...
随机推荐
- POJ——T 1961 Period
http://poj.org/problem?id=1961 Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 18542 ...
- ArcGIS中数据之间的转换接口IFeatureDataConverter2
之前我写过一篇文章关于ArcGIS各种空间数据格式之间转换的通用方法:ArcGIS中sde,mdb,shp数据之间的转换.这里使用的主要接口方法就是用到了IFeatureDataConverter接口 ...
- [TypeScript] Shallow copy object by using spread opreator
For example we have an object: const todo = { text: "Water the flowers", completed: false, ...
- layoutParams-动态更改某个控件的margin
其实它的方法也非常的简单,如下 LinearLayout.LayoutParams layoutParams = (LayoutParams) bt1.getLayoutParams(); int a ...
- 23. Node.Js Buffer类(缓冲区)-(三)文件读取实例
转自:https://blog.csdn.net/u011127019/article/details/52513109
- qt多线程
为什么要用多线程? 传统的图形用户界面应用程序都只有一个执行线程,并且一次只执行一个操作.如果用户从用户界面中调用一个比较耗时的操作,当该操作正在执行时,用户界面通常会冻结而不再响应.这个问题可以用事 ...
- 【Java学习】Font字体类的用法介绍
一.Font类简介 Font类是用于设置图形用户界面上的字体样式的,包括字体类型(例如宋体.仿宋.Times New Roman等).字体风格(例如斜体字.加粗等).以及字号大小. 二.Font类的引 ...
- View源码分析如何创建
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 文/jj120522 博主导读:View是Android中最重要的控件,几乎所有的控件都与View相 ...
- Windows Server 2016 上配置 APACHE+SSL+PHP+perl
Windows Server 2016 上配置 APACHE+SSL+PHP+perl 安装环境 谷歌云实例 Windows Server 2016 Apache Apache/2.4.25 (win ...
- java sort
MyString mySs[]=new MyString[result.length];//创建自定义排序的数组 for (int i = 0; i < result.length; i++) ...