@acusti/styling 中文文档教程
@acusti/styling
导出 Style
,这是一个呈现 CSS 样式字符串的 React 组件 作为可选指定的文档的 中的
元素
通过
props.ownerDocument
。 保留每个文档的全局样式注册表
被渲染,以便相同的 CSS 字符串只会被渲染为
单个 元素,无论
元素有多少次
该字符串出现在 React 组件树中。
还导出有用的 CSS 字符串文字,例如 SYSTEM_UI_FONT
可以 用作 font-family: ${SYSTEM_UI_FONT};
以指定适当的 UI 当前操作系统和浏览器的字体。
@acusti/styling
Exports Style
, which is a React component that renders a CSS style string as a <style>
element in the <head>
of the document optionally specified by props.ownerDocument
. Keeps a per-document global registry of styles being rendered so that the same string of CSS will only be rendered as a single <style>
element, no matter how many times the <Style>
element with that string appears in the React component tree.
Also exports useful CSS string literals, such as SYSTEM_UI_FONT
which can be used as font-family: ${SYSTEM_UI_FONT};
to specify the appropriate UI font for the current OS and browser.