biffbangpow/silverstripe-element-colour
最新稳定版本:v1.0.1
Composer 安装命令:
composer require biffbangpow/silverstripe-element-colour
包简介
Adds a selector to elements to allow simple styling via the CMS
README 文档
README
Adds a simple selector to allow CMS editors to apply CSS classes to specific elements.
By default, the extension is applied to all elements when installed. It can be disabled on a per-element class basis, via yml
If the default ElementHolder template has been overridden, it needs to contain the '$VariantStyle' tag in order for this extension to work.
CSS classes are defined in yml, in a simple array which contains the classname and a friendly name for the CSS, eg:
BiffBangPow\Extension\ElementColourExtension: element_styles: "light": "Light" "dark": "Dark" "white": "White" "darkblue": "Dark Blue"
By default, all elements will use the styles defined by the main yml config. If required, the styles can be overridden at the element class level, making it possible to have different style options on different types of element, eg:
BiffBangPow\Element\VideoHeroElement: inherit_config: false element_styles: "text-white": "White Text" "text-black": "Black Text" "text-primary": "Pink Text"
Note: the extension does NOT add any actual CSS for the colours. That should be done in the application / project styles
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-01-05