运行材质UI 1.0.0-beta.24
我正在使用createMuiTheme以下方式设置新主题:
import {createMuiTheme} from 'material-ui/styles';
const theme = createMuiTheme({
typography: {
fontSize: 16
}
});
export default theme;
Run Code Online (Sandbox Code Playgroud)
我怎样才能直接访问我直接覆盖的主题?我想这样做,这是行不通的:
import {createMuiTheme} from 'material-ui/styles';
const theme = createMuiTheme({
typography: {
fontSize: theme.typography.fontSize + 2
}
});
export default theme;
Run Code Online (Sandbox Code Playgroud) 因此,文本选择可以通过:: selection伪元素进行样式化,以覆盖浏览器的默认选择颜色.但对我来说,似乎禁止使用白色作为选择背景颜色,而采用灰色,不透明的颜色.
::selection { color: black; background: white; }
::-moz-selection { color: black; background: white; }
body {
background: black;
color: white;
}Run Code Online (Sandbox Code Playgroud)
So selecting me is supposed to invert the text and background colors. But the selected text background color is not white, but grey.Run Code Online (Sandbox Code Playgroud)
为什么这不能创造出完美的白色背景?相反,它显示灰色背景(#989898)
看来争论没有正确通过......
{% set items = {
item: {
'id': '1',
'brand': 'client1',
'description': 'solutions.client1.description' | trans},
item: {
'id': '2',
'brand': 'client2',
'description': 'solutions.client2.description' | trans}
} %}
{% include 'site/case-excerpt.html.twig'
with {'id': items.item.id,
'brand': items.item.brand,
'description': items.item.description
}
%}
Run Code Online (Sandbox Code Playgroud)
然后在site/case-excerpt.html.twig文件中:
{% include 'site/testimonials/item.html.twig'
with {'id': id,
'brand': brand,
'description': description
}
%}
Run Code Online (Sandbox Code Playgroud)
并在site/testimonials/item.html.twig文件中:
<div class="carousel-item {{ id }}">
<img src="images/brands/{{ brand }}.jpg">
<p>
{{ description }}
</p>
</div>
Run Code Online (Sandbox Code Playgroud)
预期输出如下:
<div class="carousel-item 1">
<img src="images/brands/client1.jpg">
<p> …Run Code Online (Sandbox Code Playgroud) 这是关于我的机器如何看待网络的问题,而不是个人网络项目。 在我的计算机上,某些图标字体显示为文字文本(图标的名称),而不是图形图标本身。
环境
还
例如,这就是我看到的https://developers.google.com/web/

任何帮助表示赞赏
这很好用
{% include 'site/snippet.html.twig'
with {'description': 'Some text'}
%}
Run Code Online (Sandbox Code Playgroud)
但是如何使这个工作?使用翻译作为参数
{% include 'site/snippet.html.twig'
with {'description': '{{ 'solutions.description' | trans }}'}
%}
Run Code Online (Sandbox Code Playgroud)
snippet.html内容为:
<p>
{{ description }}
</p>
Run Code Online (Sandbox Code Playgroud)
并且{{ 'solutions.description' | trans }}单独调用翻译会按预期显示内容.
它会是什么语法?