码迷,mamicode.com
首页 > Web开发 > 详细

[TypeStyle] Load raw CSS in TypeStyle

时间:2017-06-07 10:00:52      阅读:167      评论:0      收藏:0      [点我收藏+]

标签:rate   element   document   less   function   nbsp   log   ext   cas   

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

标签:rate   element   document   less   function   nbsp   log   ext   cas   

原文地址:http://www.cnblogs.com/Answer1215/p/6954556.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!